/* ============================================================
   FIGURINHAS 26 — Design System
   Inspirado em Apple HIG + FIFA World Cup 2026™ Brand
   Cores: preto puro + dourado troféu + verde troféu + multicor
============================================================ */

:root {
  /* Base */
  --bg:           #000000;
  --bg-1:         #0a0a0c;
  --bg-2:         #131319;
  --surface:      rgba(255, 255, 255, 0.04);
  --surface-2:    rgba(255, 255, 255, 0.07);
  --surface-3:    rgba(255, 255, 255, 0.10);
  --border:       rgba(255, 255, 255, 0.08);
  --border-2:     rgba(255, 255, 255, 0.14);
  --border-3:     rgba(255, 255, 255, 0.22);

  /* Texto */
  --text:         #ffffff;
  --text-2:       rgba(255, 255, 255, 0.72);
  --text-3:       rgba(255, 255, 255, 0.48);
  --text-4:       rgba(255, 255, 255, 0.32);

  /* Brand WC2026 */
  --gold:         #daa64b;
  --gold-2:       #f0c66e;
  --gold-3:       #b88a32;
  --gold-glow:    rgba(218, 166, 75, 0.32);
  --green:        #2a5e3e;
  --green-2:      #3a8159;

  /* Estados */
  --tenho:        #22c55e;
  --tenho-2:      #16a34a;
  --tenho-bg:     rgba(34, 197, 94, 0.12);
  --repetida:     #f59e0b;
  --repetida-2:   #d97706;
  --repetida-bg:  rgba(245, 158, 11, 0.14);
  --falta:        #f87171;
  --falta-bg:     rgba(248, 113, 113, 0.10);

  /* Sombras */
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md:    0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg:    0 24px 64px rgba(0, 0, 0, 0.5);
  --shadow-gold:  0 12px 40px rgba(218, 166, 75, 0.20);

  /* Curvas */
  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    22px;
  --radius-xl:    28px;
  --radius-pill:  999px;

  /* Easing */
  --ease:         cubic-bezier(.4, 0, .2, 1);
  --ease-out:     cubic-bezier(.16, 1, .3, 1);
  --ease-in-out:  cubic-bezier(.45, 0, .55, 1);

  /* Tipografia */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--gold); color: var(--bg); }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
  font-feature-settings: "cv11", "ss01", "ss02";
  position: relative;
  overflow-x: hidden;
}

input, select, button, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; outline: none; }

input, select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  width: 100%;
  transition: border-color .2s var(--ease), background .2s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface-2);
}
input::placeholder { color: var(--text-4); font-weight: 500; }

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

/* ============================================================
   BACKGROUND DECORATIVE (geometric — 48 unidades)
============================================================ */
.bg-grid {
  position: fixed; inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 32px 32px;
  mask: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}
.bg-glow {
  position: fixed;
  top: -300px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 60%);
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}

/* ============================================================
   HERO LOGIN
============================================================ */
.overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  transition: opacity .4s var(--ease-out);
  overflow-y: auto;
}
.overlay.hidden { opacity: 0; pointer-events: none; }

.hero {
  width: 100%; max-width: 460px;
  text-align: center;
  position: relative;
  padding: 32px 0 40px;
  animation: heroIn .9s var(--ease-out);
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Ribbon no topo */
.hero-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg,
    rgba(218, 166, 75, 0.08),
    rgba(218, 166, 75, 0.18),
    rgba(218, 166, 75, 0.08)
  );
  border: 1px solid rgba(218, 166, 75, 0.3);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold-2);
  text-transform: uppercase;
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(218, 166, 75, 0.12);
}
.ribbon-dot {
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold);
  animation: ribbonPulse 2s var(--ease-in-out) infinite;
}
@keyframes ribbonPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}

/* Marca "26" estilizada */
.hero-mark {
  position: relative;
  width: 180px; height: 200px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 16px 50px rgba(218, 166, 75, 0.42));
}

/* Padrão geométrico no fundo do "26" — homenagem aos 48 quadrados/quartos de círculo */
.mark-bg-pattern {
  position: absolute;
  inset: 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 6px;
  opacity: .12;
  pointer-events: none;
  z-index: 0;
}
.mark-bg-pattern span {
  background: var(--gold-2);
  border-radius: 4px;
  animation: patternFade 5s var(--ease-in-out) infinite;
}
.mark-bg-pattern span:nth-child(1) { animation-delay: 0s; border-radius: 50% 4px 4px 4px; }
.mark-bg-pattern span:nth-child(2) { animation-delay: .2s; }
.mark-bg-pattern span:nth-child(3) { animation-delay: .4s; }
.mark-bg-pattern span:nth-child(4) { animation-delay: .6s; border-radius: 4px 50% 4px 4px; }
.mark-bg-pattern span:nth-child(5) { animation-delay: .8s; }
.mark-bg-pattern span:nth-child(6) { animation-delay: 1s; }
.mark-bg-pattern span:nth-child(7) { animation-delay: 1.2s; }
.mark-bg-pattern span:nth-child(8) { animation-delay: 1.4s; }
.mark-bg-pattern span:nth-child(9) { animation-delay: 1.6s; border-radius: 4px 4px 4px 50%; }
.mark-bg-pattern span:nth-child(10) { animation-delay: 1.8s; }
.mark-bg-pattern span:nth-child(11) { animation-delay: 2s; }
.mark-bg-pattern span:nth-child(12) { animation-delay: 2.2s; border-radius: 4px 4px 50% 4px; }
@keyframes patternFade {
  0%, 100% { opacity: .25; transform: scale(.85); }
  50%      { opacity: .9; transform: scale(1); }
}

.mark-2, .mark-6 {
  font-size: 150px;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.07em;
  background: linear-gradient(180deg,
    #ffe8a8 0%,
    var(--gold-2) 28%,
    var(--gold) 55%,
    var(--gold-3) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: absolute;
  font-family: var(--font);
  text-shadow: 0 2px 0 rgba(184, 138, 50, 0.3);
  z-index: 2;
}
.mark-2 { top: -8px; left: 8px; }
.mark-6 { bottom: -10px; right: 6px; }
.mark-trophy {
  position: absolute;
  font-size: 44px;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.6)) drop-shadow(0 0 20px rgba(218, 166, 75, 0.4));
  z-index: 3;
  animation: trophyFloat 4s var(--ease-in-out) infinite;
}
@keyframes trophyFloat {
  0%, 100% { transform: translate(-50%, -55%) rotate(-2deg); }
  50%      { transform: translate(-50%, -60%) rotate(2deg); }
}

.hero-title {
  font-size: clamp(38px, 8vw, 50px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 12px;
}
.hero-title .accent {
  background: linear-gradient(135deg, #ffe8a8 0%, var(--gold-2) 40%, var(--gold) 70%, var(--gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  display: inline-block;
  position: relative;
}
.hero-sub {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 32px;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.hero-meta strong {
  color: var(--gold-2);
  font-weight: 700;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.input-wrap { margin-bottom: 14px; }
.input-wrap input { font-size: 16px; }
.hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.login-msg {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  min-height: 18px;
  font-weight: 500;
}
.login-msg.error { color: var(--falta); }
.login-msg.success { color: var(--tenho); }

.hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
}
.meta-pill {
  letter-spacing: 0.02em;
}
.meta-dot { opacity: .4; }

/* ============================================================
   BOTÕES
============================================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 45%, var(--gold-3) 100%);
  color: #1a1206;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: transform .15s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 6px 16px rgba(218, 166, 75, 0.20), inset 0 1px 0 rgba(255,255,255,0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 50%);
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(218, 166, 75, 0.32), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-primary:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}
.btn-block { width: 100%; }
.btn-arrow {
  display: inline-block;
  transition: transform .25s var(--ease);
  font-weight: 800;
}
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
  transition: background .2s var(--ease);
}
.btn-secondary:hover { background: var(--surface-3); }
.btn-secondary:active { transform: scale(.985); }

.icon-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.dirty {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  border-color: transparent;
  color: var(--bg);
  animation: pulseGold 1.6s var(--ease-in-out) infinite;
}
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}

/* ============================================================
   TOPBAR
============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px 12px;
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.brand-mark {
  width: 38px; height: 38px;
  position: relative;
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1206, #0a0a0a);
  border-radius: 10px;
  border: 1px solid var(--gold-3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(218, 166, 75, 0.20);
}
.mm-2, .mm-6 {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: absolute;
  letter-spacing: -0.05em;
}
.mm-2 { top: 6px; left: 8px; }
.mm-6 { bottom: 6px; right: 8px; }
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.brand-sub {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.user-info { display: flex; gap: 8px; }

.progress-zone {
  margin-top: 12px;
}
.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
}
.codigo-tag {
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.02em;
  font-family: ui-monospace, "SF Mono", monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.progress-text {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.progress-track {
  height: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-3), var(--gold-2), var(--gold));
  border-radius: var(--radius-pill);
  width: 0%;
  transition: width .6s var(--ease-out);
  box-shadow: 0 0 12px var(--gold-glow);
  position: relative;
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2.4s linear infinite;
}
@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* ============================================================
   TABS — Segmented Control iOS-like
============================================================ */
.tabs-wrap {
  position: sticky;
  top: 99px;
  z-index: 99;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}
.tabs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 1;
  min-width: max-content;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: all .25s var(--ease);
  display: flex; align-items: center; gap: 6px;
  justify-content: center;
  letter-spacing: -0.005em;
  position: relative;
}
.tab:hover { color: var(--text-2); }
.tab.active {
  color: var(--bg);
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  box-shadow: 0 2px 8px rgba(218, 166, 75, 0.25);
  font-weight: 700;
}
.tab-icon { font-size: 14px; }
.tab-label { font-size: 13px; }

.badge {
  background: var(--bg);
  color: var(--gold-2);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  min-width: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  border: 1px solid currentColor;
}
.tab:not(.active) .badge {
  background: var(--falta);
  color: #fff;
  border-color: transparent;
}
.badge:empty { display: none; }

/* ============================================================
   FILTROS
============================================================ */
.filters {
  position: sticky;
  top: 161px;
  z-index: 98;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  padding: 12px 16px;
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.search-wrap {
  position: relative;
}
.search-wrap input {
  padding-left: 42px;
  font-size: 14px;
  height: 44px;
  border-radius: var(--radius-pill);
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.filter-row select {
  font-size: 13px;
  height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  border-radius: var(--radius-pill);
}

/* ============================================================
   VIEWS / SEÇÕES
============================================================ */
main {
  padding: 16px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}
.view { display: none; animation: viewIn .35s var(--ease-out); }
.view.active { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.empty-state {
  text-align: center;
  padding: 80px 24px 60px;
  color: var(--text-3);
}
.empty-state .icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: .8;
}
.empty-state .msg {
  font-size: 15px;
  font-weight: 500;
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ============================================================
   STATS OVERVIEW (cards no topo da aba Coleção)
============================================================ */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
@media (min-width: 600px) {
  .stats-overview { grid-template-columns: repeat(4, 1fr); gap: 10px; }
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.stat-card:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--accent, var(--gold-glow)) 0%, transparent 55%);
  opacity: .14;
  pointer-events: none;
}
.stat-card.stat-tenho { --accent: rgba(34, 197, 94, 0.6); }
.stat-card.stat-falt { --accent: rgba(248, 113, 113, 0.5); }
.stat-card.stat-rep  { --accent: rgba(245, 158, 11, 0.6); }
.stat-card.stat-comp { --accent: rgba(218, 166, 75, 0.6); }
.stat-num {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,0.65));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.stat-card.stat-tenho .stat-num { background: linear-gradient(180deg, #4ade80, #16a34a); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card.stat-falt  .stat-num { background: linear-gradient(180deg, #f87171, #dc2626); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card.stat-rep   .stat-num { background: linear-gradient(180deg, #fbbf24, #d97706); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-card.stat-comp  .stat-num { background: linear-gradient(180deg, var(--gold-2), var(--gold-3)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin-bottom: 2px;
}
.stat-trend {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ============================================================
   CATEGORIA / SELEÇÃO — Glass cards com bandeira
============================================================ */
.cat-block {
  margin-bottom: 12px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
  position: relative;
}
.cat-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cat-color, var(--gold)) 0%, transparent 55%);
  opacity: 0;
  transition: opacity .3s var(--ease);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.cat-block:hover { border-color: var(--border-2); }
.cat-block:hover::before { opacity: .25; }
.cat-block.open::before { opacity: .18; }

.cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  transition: background .2s var(--ease);
  gap: 12px;
  position: relative;
  z-index: 1;
}
.cat-header::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cat-color, var(--gold));
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.cat-block.open .cat-header::after { opacity: 1; }
.cat-header:hover { background: rgba(255, 255, 255, 0.025); }

.cat-header .left {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
  flex: 1;
}
.cat-emblem {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface-3), var(--surface));
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cat-emblem::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--cat-color, var(--gold)) 0%, transparent 60%);
  opacity: 0.25;
}
.cat-flag-emoji {
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  position: relative;
  z-index: 1;
}
.cat-name-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.cat-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-grupo {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-top: 2px;
  text-transform: uppercase;
}
.cat-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cat-fraction {
  font-size: 13px;
  color: var(--text-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.cat-pct {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.completo {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  color: var(--bg);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px var(--gold-glow);
}
.cat-toggle {
  font-size: 14px;
  color: var(--text-3);
  transition: transform .3s var(--ease-out);
  width: 18px;
  text-align: center;
}
.cat-block.open .cat-toggle { transform: rotate(90deg); }

.cat-content {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  animation: contentIn .35s var(--ease-out);
}
.cat-block.open .cat-content { display: block; }
@keyframes contentIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   GRID DE FIGURINHAS
============================================================ */
.fig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 8px;
}
@media (min-width: 600px) {
  .fig-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
}

.fig {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 8px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .2s var(--ease);
  position: relative;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  overflow: hidden;
}
.fig::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent 50%);
  pointer-events: none;
}
.fig:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
  background: var(--surface-2);
}
.fig:active { transform: scale(.96); }

.fig-num {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", monospace;
}
.fig-nome {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
  letter-spacing: -0.01em;
  color: var(--text);
}

.fig.tenho {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.18), rgba(34, 197, 94, 0.06));
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}
.fig.tenho .fig-num { color: var(--tenho); }
.fig.tenho::after {
  content: "✓";
  position: absolute;
  top: 6px; right: 6px;
  width: 18px; height: 18px;
  background: var(--tenho);
  color: #052e16;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

.fig.repetida {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.08));
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.2);
}
.fig.repetida .fig-num { color: var(--repetida); }

.fig.foil .fig-nome::before {
  content: "✦ ";
  color: var(--gold-2);
  font-weight: 800;
}
.fig.pendente { opacity: .65; }
.fig.pendente .fig-nome { font-style: italic; }

.fig-count {
  position: absolute;
  top: -2px; right: -2px;
  background: linear-gradient(135deg, var(--repetida), var(--repetida-2));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  min-width: 26px;
  border: 2px solid var(--bg);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.4);
  z-index: 2;
}

/* ============================================================
   LISTAS — Repetidas / Faltam
============================================================ */
.list-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 24px 0 10px;
  padding: 0 4px;
}
.list-section-header:first-child { margin-top: 0; }
.list-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-flag-emoji {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.section-sigla {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.05em;
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-family: ui-monospace, "SF Mono", monospace;
}
.list-section-stat {
  font-size: 12px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.summary-banner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 10px;
}
.summary-banner strong {
  color: var(--gold-2);
  font-weight: 800;
  font-size: 16px;
}
.summary-banner.faltam strong { color: var(--falta); }

.list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all .2s var(--ease);
}
.list-item:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
}
.list-item .left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.list-flag {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
}
.list-item .codigo {
  background: var(--surface-2);
  color: var(--gold-2);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 58px;
  text-align: center;
  font-family: ui-monospace, "SF Mono", monospace;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.list-item .info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.list-item .nome {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.list-item .sub {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  margin-top: 1px;
}
.list-item .actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.qtd-control {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  overflow: hidden;
}
.qtd-control button {
  width: 30px; height: 30px;
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-2);
  transition: background .15s var(--ease);
}
.qtd-control button:hover { background: var(--surface-3); }
.qtd-control button:active { transform: scale(.92); }
.qtd-control .val {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  padding: 0 2px;
}

.btn-mini {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--gold-2);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  transition: all .15s var(--ease);
  letter-spacing: -0.005em;
}
.btn-mini:hover {
  background: var(--gold);
  color: var(--bg);
  border-color: transparent;
}

/* ============================================================
   TROCAS
============================================================ */
.trade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.trade-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.trade-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}
.trade-title.tenho-color { color: var(--repetida); }
.trade-title.falta-color { color: var(--falta); }
.trade-content {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 12px 14px;
  white-space: pre-wrap;
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", monospace;
  color: var(--text-2);
  max-height: 280px;
  overflow: auto;
  line-height: 1.7;
  border: 1px solid var(--border);
}
.trade-content:empty::after {
  content: "(nenhuma)";
  color: var(--text-4);
}

/* ============================================================
   TOAST
============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-2);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  transition: transform .4s var(--ease-out);
  pointer-events: none;
  max-width: 90vw;
  letter-spacing: -0.005em;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error {
  background: rgba(127, 29, 29, 0.92);
  border-color: rgba(248, 113, 113, 0.5);
}
.toast.success {
  background: rgba(20, 83, 45, 0.92);
  border-color: rgba(34, 197, 94, 0.5);
}

/* ============================================================
   MODAL
============================================================ */
.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 600;
  padding: 20px;
  animation: modalIn .25s var(--ease-out);
}
.modal.active { display: flex; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--bg-1);
  border-radius: var(--radius-lg);
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border-2);
  position: relative;
  animation: modalBoxIn .35s var(--ease-out);
  box-shadow: var(--shadow-lg);
}
@keyframes modalBoxIn {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border-3);
  border-radius: var(--radius-pill);
  margin: -8px auto 14px;
}
.modal-box h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.modal-codigo {
  color: var(--gold-2);
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", monospace;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.modal-box input {
  margin-bottom: 18px;
  font-size: 16px;
  padding: 14px 16px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-actions button { padding: 12px 20px; }

/* ============================================================
   UTIL & RESPONSIVE
============================================================ */
.hidden { display: none !important; }

@media (min-width: 600px) {
  .filters {
    grid-template-columns: 1fr auto auto;
    gap: 10px;
  }
  .filter-row {
    display: contents;
  }
  .filter-row select {
    width: auto;
    min-width: 160px;
  }
}

@media (max-width: 380px) {
  .tab-label { display: none; }
  .tab { padding: 10px 16px; }
  .topbar { padding: 10px 14px 10px; }
  .filters { padding: 10px 14px; }
  main { padding: 14px; }
}

/* Scrollbar slim */
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: var(--radius-pill); }
*::-webkit-scrollbar-thumb:hover { background: var(--border-3); }
