/* ============================================================
   MISSOES.CSS — Design Moderno
   ============================================================ */

.mis-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* ── CABEÇALHO ───────────────────────────────────────────────── */
.mis-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #DDD8CF;
}
.mis-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.mis-header-icon { font-size: 1.8rem; }
.mis-titulo {
  font-family: 'Bangers', cursive;
  font-size: 1.8rem;
  color: #20232A;
  letter-spacing: 1px;
  margin: 0 0 3px;
}
.mis-subtitulo { font-size: .82rem; color: #74777F; margin: 0; }

/* Info bar */
.mis-info-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mis-info-item {
  background: #F4F2ED;
  border: 1px solid #D9D5CC;
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mis-info-label {
  font-size: .62rem;
  font-weight: 800;
  color: #74777F;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.mis-info-val {
  font-size: .88rem;
  font-weight: 900;
  color: #20232A;
  font-family: 'Nunito', sans-serif;
}
.mis-info-ryo .mis-info-val { color: #e67e22; }
.mis-info-suffix { font-size: .7rem; color: #74777F; }

/* ── MSG BOX ─────────────────────────────────────────────────── */
.msg-box {
  border-radius: 10px;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s, padding .3s, margin .3s;
  font-size: .88rem;
}
.msg-box.show    { max-height: 60px; padding: 10px 16px; margin-bottom: 16px; }
.msg-box.success { background: rgba(46,204,113,.12); border: 1px solid #2ecc71; color: #2ecc71; }
.msg-box.error   { background: rgba(231,76,60,.12);  border: 1px solid #e74c3c; color: #e74c3c; }
.msg-box.info    { background: rgba(52,152,219,.12); border: 1px solid #3498db; color: #7fb3d3; }

/* ── FILTROS ─────────────────────────────────────────────────── */
.mis-filtros {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: #F4F2ED;
  border: 1px solid #D9D5CC;
  border-radius: 12px;
  padding: 12px 14px;
}
.mis-filtro-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid #D9D5CC;
  background: transparent;
  color: #74777F;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all .15s;
}
.mis-filtro-btn:hover  { border-color: #e67e22; color: #e67e22; }
.mis-filtro-btn.active { background: #e67e22; border-color: #e67e22; color: #fff; }

/* Cores por rank nos filtros */
.mis-filtro-btn.rank-ss-plus.active { background: #9b59b6; border-color: #9b59b6; }
.mis-filtro-btn.rank-ss.active      { background: #f39c12; border-color: #f39c12; }
.mis-filtro-btn.rank-s.active       { background: #e74c3c; border-color: #e74c3c; }
.mis-filtro-btn.rank-a.active       { background: #e67e22; border-color: #e67e22; }
.mis-filtro-btn.rank-b.active       { background: #8e44ad; border-color: #8e44ad; }
.mis-filtro-btn.rank-c.active       { background: #2980b9; border-color: #2980b9; }
.mis-filtro-btn.rank-d.active       { background: #27ae60; border-color: #27ae60; }
.mis-filtro-btn.rank-e.active       { background: #95a5a6; border-color: #95a5a6; }
.mis-filtro-btn.rank-f.active       { background: #7f8c8d; border-color: #7f8c8d; }

/* ── GRUPO DE RANK ───────────────────────────────────────────── */
.missao-grupo {
  background: #F4F2ED;
  border: 1px solid #D9D5CC;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  transition: border-color .2s;
}
.missao-grupo:hover { border-color: #D9D5CC; }
.grupo-bloqueado { opacity: .45; pointer-events: none; }

.missao-grupo-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: #F4F2ED;
  border-bottom: 1px solid #DDD8CF;
  border-left: 4px solid;
}
.missao-grupo-rank {
  font-size: .72rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.missao-lock {
  margin-left: auto;
  font-size: .72rem;
  color: #74777F;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}
.missao-grupo-livre {
  margin-left: auto;
  font-size: .72rem;
  color: #2ecc71;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── CARD DE MISSÃO ──────────────────────────────────────────── */
.missao-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #DDD8CF;
  transition: background .15s;
}
.missao-card:last-child { border-bottom: none; }
.missao-card:hover:not(.on-cooldown) { background: rgba(0,0,0,.025); }
.missao-card.on-cooldown { opacity: .7; }

/* Tag de rank no card */
.missao-rank-tag {
  font-size: .65rem;
  font-weight: 900;
  border-radius: 6px;
  padding: 4px 9px;
  flex-shrink: 0;
  min-width: 30px;
  text-align: center;
  border: 1px solid;
  letter-spacing: .3px;
}

/* Info da missão */
.missao-info { flex: 1; min-width: 0; }
.missao-nome {
  font-size: .9rem;
  font-weight: 800;
  color: #20232A;
  margin-bottom: 5px;
  line-height: 1.3;
}
.missao-rewards {
  display: flex;
  gap: 12px;
  font-size: .76rem;
  color: #74777F;
  flex-wrap: wrap;
  align-items: center;
}
.missao-rewards span {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #F4F2ED;
  border: 1px solid #D9D5CC;
  border-radius: 5px;
  padding: 2px 8px;
  font-weight: 700;
}

/* Acção */
.missao-action { flex-shrink: 0; }

.btn-missao {
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: .8rem;
  font-weight: 900;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: background .15s, transform .1s;
  white-space: nowrap;
}
.btn-missao:hover   { background: #d35400; transform: translateY(-1px); }
.btn-missao:active  { transform: translateY(0); }
.btn-missao.sem-chakra {
  background: #F4F2ED;
  border: 1px solid #D9D5CC;
  color: #74777F;
  cursor: not-allowed;
  transform: none;
}

.cooldown-badge {
  font-size: .78rem;
  font-weight: 800;
  color: #e67e22;
  padding: 7px 14px;
  border: 1px solid #e67e2244;
  border-radius: 8px;
  background: rgba(230,126,34,.08);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── RANK BAR (compat antiga) ────────────────────────────────── */
.mis-rank-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  background: rgba(0,0,0,.03);
  border: 1px solid #D9D5CC;
  border-radius: 10px;
  padding: 10px 16px;
}
.mis-rank-label { font-size: .82rem; color: #74777F; }
#misRankAtual   { font-size: 1rem; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  .mis-page-header { flex-direction: column; align-items: flex-start; }
  .mis-info-bar    { width: 100%; }
  .missao-rewards  { gap: 6px; }
  .btn-missao      { padding: 7px 12px; font-size: .75rem; }
}
