/* Fase 2 — Admin tabs, missões, contratos, premiação, sorte */

.adf-main-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.adf-main-tab {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(15, 10, 25, 0.6);
  color: #e8dcc8;
  cursor: pointer;
}

.adf-main-tab--on {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(212, 175, 55, 0.2));
  border-color: rgba(212, 175, 55, 0.55);
}

.adf-main-panel { display: none; }
.adf-main-panel--on { display: block; }

.adf-collapsed-item {
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 0.65rem;
  margin-bottom: 0.5rem;
  background: rgba(10, 8, 18, 0.55);
}

.adf-collapsed-item--common summary { border-left: 3px solid #9ca3af; }
.adf-collapsed-item--rare summary { border-left: 3px solid #3b82f6; }
.adf-collapsed-item--epic summary { border-left: 3px solid #a855f7; }
.adf-collapsed-item--legendary summary { border-left: 3px solid #f59e0b; }

.adf-collapsed-summary {
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.adf-collapsed-item[open] .adf-collapsed-chevron { transform: rotate(90deg); }

.adf-collapsed-body {
  padding: 0.75rem 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.p2-mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.45rem;
  margin: 0.5rem 0 1rem;
}

.p2-mission-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  color: #e8dcc8;
  cursor: pointer;
  min-height: 4.5rem;
}

.p2-mission-btn--on {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

.p2-mission-btn--future { opacity: 0.55; }
.p2-mission-future { font-size: 0.65rem; color: #a78bfa; }

.p2-section-label {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.85rem;
  color: #d4af37;
}

.adf-reward-chips, .p2-reward-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.adf-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.15);
  font-size: 0.8rem;
}

/* Admin — caminho de premiação */
.p2-daily-path {
  position: relative;
  padding: 1rem 0 1.5rem;
  overflow-x: auto;
}

.p2-daily-path-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 2.4rem;
  height: 3px;
  background: linear-gradient(90deg, #6b21a8, #d4af37, #6b21a8);
  opacity: 0.45;
}

.p2-daily-path-days {
  display: flex;
  gap: 0.65rem;
  min-width: max-content;
  position: relative;
  z-index: 1;
}

.p2-daily-day-card {
  width: 7rem;
  flex-shrink: 0;
  text-align: center;
  padding: 0.5rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(212, 175, 55, 0.2);
  background: rgba(15, 10, 25, 0.7);
}

.p2-daily-day-head { font-weight: 600; color: #d4af37; margin-bottom: 0.35rem; }

/* Player — premiação */
.p2-player-path-track {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 1rem 0;
  margin-bottom: 0.75rem;
}

.p2-path-node {
  min-width: 4.5rem;
  padding: 0.45rem;
  border-radius: 0.55rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.p2-path-node--claimed { opacity: 0.55; border-color: #22c55e; }
.p2-path-node--ready {
  border-color: #d4af37;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
  animation: p2-pulse 1.8s ease-in-out infinite;
}

.p2-path-day { display: block; font-weight: 700; color: #d4af37; }
.p2-path-reward { font-size: 0.65rem; color: #c4b5a0; }

@keyframes p2-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Sorte — roleta */
.p2-luck-wheel-wrap { text-align: center; padding: 1rem 0; }

.p2-luck-wheel {
  width: 220px;
  height: 220px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 4px solid #d4af37;
  position: relative;
  overflow: hidden;
  background: conic-gradient(from 0deg, #1e1b4b, #312e81, #4c1d95, #713f12, #1e1b4b);
}

.p2-luck-wheel--spin {
  animation: p2-wheel-spin 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes p2-wheel-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(1080deg); }
}

.p2-luck-chest {
  font-size: 5rem;
  margin: 1rem auto;
  transition: transform 0.4s ease;
}

.p2-luck-chest--open {
  animation: p2-chest-open 0.8s ease forwards;
}

@keyframes p2-chest-open {
  0% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(-8deg); }
  100% { transform: scale(1.05); filter: drop-shadow(0 0 20px gold); }
}

.p2-luck-history ul {
  list-style: none;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
}

.p2-luck-history-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

/* Contratos jogador */
.p2-contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.p2-contract-card {
  padding: 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 8, 18, 0.65);
}

.p2-contract-card.adf-rarity--legendary { box-shadow: 0 0 18px rgba(245, 158, 11, 0.2); }
.p2-contract-card.adf-rarity--epic { box-shadow: 0 0 14px rgba(168, 85, 247, 0.2); }
.p2-contract-card.adf-rarity--rare { box-shadow: 0 0 10px rgba(59, 130, 246, 0.15); }

.p2-contract-img {
  width: 100%;
  max-height: 80px;
  object-fit: cover;
  border-radius: 0.4rem;
  margin-bottom: 0.35rem;
}

.p2-modal-panel { max-width: 720px; width: 95vw; }

.p2-daily-tabs { margin-bottom: 1rem; }

.p2-daily-modal-sub {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted, #a89f8f);
}

/* Visível acima do hub central (house-modal--allow + z-index extra) */
#p2-daily-modal.house-modal--allow {
  z-index: 9600;
}

.p2-empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  margin: 0.5rem 0;
}

.p2-empty-icon {
  display: block;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.p2-empty-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: #e8dcc8;
}

.p2-empty-hint {
  margin: 0;
  font-size: 0.82rem;
}

.p2-luck-hint {
  font-size: 0.78rem;
  margin: 0 0 0.75rem;
}

.p2-create-hero {
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(212, 175, 55, 0.08));
}

.p2-create-title {
  margin: 0 0 0.35rem;
  color: #d4af37;
  font-size: 1.05rem;
}

.p2-create-cta {
  margin-top: 0.75rem;
  min-width: 12rem;
}

.p2-create-panel .p2-create-cta.btn-lg {
  font-size: 1rem;
  padding: 0.65rem 1.25rem;
}

.social-tabs .p2-daily-open {
  margin-left: auto;
  flex-shrink: 0;
}

.adf-main-tab[data-adf-main-tab="create"] {
  font-weight: 600;
}

.adf-main-tab--on[data-adf-main-tab="create"] {
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

/* Admin — progresso e lista de dias */
.p2-section-title {
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
  color: #d4af37;
  font-weight: 600;
}

.p2-config-progress {
  margin: 1rem 0;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(15, 10, 25, 0.55);
}

.p2-config-progress-text {
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
  color: #e8dcc8;
}

.p2-config-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.p2-config-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6b21a8, #d4af37);
  transition: width 0.25s ease;
}

.p2-daily-setup-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 0.25rem;
}

.p2-daily-setup-row {
  display: grid;
  grid-template-columns: 5rem 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(15, 10, 25, 0.5);
}

.p2-daily-setup-row--empty {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.05);
}

.p2-daily-setup-row--ok {
  border-color: rgba(34, 197, 94, 0.25);
}

.p2-daily-setup-num {
  font-weight: 700;
  color: #d4af37;
  font-size: 0.88rem;
}

.p2-daily-setup-reward {
  font-size: 0.82rem;
  color: #c4b8a8;
}

.p2-daily-setup-row--empty .p2-daily-setup-reward {
  color: #a89f8f;
  font-style: italic;
}

/* Admin — lista de prêmios da sorte */
.p2-luck-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.p2-luck-registered {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(139, 92, 246, 0.25);
  background: rgba(15, 10, 25, 0.45);
}

.p2-luck-registered--empty {
  border-style: dashed;
  opacity: 0.85;
}

.p2-luck-registered-list {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.p2-luck-registered-list li {
  margin: 0.35rem 0;
  font-size: 0.88rem;
  color: #e8dcc8;
}

.p2-count-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.25);
  color: #d4af37;
  vertical-align: middle;
}

.p2-save-ok {
  color: var(--adf-success, #22c55e);
  border: 1px solid rgba(34, 197, 94, 0.35);
  padding: 0.35rem 0.6rem;
  border-radius: 0.35rem;
  margin: 0.5rem 0;
}
