/* ===== TOKENS ===== */
:root {
  --bg: #0d0f1a;
  --surface: #161929;
  --surface2: #1e2235;
  --border: #2a2f4a;
  --yellow: #f7c948;
  --yellow-dim: #c9a230;
  --red: #e63946;
  --blue: #4cc9f0;
  --text: #e8eaf0;
  --text-dim: #7a7f9a;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a {
  color: inherit;
  text-decoration: none;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--yellow);
  letter-spacing: 0.05em;
}
.nav-user {
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0;
}
.cq-icon {
  display: inline-block;
  vertical-align: middle;
  line-height: 0;
}
.nav-links {
  display: flex;
  gap: 0.25rem;
}
.nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: var(--transition);
}
.nav-link:hover,
.nav-link.active {
  background: var(--surface2);
  color: var(--text);
}
.nav-link.active {
  color: var(--yellow);
}

/* ===== NAV TOGGLE (hamburger) ===== */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dim);
  border-radius: 2px;
  transition: var(--transition);
}
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== LAYOUT ===== */
.main-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ===== FLASH ===== */
.flash-container {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.flash {
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 4px solid;
}
.flash-success {
  background: rgba(74, 222, 128, 0.08);
  border-color: #4ade80;
  color: #4ade80;
}
.flash-error {
  background: rgba(230, 57, 70, 0.08);
  border-color: var(--red);
  color: var(--red);
}
.flash-info {
  background: rgba(76, 201, 240, 0.08);
  border-color: var(--blue);
  color: var(--blue);
}
.flash-warning {
  background: rgba(247, 201, 72, 0.08);
  border-color: var(--yellow);
  color: var(--yellow);
}

.login-container .flash-container {
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 4rem 0 3rem;
}
.hero-title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.accent {
  color: var(--yellow);
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 400px;
  margin-bottom: 2rem;
}
.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Card hero animado */
.cq-hero {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}

/* ===== STATS ===== */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-top: 1rem;
}
.stat-item {
  flex: 1;
  text-align: center;
}
.stat-number {
  display: block;
  font-family: "Orbitron", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.stat-number.accent {
  color: var(--yellow);
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* ===== PATRIMONIO ===== */
.pat-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: linear-gradient(135deg, rgba(247, 201, 72, 0.12), var(--surface));
  border: 1px solid rgba(247, 201, 72, 0.25);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.pat-hero::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(247, 201, 72, 0.08),
    transparent 70%
  );
  pointer-events: none;
}
.pat-hero-main {
  flex-shrink: 0;
}
.pat-hero-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pat-hero-valor {
  font-family: "Orbitron", sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1.2;
}
.pat-hero-badges {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  flex: 1;
}
.pat-hero-badge {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  min-width: 100px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.pat-hero-badge-top {
  min-width: 160px;
}
.pat-hero-badge-num {
  font-family: "Orbitron", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.pat-hero-badge-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pat-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.pat-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.pat-kpi-valor {
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.pat-kpi-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.pat-filtros-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
}
.pat-filtros-card form {
  display: flex;
  flex-direction: column;
}
.pat-filtros-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.pat-filtros-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}
.pat-filtros-actions {
  display: flex;
  gap: 0.4rem;
}
.pat-filtros-body {
  padding: 0.75rem 1rem 1rem;
}
.pat-filtros-row {
  margin-bottom: 0.75rem;
}
.pat-filtro-group {
  border: none;
  padding: 0;
  margin: 0;
}
.pat-filtro-legend {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.pat-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
}
.pat-checkbox {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: var(--transition);
}
.pat-checkbox:hover {
  background: var(--surface2);
}
.pat-checkbox input[type="checkbox"] {
  accent-color: var(--yellow);
  width: 14px;
  height: 14px;
  cursor: pointer;
}
.pat-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: "Inter", sans-serif;
  width: 100%;
  max-width: 320px;
}
.pat-search-select {
  position: relative;
  max-width: 320px;
  z-index: 60;
}
.pat-search-input {
  width: 100%;
  box-sizing: border-box;
}
.pat-search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 100;
  margin-top: -1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.pat-search-select.open .pat-search-dropdown {
  display: block;
}
.pat-search-option {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.pat-search-option:hover,
.pat-search-option.highlighted {
  background: var(--surface2);
}
.pat-search-option.selected {
  color: var(--yellow);
  font-weight: 600;
}
.pat-search-option.hidden {
  display: none;
}

.pat-tipos-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.pat-tipo-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pat-tipo-cell:hover {
  background: color-mix(
    in srgb,
    var(--type-color, var(--surface)) 8%,
    var(--surface)
  );
  border-color: color-mix(
    in srgb,
    var(--type-color, var(--border)) 30%,
    var(--border)
  );
}
.pat-tipo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--type-color, var(--text-dim));
}
.pat-tipo-nome {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.pat-tipo-count {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

.pat-colecao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}
.pat-colecao-header:hover {
  background: var(--surface2);
}
.pat-toggle {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.pat-cards {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 1.5rem;
}
.pat-card-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}
.pat-card-item:hover {
  background: var(--surface2);
}
.pat-card-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}
.pat-card-nome {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}
.pat-card-valor {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--blue);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .pat-hero {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .pat-hero-badges {
    justify-content: center;
  }
  .pat-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .pat-tipos-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pat-hero-valor {
    font-size: 2rem;
  }
}

/* ===== DASHBOARD PATRIMONIO WIDGET ===== */
.dash-patrimonio-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(247, 201, 72, 0.12), var(--surface));
  border: 1px solid rgba(247, 201, 72, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.dash-patrimonio-card:hover {
  border-color: var(--yellow);
  background: linear-gradient(
    135deg,
    rgba(247, 201, 72, 0.18),
    var(--surface2)
  );
}
.dash-patrimonio-card::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(247, 201, 72, 0.08),
    transparent 70%
  );
  pointer-events: none;
}
.dash-patrimonio-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.dash-patrimonio-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dash-patrimonio-valor {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1.2;
}
.dash-patrimonio-link {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--yellow);
  font-weight: 600;
  flex-shrink: 0;
}

/* ===== PATRIMONIO CHARTS ===== */
.pat-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.pat-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.pat-chart-full {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
}
.pat-chart-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pat-chart-container {
  position: relative;
  height: 260px;
}
.pat-top-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.pat-top-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pat-top-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: var(--transition);
}
.pat-top-item:hover {
  background: var(--surface2);
}
.pat-top-pos {
  font-family: "Orbitron", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  width: 32px;
  flex-shrink: 0;
}
.pat-top-nome {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pat-top-meta {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-dim);
  opacity: 0.7;
}
.pat-top-div {
  opacity: 0.35;
}
.pat-top-valor {
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--yellow);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .pat-charts {
    grid-template-columns: 1fr;
  }
}

/* ===== DASHBOARD ===== */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.dash-greeting {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
}
.dash-sub {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 2px;
}
.dash-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.dash-stat-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(
    circle,
    rgba(247, 201, 72, 0.06),
    transparent 70%
  );
  pointer-events: none;
}
.dash-stat-number {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
}
.dash-stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dash-section {
  margin-bottom: 2rem;
}
.dash-section-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-colecoes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dash-colecao {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-decoration: none;
  transition: var(--transition);
}
.dash-colecao:hover {
  border-color: var(--yellow-dim);
  background: var(--surface2);
}
.dash-colecao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dash-colecao-nome {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.dash-colecao-porc {
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--yellow);
}
.dash-top-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-top-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}
.dash-top-item:first-child {
  background: linear-gradient(135deg, rgba(247, 201, 72, 0.1), var(--surface));
  border: 1px solid rgba(247, 201, 72, 0.2);
}
.dash-top-item:first-child {
  background: linear-gradient(135deg, rgba(247, 201, 72, 0.1), var(--surface));
  border: 1px solid rgba(247, 201, 72, 0.2);
}
.dash-top-pos {
  font-size: 1.2rem;
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}
.dash-top-nome {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
}
.dash-top-nome:hover {
  color: var(--yellow);
}
.dash-top-valor {
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
}
.dash-rarity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-rarity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.dash-rarity-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(247, 201, 72, 0.08);
  border-radius: var(--radius);
  pointer-events: none;
  transition: width 0.5s ease;
}
.dash-rarity-nome {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  z-index: 1;
}
.dash-rarity-porc {
  font-family: "Orbitron", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--yellow);
  position: relative;
  z-index: 1;
  width: 3rem;
  text-align: right;
}
.dash-rarity-count {
  font-size: 0.75rem;
  color: var(--text-dim);
  position: relative;
  z-index: 1;
  width: 2rem;
  text-align: right;
}
.dash-recent-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-recent-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
}
.dash-recent-icon {
  color: #4ade80;
  font-weight: 700;
  flex-shrink: 0;
}

.dash-recent-nome {
  flex: 1;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
}
.dash-recent-nome:hover {
  color: var(--yellow);
}
.dash-recent-tipo {
  flex-shrink: 0;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 10px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--yellow);
  color: #0d0f1a;
}
.btn-primary:hover {
  background: var(--yellow-dim);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--surface2);
  color: var(--text);
}
.btn-danger {
  background: rgba(230, 57, 70, 0.12);
  color: var(--red);
  border: 1px solid rgba(230, 57, 70, 0.3);
}
.btn-danger:hover {
  background: var(--red);
  color: white;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}
.page-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
}
.page-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ===== FORM ===== */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 740px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.full {
  grid-column: 1 / -1;
}
label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-direction: row;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  padding-top: 1.5rem;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--yellow);
}
input,
select,
textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--yellow);
}
.field-readonly {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: 10px 14px;
  width: 100%;
  opacity: 0.7;
}
select option {
  background: var(--surface);
}
.form-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.form-input:focus {
  border-color: var(--yellow);
}
textarea {
  resize: vertical;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-group {
  position: relative;
}
.autocomplete-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 260px;
  overflow-y: auto;
  box-shadow: var(--shadow);
  margin-top: -4px;
}
.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover {
  background: var(--surface2);
}
.autocomplete-item .tag {
  font-size: 0.72rem;
  flex-shrink: 0;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.filter-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.filter-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}
.filter-form input,
.filter-form select {
  flex: 1;
  min-width: 150px;
  padding: 8px 12px;
}
.filter-search {
  flex: 2 !important;
  min-width: 200px !important;
}
.filter-serie {
  flex: 1 !important;
  min-width: 100% !important;
}
.result-count {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.result-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}
.result-bar .result-count {
  margin-bottom: 0;
}
.result-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.7rem;
}
.cards-grid.colecoes-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.card-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}
.card-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--type-color, var(--yellow));
  opacity: 0.8;
}
.card-item:hover {
  transform: translateY(-4px);
  border-color: var(--type-color, var(--yellow));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.card-badge {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.card-type-icon {
  display: none;
}
.card-num {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.35rem;
  font-family: "Inter", sans-serif;
}
.card-name {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  text-align: center;
  margin-top: 0.1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--surface2);
  color: var(--text-dim);
  font-weight: 500;
  border: 1px solid var(--border);
}
.tag-sm {
  font-size: 0.65rem;
  padding: 1px 6px;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}
.card-rarity {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.card-check-wrapper {
  position: relative;
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.card-check {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.check-mark {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--surface2);
  transition: all var(--transition);
  position: relative;
}
.card-check:checked + .check-mark {
  background: var(--yellow);
  border-color: var(--yellow);
}
.card-check:checked + .check-mark::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #000;
}
.cond-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}
.cond-mint {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}
.cond-near-mint {
  background: rgba(74, 222, 128, 0.1);
  color: #86efac;
}
.cond-excelente {
  background: rgba(76, 201, 240, 0.1);
  color: var(--blue);
}
.cond-bom {
  background: rgba(247, 201, 72, 0.1);
  color: var(--yellow);
}
.cond-jogado {
  background: rgba(230, 57, 70, 0.1);
  color: var(--red);
}
.qty-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--yellow);
  font-family: "Orbitron", sans-serif;
}

/* ===== FORM WITH IMAGE ===== */
.form-with-image {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.form-fields {
  flex: 1;
  min-width: 0;
}
.form-image-side {
  width: 240px;
  flex-shrink: 0;
}
.form-image-side .form-group {
  margin-bottom: 0.75rem;
}
.image-preview {
  width: 100%;
  aspect-ratio: 2 / 3;
  background: var(--surface2);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}
.preview-placeholder {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

/* ===== DETAIL IMAGE ===== */
.detail-image-wrapper {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.detail-image {
  display: block;
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  margin: 0 auto;
}

/* ===== CARD THUMB ===== */
.card-thumb {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}
.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .form-with-image {
    flex-direction: column;
  }
  .form-image-side {
    width: 100%;
    max-width: 240px;
  }
}

/* ===== INPUT WITH BUTTON ===== */
.input-with-btn {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.input-with-btn input {
  flex: 1;
}
.input-num-search {
  width: 60px !important;
  flex: none !important;
  text-align: center;
}

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.1rem;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 4px;
}
.modal-close:hover {
  color: var(--text);
}
.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.text-dim {
  color: var(--text-dim);
  text-align: center;
  padding: 2rem 0;
}

/* ===== MODAL FILTER ===== */
.modal-filter {
  padding: 0.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-filter input {
  width: 100%;
  padding: 8px 12px;
}

/* ===== CONFIRM MODAL ===== */
.modal-confirm {
  max-width: 380px;
  text-align: center;
  padding: 2rem 2rem 1.5rem;
  align-items: center;
}
.modal-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--yellow);
  color: #0d0f1a;
  font-family: "Orbitron", sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.modal-confirm-msg {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}
.modal-confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
}

/* ===== CARD MODAL ===== */
.card-modal-content {
  max-width: 800px;
  max-height: 85vh;
  padding: 0;
  overflow: hidden;
  position: relative;
}
.card-modal-content .modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  font-size: 1.3rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.card-modal-content .modal-close:hover {
  background: rgba(247, 201, 72, 0.8);
  color: #000;
}
.card-modal-inner {
  display: flex;
  gap: 0;
  height: 100%;
}
.card-modal-image {
  flex: 0 0 340px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  margin: 0.75rem;
  border-radius: 14px;
}
.card-modal-image img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.card-modal-info {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  min-width: 0;
}
.card-modal-num {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
  font-family: "Inter", sans-serif;
}
.card-modal-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.card-modal-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.card-modal-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.card-modal-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--border);
}
.card-modal-label {
  color: var(--text-dim);
  font-weight: 500;
}
.card-modal-value {
  color: var(--text);
  font-weight: 600;
}
.card-modal-value.status-tenho {
  color: #4ade80;
}
.card-modal-value.status-nao-tenho {
  color: var(--text-dim);
}
.card-modal-value.status-desejada {
  color: var(--blue);
}
.card-modal-value.status-repetida {
  color: var(--yellow);
}
.card-modal-notes {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
  margin: 0.25rem 0;
  line-height: 1.4;
}
.card-modal-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.card-modal-edit {
  align-self: flex-start;
}
.card-modal-prices {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  margin: 0.5rem 0;
}
.card-modal-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 0.4rem;
}
.price-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.75rem;
}
.price-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.price-label {
  color: var(--text-dim);
}
.price-value {
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 640px) {
  .card-modal-inner {
    flex-direction: column;
    overflow-y: auto;
  }
  .card-modal-image {
    flex: none;
    padding: 0.75rem;
    margin: 0.5rem;
  }
  .card-modal-image img {
    max-height: 280px;
  }
  .card-modal-info {
    padding: 0.5rem 1rem 1rem;
  }
}

/* ===== IMPORT GRID ===== */
.import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.import-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}
.import-card:hover {
  border-color: var(--yellow);
  transform: translateY(-2px);
}
.import-img {
  width: 100%;
  aspect-ratio: 2 / 2.8;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.import-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.import-info {
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.import-info strong {
  font-size: 0.82rem;
  line-height: 1.2;
}
.import-info .tag {
  font-size: 0.68rem;
}

/* ===== TYPE COLORS ===== */
.tipo-fogo {
  --type-color: #ff6b35;
}
.tipo-água {
  --type-color: #4cc9f0;
}
.tipo-grama {
  --type-color: #4ade80;
}
.tipo-elétrico {
  --type-color: #f7c948;
}
.tipo-psíquico {
  --type-color: #c084fc;
}
.tipo-lutador {
  --type-color: #f97316;
}
.tipo-sombrio {
  --type-color: #6366f1;
}
.tipo-metal {
  --type-color: #94a3b8;
}
.tipo-dragão {
  --type-color: #818cf8;
}
.tipo-fada {
  --type-color: #f0abfc;
}
.tipo-normal {
  --type-color: #a3a3a3;
}
.tipo-voador {
  --type-color: #7dd3fc;
}
.tipo-veneno {
  --type-color: #a78bfa;
}
.tipo-terra {
  --type-color: #d97706;
}
.tipo-rocha {
  --type-color: #92400e;
}
.tipo-inseto {
  --type-color: #84cc16;
}
.tipo-fantasma {
  --type-color: #7e22ce;
}
.tipo-gelo {
  --type-color: #bae6fd;
}

/* ===== LOGIN ===== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(70vh - 64px);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-header {
  margin-bottom: 2rem;
}
.login-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--yellow);
}
.login-sub {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
}
.login-btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  margin-top: 0.5rem;
}
.login-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

/* ===== COLEÇÃO CARD ===== */
.colecao-item {
  text-align: center;
  align-items: center;
}
.colecao-card {
  text-align: center;
  align-items: center;
  gap: 0.35rem;
}
.colecao-logo {
  width: 100%;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
  padding: 0 8px;
}
.colecao-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ===== PROGRESS BAR ===== */
.progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.colecao-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.progress-bar {
  height: 100%;
  background: var(--yellow);
  border-radius: 99px;
  transition: width 0.4s ease;
}
.progress-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ===== TOGGLE TENHO BUTTON ===== */
.card-link-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  text-decoration: none;
  color: inherit;
  flex: 1;
}
.card-item {
  position: relative;
}
.toggle-hint {
  color: var(--yellow);
  font-weight: 700;
  cursor: default;
}

/* ===== STATUS DOT ===== */
.status-dot {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 600;
  margin-left: 4px;
}
.status-não-tenho,
.detail-status-bar.status-não-tenho {
  background: rgba(122, 127, 154, 0.15);
  color: var(--text-dim);
}
.status-tenho,
.detail-status-bar.status-tenho {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
}
.status-desejada,
.detail-status-bar.status-desejada {
  background: rgba(76, 201, 240, 0.15);
  color: var(--blue);
}
.status-repetida,
.detail-status-bar.status-repetida {
  background: rgba(247, 201, 72, 0.15);
  color: var(--yellow);
}
.colecao-badge {
  --size: 52px;
  width: var(--size);
  height: var(--size);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  font-size: calc(var(--size) * 0.35);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 35% 35% 35% 35% / 40% 40% 35% 35%;
  background: linear-gradient(145deg, #2a2f4a, #1a1e30);
  border: 2px solid rgba(247, 201, 72, 0.5);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  margin: 0 auto 0.5rem;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.colecao-card:hover .colecao-badge {
  border-color: var(--yellow);
  box-shadow:
    0 2px 12px rgba(247, 201, 72, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ===== SUBCOLEÇÕES COMPACTAS ===== */
.subcolecoes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.subcolecao-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  transition:
    border-color 0.2s,
    background 0.2s;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.subcolecao-item:hover {
  border-color: var(--yellow);
  background: var(--surface2);
}
.subcolecao-badge {
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--yellow);
  background: rgba(247, 201, 72, 0.1);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.subcolecao-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 14ch;
}
.subcolecao-count {
  font-size: 0.7rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.subcolecao-arrow {
  color: var(--text-dim);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.subcolecao-item:hover .subcolecao-arrow {
  color: var(--yellow);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-dim);
}
.empty-ball {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: linear-gradient(
    to bottom,
    var(--border) 50%,
    var(--surface2) 50%
  );
  border: 3px solid var(--border);
  opacity: 0.3;
}
.empty-state h3 {
  color: var(--text);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.empty-state p {
  margin-bottom: 1.5rem;
}

/* ===== DETAIL ===== */
.detail-container {
  max-width: 640px;
}
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}
.detail-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--type-color, var(--yellow));
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}
.detail-badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.detail-name {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.1;
}
.detail-number {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}
.detail-type-icon {
  width: 60px;
  height: 60px;
  background: var(--type-color, var(--surface2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 900;
  color: white;
  font-family: "Orbitron", sans-serif;
  opacity: 0.85;
  flex-shrink: 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-field.full {
  grid-column: 1 / -1;
}
.detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}
.detail-value {
  font-size: 1rem;
  font-weight: 500;
}
.detail-value.dim {
  color: var(--text-dim);
  font-size: 0.88rem;
}
.detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ===== DROPDOWN ===== */
.nav-dropdown {
  position: relative;
  display: inline-flex;
}
.dropdown-trigger {
  cursor: pointer;
  user-select: none;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  box-shadow: var(--shadow);
  z-index: 200;
  margin-top: 4px;
}
.nav-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dropdown-item {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: var(--transition);
  white-space: nowrap;
}
.dropdown-item:hover {
  background: var(--surface2);
  color: var(--text);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 1.25rem 1.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  margin-top: 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.footer-sep {
  opacity: 0.3;
}
.footer-link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-link:hover {
  color: var(--yellow);
}
.footer-copy {
  margin-top: 0.4rem;
  font-size: 0.72rem;
  opacity: 0.5;
}

/* ===== DETAIL STATUS BAR ===== */
.detail-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ===== COLEÇÃO HEADER (colecao_cards) ===== */
.colecao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}
.colecao-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.colecao-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.colecao-header-name {
  font-family: "Orbitron", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
}
.colecao-header-sub {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.colecao-header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 320px;
}
.colecao-header-bar .progress-bar-container {
  flex: 1;
  margin: 0;
}
.colecao-header-bar-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  font-family: "Orbitron", sans-serif;
}

.colecao-header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

/* Circular progress */
.circle-progress {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}
.circle-svg {
  width: 100%;
  height: 100%;
}
.circle-track {
  fill: none;
  stroke: var(--surface2);
  stroke-width: 8;
}
.circle-fill {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}
.circle-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.circle-pct {
  font-family: "Orbitron", sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1;
}
.circle-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}
.circle-trophy {
  font-size: 1.6rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(247, 201, 72, 0.5));
  animation: trophy-glow 1.5s ease-in-out infinite alternate;
}
@keyframes trophy-glow {
  from {
    transform: scale(1);
    filter: drop-shadow(0 0 6px rgba(247, 201, 72, 0.5));
  }
  to {
    transform: scale(1.1);
    filter: drop-shadow(0 0 16px rgba(247, 201, 72, 0.9));
  }
}
.circle-pct + .trophy-text {
  font-size: 0.55rem;
  color: var(--yellow);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Stats ao lado do círculo */
.colecao-stats {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.colecao-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.colecao-stat .stat-value {
  font-family: "Orbitron", sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
}
.colecao-stat .stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-top: 2px;
}
.colecao-stat.faltantes .stat-value {
  color: var(--red);
}
.colecao-stat.total .stat-value {
  color: var(--text);
}

@media (max-width: 680px) {
  .colecao-header {
    flex-direction: column;
    text-align: center;
  }
  .colecao-header-title {
    flex-direction: column;
  }
  .colecao-header-bar {
    max-width: 100%;
  }
  .colecao-header-right {
    width: 100%;
    justify-content: center;
  }
}

/* ===== COLEÇÃO LINK ===== */
.colecao-link {
  color: var(--yellow);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.colecao-link:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 680px) {
  .hero {
    flex-direction: column-reverse;
    gap: 2rem;
    padding: 2rem 0;
  }
  .cq-hero {
    width: 140px;
    height: 140px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .stats-bar {
    flex-direction: column;
    gap: 1.25rem;
  }
  .stat-divider {
    width: 40px;
    height: 1px;
  }
  .navbar {
    padding: 0 1rem;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.5rem;
    gap: 2px;
    box-shadow: var(--shadow);
    z-index: 99;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link {
    padding: 12px 14px;
    font-size: 0.9rem;
    border-radius: 8px;
    width: 100%;
  }
}

/* ===== CONQUISTA POPUP ===== */
.toast-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  animation: toastFadeIn 0.3s ease;
}
.toast-overlay.open {
  display: flex;
}
.toast-content {
  background: linear-gradient(145deg, var(--surface), var(--surface2));
  border: 1px solid var(--yellow);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 60px rgba(247, 201, 72, 0.2);
  animation: toastBounce 0.4s ease;
  position: relative;
}
.toast-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: var(--transition);
}
.toast-close:hover {
  color: var(--text);
  background: var(--surface2);
}
.toast-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
}
.toast-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.toast-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.toast-desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}
.toast-btn {
  background: var(--yellow);
  color: #000;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.toast-btn:hover {
  background: #e0b832;
  transform: translateY(-1px);
}
.toast-btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  margin-left: 0.5rem;
}
.toast-btn-secondary:hover {
  background: var(--border);
}
.toast-multi {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 200px;
  overflow-y: auto;
}
.toast-multi-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.toast-multi-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.toast-multi-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

@keyframes toastFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes toastBounce {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  60% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ─── Dopamine Toast ─── */
.dopamine-toast {
  position: fixed;
  top: 74px;
  right: 0.75rem;
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.7rem 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
  max-width: 300px;
  transform: translateX(120%);
  transition:
    transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}
.dopamine-toast.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.dopamine-toast .toast-card-name {
  font-weight: 700;
  color: var(--yellow);
}
.dopamine-toast .toast-value {
  color: var(--green, #4caf50);
  font-weight: 700;
}
