﻿/* ═══════════════════════════════════════════════════════
   SwapUSDT — Main Stylesheet
   Dark crypto theme · Inter font
═══════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────── */
:root {
  --white:     #e8eaf0;
  --bg:        #0b0e17;
  --card2:     #0f1320;
  --bg2:       #111520;
  --bg3:       #161b2e;
  --card:      #141929;
  --border:    #1e2640;
  --accent:    #26d97f;
  --accent2:   #1fb86a;
  --accent-glow: rgba(38,217,127,0.18);
  --blue:      #3b82f6;
  --red:       #ef4444;
  --text:      #e8eaf0;
  --muted:     #6b7280;
  --muted2:    #9ca3af;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 4px 32px rgba(0,0,0,0.45);
  --transition: 0.22s ease;
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
input, button { font-family: inherit; }

/* ── Utility ───────────────────────────────────────── */
.accent { color: var(--accent); }
.hidden { display: none !important; }

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ══════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,14,23,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo-icon { color: var(--accent); font-size: 22px; }
.logo-text { color: var(--text); }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--muted2);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover { color: var(--text); background: var(--bg3); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent2);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--muted2);
  border: 1px solid var(--border);
}
.btn-outline:hover { color: var(--text); border-color: var(--accent); }
.btn-sell-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-sell-outline:hover {
  background: var(--accent-glow);
}
.btn-trade {
  background: linear-gradient(135deg, var(--accent), #1de07a);
  color: #000;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-trade:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}
.btn-loading { opacity: 0.6; pointer-events: none; }

.lang-toggle {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted2);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-toggle:hover { color: var(--text); border-color: var(--accent); }

/* ══════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  text-align: center;
  padding: 100px 24px 80px;
  overflow: hidden;
}
/* Radial glow background */
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(38,217,127,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 99px;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  color: var(--text);
}
.hero-sub {
  font-size: 18px;
  color: var(--muted2);
  max-width: 480px;
  margin: 0 auto 48px;
}

/* Stats row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 140px;
  transition: border-color var(--transition), transform var(--transition);
}
.stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.stat-val {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -1px;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ══════════════════════════════════════════════════════
   TRADE WIDGET SECTION
══════════════════════════════════════════════════════ */
.trade-section {
  display: flex;
  justify-content: center;
  padding: 0 24px 80px;
}
.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.widget::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #3b82f6);
}
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.widget-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.widget-badge {
  background: rgba(38,217,127,0.15);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(38,217,127,0.3);
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.rate-bar {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted2);
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--muted2);
  margin-bottom: 8px;
  font-weight: 500;
}
.input-suffix {
  display: flex;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition);
}
.input-suffix:focus-within { border-color: var(--accent); }
.input-suffix input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--text);
}
.input-suffix input::placeholder { color: var(--muted); }
.input-suffix span {
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted2);
  background: var(--bg3);
  border-left: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  min-height: 46px;
}
.input-suffix.readonly { opacity: 0.7; }
.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.field-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 6px;
  display: none;
}
.field-error.show { display: block; }
.input-error .input-suffix { border-color: var(--red); }
.widget-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

/* ══════════════════════════════════════════════════════
   HOW IT WORKS
══════════════════════════════════════════════════════ */
.how-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.how-section h2,
.features-section h2,
.faq-section h2,
.recent-section h2 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 48px;
  color: var(--text);
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: left;
  position: relative;
  transition: border-color var(--transition), transform var(--transition);
}
.step:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}
.step-num {
  font-size: 42px;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -2px;
}
.step h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.step p {
  font-size: 14px;
  color: var(--muted2);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   RECENT TRADES
══════════════════════════════════════════════════════ */
.recent-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.recent-sub {
  font-size: 15px;
  color: var(--muted);
  margin-top: -32px;
  margin-bottom: 32px;
}

/* Ticker */
.recent-ticker {
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 0;
  margin-bottom: 32px;
}
.ticker-inner {
  display: flex;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
}
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 24px;
  font-size: 13px;
  color: var(--muted2);
}
.ticker-sep { color: var(--border); padding: 0 8px; }
.ticker-buy  { color: var(--accent); font-weight: 600; }
.ticker-sell { color: var(--red); font-weight: 600; }

/* Grid */
.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.recent-loading {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 14px;
  padding: 32px;
}
.recent-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: left;
  transition: border-color var(--transition), transform var(--transition);
}
.recent-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.recent-type {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.type-buy  { color: var(--accent); }
.type-sell { color: var(--red); }
.recent-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.recent-unit { font-size: 12px; color: var(--muted); font-weight: 400; }
.recent-try {
  font-size: 13px;
  color: var(--muted2);
  margin: 4px 0 10px;
}
.recent-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.net-badge {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted2);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ══════════════════════════════════════════════════════
   FEATURES
══════════════════════════════════════════════════════ */
.features-section {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
  text-align: center;
}
.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: left;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(38,217,127,0.08);
}
.feature-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 14px;
  color: var(--muted2);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   FAQ
══════════════════════════════════════════════════════ */
.faq-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.faq-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition);
}
.faq-item:hover { border-color: var(--accent); }
.faq-item.open { border-color: var(--accent); }
.faq-q {
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-arrow {
  color: var(--muted);
  font-size: 18px;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--accent); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  font-size: 14px;
  color: var(--muted2);
  line-height: 1.7;
  padding: 0 20px;
  transition: max-height 0.35s ease, padding 0.35s ease;
}
.faq-item.open .faq-a {
  max-height: 200px;
  padding: 0 20px 18px;
}

/* ══════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════ */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer-networks {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-note {
  font-size: 13px;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════
   LIVE CHAT WIDGET
══════════════════════════════════════════════════════ */
.chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.chat-bubble {
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.chat-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(38,217,127,0.4);
}
.chat-box {
  width: 320px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chat-box.hidden { display: none; }
.chat-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.chat-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  transition: color var(--transition);
}
.chat-close:hover { color: var(--text); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  min-height: 120px;
}
.chat-msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.msg-user {
  background: var(--accent);
  color: #000;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.msg-admin {
  background: var(--bg3);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.chat-footer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.chat-input-field {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.chat-input-field:focus { border-color: var(--accent); }
.chat-input-field::placeholder { color: var(--muted); }
.chat-send {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
  transition: background var(--transition);
}
.chat-send:hover { background: var(--accent2); }

/* Quick questions */
.user-quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.uqq-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted2);
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--transition);
}
.uqq-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ══════════════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════════════ */
#toastContainer {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease;
  min-width: 220px;
}
.toast.success { border-color: var(--accent); }
.toast.error   { border-color: var(--red); }
.toast.fade-out { opacity: 0; transition: opacity 0.3s; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-inner { gap: 12px; }
  .nav-right { gap: 6px; }
  .nav-right .btn-outline:not(.btn-sell-outline) { display: none; }

  .hero { padding: 72px 20px 56px; }
  .hero h1 { letter-spacing: -1px; }
  .hero-sub { font-size: 16px; }

  .stats-row { gap: 10px; }
  .stat-card { padding: 16px 20px; min-width: 110px; }
  .stat-val { font-size: 22px; }

  .widget { padding: 24px 18px; }

  .steps { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr 1fr; }
  .recent-grid { grid-template-columns: repeat(2, 1fr); }

  .chat-box { width: 290px; }
  .chat-widget { bottom: 16px; right: 16px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: 1fr 1fr; }
  .nav-right .btn-sell-outline { display: none; }
}

/* ══════════════════════════════════════════════════════
   SELL PAGE
══════════════════════════════════════════════════════ */
:root {
  --sell-accent: #f59e0b;
  --sell-glow:   rgba(245,158,11,0.18);
}

.page-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-panel { width: 100%; }
.step-panel.hidden { display: none; }

/* Sell accent button */
.btn-sell {
  background: linear-gradient(135deg, var(--sell-accent), #d97706) !important;
  color: #000 !important;
  width: 100%;
  margin-top: 8px;
}
.btn-sell:hover {
  box-shadow: 0 8px 28px var(--sell-glow) !important;
  transform: translateY(-2px);
}

/* Select */
select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
select:focus { border-color: var(--accent); }

/* Standalone inputs (not inside .input-suffix) */
.form-group > input[type="text"],
.form-group > input[type="email"],
.form-group > input[type="number"] {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.form-group > input:focus { border-color: var(--accent); }
.form-group > input::placeholder { color: var(--muted); }

/* Wallet display */
.wallet-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.wallet-addr {
  flex: 1;
  font-size: 13px;
  color: var(--accent);
  word-break: break-all;
  font-family: monospace;
}
.copy-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted2);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Info box */
.info-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.info-box-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.info-box-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

/* Sell info card */
.sell-info-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.iban-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.iban-row:last-child { border-bottom: none; }
.iban-label {
  font-size: 13px;
  color: var(--muted);
  flex-shrink: 0;
}
.iban-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* Alert box */
.alert-box {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: #fbbf24;
  line-height: 1.5;
}

/* Status badges */
.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}
.status-badge.pending {
  background: rgba(245,158,11,0.15);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,0.3);
}
.status-badge.success {
  background: rgba(38,217,127,0.15);
  color: var(--accent);
  border: 1px solid rgba(38,217,127,0.3);
}
.status-badge.rejected {
  background: rgba(239,68,68,0.15);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
}

/* Success icon */
.success-icon {
  width: 72px;
  height: 72px;
  background: rgba(38,217,127,0.15);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--accent);
  margin: 0 auto 8px;
}

/* ══════════════════════════════════════════════════════
   TRADE PAGE — extra components
══════════════════════════════════════════════════════ */

/* Spinner */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* IBAN card (trade page) */
.iban-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}

/* Countdown bar */
.countdown-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 14px;
  color: #93c5fd;
  margin-bottom: 16px;
}
.countdown-val {
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
.countdown-bar.countdown-urgent {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: #fca5a5;
}
.countdown-bar.countdown-urgent .countdown-val { color: var(--red); }

/* File upload */
.file-upload {
  background: var(--bg2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted2);
  transition: border-color var(--transition), color var(--transition);
}
.file-upload:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ══════════════════════════════════════════════════════
   STATUS / SELL-STATUS PAGES — trade-info table
══════════════════════════════════════════════════════ */
.trade-info {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  font-size: 14px;
  color: var(--muted2);
}
.info-row:last-child { border-bottom: none; }
.info-val {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* status-badge extra states */
.status-badge.review {
  background: rgba(59,130,246,0.15);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,0.3);
}
.status-badge.completed {
  background: rgba(38,217,127,0.15);
  color: var(--accent);
  border: 1px solid rgba(38,217,127,0.3);
}

/* ══════════════════════════════════════════════════════
   ADMIN PANEL
══════════════════════════════════════════════════════ */

/* Admin panel wrapper — full viewport after login */
#adminPanel {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Tab wrapper */
.admin-tab-wrap {
  flex: 1;
  padding: 28px 24px 60px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ── Filter row ─────────────────────────────────────── */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.filter-btn {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active {
  background: rgba(38,217,127,0.12);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Live dot ───────────────────────────────────────── */
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-badge 1.5s infinite;
}

/* ── Chat notification badge ────────────────────────── */
.chat-notif-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: middle;
  animation: pulse-badge 1.5s infinite;
}

/* ── Order card ─────────────────────────────────────── */
.order-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color var(--transition);
}
.order-card:hover { border-color: rgba(38,217,127,0.3); }

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg3);
  gap: 12px;
  flex-wrap: wrap;
}
.order-id {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: monospace;
}

.order-body {
  display: flex;
  gap: 0;
  align-items: flex-start;
}
.order-info {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  padding: 16px 18px;
  align-items: center;
}
.oi-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.oi-val {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}

.order-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  border-left: 1px solid var(--border);
  min-width: 160px;
  justify-content: center;
}

/* ── Danger button ──────────────────────────────────── */
.btn-danger {
  background: rgba(239,68,68,0.12);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.3);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-danger:hover {
  background: rgba(239,68,68,0.22);
  border-color: var(--red);
}

/* ── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow);
}

/* ── IBAN Pool select ───────────────────────────────── */
.iban-pool-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}
.pool-iban-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: all var(--transition);
}
.pool-iban-item:hover { border-color: var(--accent); }
.pool-iban-item.selected {
  border-color: var(--accent);
  background: rgba(38,217,127,0.08);
}
.pool-iban-main {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-family: monospace;
}
.pool-iban-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

/* ── Tronscan result ────────────────────────────────── */
.tronscan-result-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all var(--transition);
}
.tronscan-result-item:hover { border-color: var(--accent); }
.tronscan-result-item.selected {
  border-color: var(--accent);
  background: rgba(38,217,127,0.08);
}

/* ══════════════════════════════════════════════════════
   ADMIN CHAT LAYOUT
══════════════════════════════════════════════════════ */
.admin-chat-layout {
  display: flex !important;
  flex-direction: row !important;
  height: calc(100vh - 64px);
  overflow: hidden;
  padding: 0 !important;
  max-width: 100% !important;
}

.admin-chat-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  overflow: hidden;
}
.admin-chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.admin-session-list {
  flex: 1;
  overflow-y: auto;
}
.session-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}
.session-item:hover { background: var(--bg3); }
.session-item.active { background: rgba(38,217,127,0.08); border-left: 3px solid var(--accent); }
.session-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.session-meta {
  font-size: 11px;
  color: var(--muted);
}

/* Quick replies panel in sidebar */
.quick-replies-panel {
  border-top: 1px solid var(--border);
  padding: 12px;
  flex-shrink: 0;
  max-height: 220px;
  overflow-y: auto;
}
.qr-title {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}
.qr-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted2);
  font-size: 12px;
  padding: 7px 10px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.qr-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Main chat area */
.admin-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.no-chat-selected {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}
.admin-chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
  flex-shrink: 0;
}
.admin-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Admin messages */
.admin-msg {
  display: flex;
  flex-direction: column;
  max-width: 70%;
}
.admin-msg-in  { align-self: flex-start; }
.admin-msg-out { align-self: flex-end; }
.admin-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.admin-msg-in  .admin-msg-bubble { background: var(--bg3); color: var(--text); border-bottom-left-radius: 3px; }
.admin-msg-out .admin-msg-bubble { background: var(--accent); color: #000; border-bottom-right-radius: 3px; }
.admin-msg-meta {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
  padding: 0 4px;
}
.admin-msg-out .admin-msg-meta { text-align: right; }

/* Chat input area */
.admin-chat-input-area {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}
.quick-reply-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 0;
}
.qr-chip {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted2);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.qr-chip:hover { border-color: var(--accent); color: var(--accent); }
.admin-chat-footer {
  display: flex;
  gap: 10px;
  padding: 10px 16px 14px;
  align-items: flex-end;
}
.admin-reply-textarea {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  resize: none;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color var(--transition);
}
.admin-reply-textarea:focus { border-color: var(--accent); }
.admin-reply-textarea::placeholder { color: var(--muted); }

/* ── Admin responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .admin-chat-layout { flex-direction: column !important; height: auto; }
  .admin-chat-sidebar { width: 100%; max-height: 260px; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-chat-main { min-height: 400px; }
  .order-body { flex-direction: column; }
  .order-actions { border-left: none; border-top: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; min-width: unset; }
}
