/* ============================================================================
   MUWARRIOR S21 — MARKETPLACE P2P REDESIGN THEME (ISOLADO NA PRÉVIA)
   Aplica identidade unificada Carvão · Bronze · Ouro · Rubi sobre /marketplace/
   Preserva 100% dos fluxos de comprador, vendedor, custódia e NOWPayments
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Cinzel:wght@600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #0D0B0C !important;
  --bg-panel: #191517 !important;
  --bg-card: #191517 !important;
  --bg-surface: #141012 !important;
  --bg-elevated: #221C1F !important;
  --border-gold: rgba(234, 189, 101, 0.42) !important;
  --border-subtle: rgba(101, 72, 53, 0.45) !important;
  --gold-primary: #EABD65 !important;
  --gold-bright: #F7D894 !important;
  --gold-text: #F7D894 !important;
  --crimson-blood: #A32A3E !important;
  --emerald-green: #34D399 !important;
  --cyan-magic: #EABD65 !important;
  --cyan-glow: #F7D894 !important;
  --text-primary: #F3EBDD !important;
  --text-secondary: #C7BAB0 !important;
  --text-muted: #9A8C83 !important;
  --font-display: 'Cinzel', Georgia, serif !important;
  --font-sans: 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif !important;
  --font-mono: 'JetBrains Mono', monospace !important;
}

body {
  background-color: #0D0B0C !important;
  background-image:
    radial-gradient(ellipse 75% 320px at 50% 0%, rgba(120, 41, 54, 0.22), transparent 72%),
    linear-gradient(180deg, #0D0B0C 0%, #090708 100%) !important;
  color: #F3EBDD !important;
  font-family: 'Barlow', sans-serif !important;
}

/* Unified Portal Topbar for Seamless Back-and-Forth */
.mkt-portal-topbar {
  background: rgba(8, 6, 7, 0.96);
  border-bottom: 1px solid rgba(101, 72, 53, 0.45);
  padding: 6px 20px;
}

.mkt-portal-topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

.mkt-portal-nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.mkt-portal-nav-links a {
  color: #C7BAB0;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s;
}

.mkt-portal-nav-links a:hover,
.mkt-portal-nav-links a.is-current {
  color: #F7D894;
}

.mkt-header {
  background: rgba(18, 14, 16, 0.96) !important;
  border-bottom: 1px solid #654835 !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6) !important;
}

.header-container {
  max-width: 1240px !important;
}

.brand-title {
  font-family: 'Cinzel', serif !important;
  letter-spacing: 0.06em !important;
}

.brand-tag {
  color: #C7BAB0 !important;
}

.tabs-nav-bar {
  max-width: 1240px !important;
  margin-inline: auto;
  border-top: 1px solid rgba(101, 72, 53, 0.35) !important;
}

.tab-btn {
  font-family: 'Barlow', sans-serif !important;
  font-weight: 700 !important;
  color: #C7BAB0 !important;
  border-bottom: 3px solid transparent !important;
}

.tab-btn:hover {
  color: #F3EBDD !important;
  background: rgba(234, 189, 101, 0.06) !important;
}

.tab-btn.active {
  color: #F7D894 !important;
  border-bottom-color: #EABD65 !important;
  background: rgba(234, 189, 101, 0.1) !important;
}

.main-wrapper {
  max-width: 1240px !important;
}

.card,
.sell-form-card,
.sell-preview-card,
.listing-card,
.filter-toolbar,
.stat-card {
  background: linear-gradient(180deg, #1B1618 0%, #141012 100%) !important;
  border: 1px solid #654835 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5) !important;
}

.listing-card:hover {
  border-color: #EABD65 !important;
  transform: translateY(-2px);
}

.panel-title,
.card-title,
.modal-title {
  font-family: 'Cinzel', serif !important;
  color: #F7D894 !important;
}

.btn-primary {
  background: linear-gradient(180deg, #F3CA77 0%, #D29A3E 100%) !important;
  color: #21160B !important;
  border: 1px solid #FCE5B2 !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.pill-btn {
  background: #141012 !important;
  border: 1px solid #654835 !important;
  color: #C7BAB0 !important;
  font-weight: 600 !important;
}

.pill-btn:hover {
  border-color: #EABD65 !important;
  color: #F3EBDD !important;
}

.pill-btn.active {
  background: linear-gradient(180deg, rgba(234, 189, 101, 0.22), rgba(120, 41, 54, 0.25)) !important;
  border-color: #EABD65 !important;
  color: #F7D894 !important;
}

.radio-pill {
  background: #141012 !important;
  border: 1px solid #654835 !important;
  color: #C7BAB0 !important;
}

.radio-pill.active {
  background: rgba(234, 189, 101, 0.16) !important;
  border-color: #EABD65 !important;
  color: #F7D894 !important;
}

.search-input,
.form-control,
.form-input,
.custom-select {
  background: #0D0B0C !important;
  border: 1px solid #654835 !important;
  color: #F3EBDD !important;
}

.search-input:focus,
.form-control:focus,
.form-input:focus,
.custom-select:focus {
  border-color: #EABD65 !important;
  outline: none !important;
}

.data-table thead th {
  background: #1C1619 !important;
  color: #F7D894 !important;
  border-bottom: 1px solid #654835 !important;
  font-family: 'Cinzel', serif !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.04em !important;
}

.data-table tbody td {
  border-bottom: 1px solid rgba(199, 186, 176, 0.08) !important;
  color: #F3EBDD !important;
}

.modal-box {
  background: linear-gradient(180deg, #1B1518 0%, #120E10 100%) !important;
  border: 1px solid #EABD65 !important;
}


/* === UNIFIED S21 ITEM SHEET & MOBILE TOUCH INSPECT === */
.mu-unified-sheet {
  background: linear-gradient(180deg, rgba(16,13,17,0.96), rgba(10,8,12,0.98));
  border: 1px solid rgba(234,189,101,0.34);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  color: #f3ebdd;
}
.mu-unified-sheet .mu-item-title {
  font-family: 'Cinzel', serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: #f7d894;
  margin-bottom: 4px;
}
.mu-unified-sheet .mu-item-title.is-exc { color: #4ade80; }
.mu-unified-sheet .mu-item-title.is-ancient { color: #38bdf8; }
.mu-unified-sheet .mu-item-title.is-penta { color: #f59e0b; }
.mu-unified-sheet .mu-item-subtitle { font-size: 12px; color: #c7bab0; margin-bottom: 10px; }
.mu-unified-sheet .mu-item-image-box {
  display: flex; align-items: center; justify-content: center;
  min-height: 70px; margin: 6px auto 10px;
  background: rgba(0,0,0,0.42); border: 1px solid rgba(101,72,53,0.4);
  border-radius: 8px; padding: 8px; max-width: 112px;
}
.mu-unified-sheet .mu-item-stats-group {
  background: rgba(0,0,0,0.3); border: 1px solid rgba(101,72,53,0.35);
  border-radius: 6px; padding: 8px 10px; margin: 8px 0; text-align: left;
}
.mu-unified-sheet .mu-stat-line {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 12px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mu-unified-sheet .mu-stat-line:last-child { border-bottom: none; }
.mu-unified-sheet .mu-stat-val { font-weight: 600; color: #f3ebdd; text-align: right; }
.mu-unified-sheet .mu-req-pill {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: rgba(234,189,101,0.1); border: 1px solid rgba(234,189,101,0.28); color: #f7d894;
}
.mu-unified-sheet .mu-exc-group, .mu-unified-sheet .mu-elemental-group, .mu-unified-sheet .mu-mastery-group, .mu-unified-sheet .mu-errtel-box {
  background: rgba(0,0,0,0.36); border: 1px solid rgba(234,189,101,0.25);
  border-radius: 6px; padding: 9px 10px; margin-top: 8px; text-align: left;
}
.mu-unified-sheet .mu-group-heading { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.mu-unified-sheet .mu-exc-line { font-size: 12px; color: #86efac; margin-top: 2px; }
.mu-unified-sheet .mu-errtel-slot {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
  padding: 4px 6px; border-radius: 4px; background: rgba(255,255,255,0.03); margin-top: 4px;
}
.mu-unified-sheet .mu-id-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #93c5fd;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(147,197,253,0.25);
  border-radius: 4px; padding: 5px 8px; margin-top: 4px; word-break: break-all; cursor: pointer;
}
.mkt-card-actions-row { display: flex; gap: 8px; align-items: stretch; width: 100%; }
.mkt-inspect-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 12px; min-height: 40px; border-radius: 6px;
  background: rgba(234,189,101,0.12); border: 1px solid rgba(234,189,101,0.38);
  color: #f7d894; font-size: 0.82rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background 0.15s ease, border-color 0.15s ease;
}
.mkt-inspect-btn:hover, .mkt-inspect-btn:active {
  background: rgba(234,189,101,0.22); border-color: #f7d894;
}
.listing-card .item-visual-box.is-inspectable { cursor: pointer; position: relative; }
.listing-card .item-visual-box.is-inspectable:active { transform: scale(0.98); }
.mkt-inspect-badge-hint {
  position: absolute; bottom: 5px; right: 6px; font-size: 10px;
  background: rgba(10,8,12,0.82); color: #f7d894; border: 1px solid rgba(234,189,101,0.35);
  padding: 2px 6px; border-radius: 4px; pointer-events: none;
}
#buyModalItemSheetWrap { margin-bottom: 14px; text-align: left; }
#buyModalItemSheetWrap details {
  border: 1px solid rgba(234,189,101,0.28); border-radius: 8px; background: rgba(0,0,0,0.28);
}
#buyModalItemSheetWrap summary {
  padding: 9px 12px; cursor: pointer; font-size: 0.82rem; font-weight: 600; color: #f7d894;
}



/* === MOBILE 390px ZERO-OVERFLOW POLISH === */
html, body { max-width: 100%; overflow-x: clip; }
@media (max-width: 680px) {
  .mkt-portal-topbar { padding: 6px 10px !important; }
  .mkt-portal-topbar-inner { gap: 6px !important; font-size: 11.5px !important; }
  .mkt-portal-nav-links { gap: 8px 12px !important; }
  .header-container { flex-direction: column !important; align-items: stretch !important; padding: 10px 12px !important; gap: 10px !important; }
  .brand-group { text-align: left; }
  .brand-title { font-size: 1.05rem !important; flex-wrap: wrap; }
  .controls-group { flex-wrap: wrap !important; width: 100% !important; justify-content: space-between !important; gap: 8px !important; }
  .player-session-badge { max-width: 100%; flex-wrap: wrap; font-size: 0.78rem !important; }
  .tabs-nav-bar { overflow-x: auto !important; -webkit-overflow-scrolling: touch; flex-wrap: nowrap !important; padding: 0 8px !important; }
  .tab-btn { white-space: nowrap !important; padding: 10px 12px !important; font-size: 0.82rem !important; flex-shrink: 0; }
  .main-wrapper { padding: 12px 10px !important; max-width: 100% !important; }
  .filter-toolbar { flex-direction: column !important; align-items: stretch !important; padding: 12px !important; gap: 10px !important; }
  .filter-pills { flex-wrap: wrap !important; gap: 6px !important; }
  .filter-pills .pill-btn { font-size: 0.76rem !important; padding: 7px 10px !important; }
  .search-and-currency { flex-direction: column !important; align-items: stretch !important; width: 100% !important; }
  .search-input, .custom-select { width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
  .listings-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .listing-card { min-width: 0 !important; width: 100% !important; box-sizing: border-box !important; }
  .sell-layout { grid-template-columns: 1fr !important; }
  .modal-box { width: 95% !important; max-width: 95vw !important; margin: 8px !important; }
}
