/* Panel Mi panel (mi-panel.html): resumen de la estadía y lista de estadías. */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat {
  background: linear-gradient(145deg, #f5faf6, #eaf4ec);
  border: 1px solid #e0ece2;
  border-radius: 13px;
  padding: 18px 20px;
}
.stat span {
  color: var(--ink-2);
  font-size: 13px;
}
.stat b {
  display: block;
  font: 800 34px var(--font-head);
  color: var(--brand);
  margin: 6px 0 2px;
}
.stat small {
  color: var(--ink-3);
}
.feature {
  background: var(--grad-hero);
  color: #fff;
  border-radius: var(--r);
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.feature .tag {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.feature .tag .badge {
  letter-spacing: 0;
  text-transform: none;
}
.feature h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 10px 0 8px;
  color: #fff;
}
.feature p {
  color: #d1f0d8;
  margin-top: 4px;
}
.feature .who {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: #e6f6ea;
}
.gauge {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 22px;
  min-width: 270px;
}
.gauge b {
  font: 800 40px/1 var(--font-head);
}
.gauge span {
  color: #d1f0d8;
  margin-left: 8px;
  font-size: 13px;
}
.gauge .track {
  height: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  margin: 12px 0 8px;
  overflow: hidden;
}
.gauge .track i {
  display: block;
  height: 100%;
  width: var(--progress);
  background: linear-gradient(90deg, #d1f0d8, #58b979);
  border-radius: 6px;
}
.gauge small {
  color: #b5dcc0;
}
.rows {
  display: grid;
}
.row {
  display: grid;
  grid-template-columns: 40px 1fr 180px;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line-soft);
}
.row:first-child {
  border-top: 0;
}
.row .ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--mint);
  display: grid;
  place-items: center;
  color: var(--brand);
}
.row b {
  display: block;
  font-weight: 600;
}
.row small {
  color: var(--ink-3);
}
.row .right {
  display: grid;
  gap: 6px;
  justify-items: end;
}
.row .right small {
  font-size: 11px;
}
.soft {
  background: var(--mint);
  border: 1px solid var(--mint-2);
  border-radius: var(--r);
  padding: 22px;
}
.soft .eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--brand);
  text-transform: uppercase;
}
.soft h2 {
  font-size: 30px;
  margin: 8px 0;
}
.count {
  display: flex;
  gap: 14px;
  align-items: center;
}
.count b {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--amber-bg);
  color: var(--amber);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 500;
  flex: none;
}
.feed {
  display: grid;
}
.feed-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.feed-item:first-child {
  border-top: 0;
}
.feed-item .ico {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mint);
  display: grid;
  place-items: center;
  color: var(--brand);
}
.feed-item b {
  font-weight: 500;
  display: block;
}
.feed-item small {
  color: var(--ink-3);
}
.btn-line {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-2);
  padding: 7px 14px;
  font-weight: 500;
  font-size: 13px;
}
.btn-line:hover {
  background: var(--mint);
}
.row .ico svg,
.feed-item .ico svg {
  display: block;
}
.members {
  display: grid;
  gap: 12px;
}
.member {
  display: flex;
  align-items: center;
  gap: 12px;
}
.member b {
  display: block;
  font-weight: 600;
}
.member small {
  color: var(--ink-3);
}

/* Tres métricas del avance (capítulos acreditados, observaciones abiertas, versiones). */
.met {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.met div {
  background: linear-gradient(145deg, #f5faf6, #eaf4ec);
  border: 1px solid #e0ece2;
  border-radius: 13px;
  padding: 10px 14px;
}
.met b {
  display: block;
  font: 800 22px var(--font-head);
  color: var(--brand);
}
.met span {
  font-size: 12px;
  color: var(--ink-2);
}

/* Flujo de seguimiento: los pasos se encienden con la animación. */
.steps {
  display: grid;
}
.st {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 40px;
  font-size: 14px;
}
.st i {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e7efe9;
  color: transparent;
  font: 700 12px var(--font-head);
  font-style: normal;
  flex: none;
  transition: background 0.3s;
}
.st i::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 22px;
  width: 2px;
  height: 18px;
  background: #d9e7dd;
}
.st:last-child i::after {
  display: none;
}
.st span {
  padding-top: 2px;
  color: var(--ink-4);
  transition: color 0.3s;
}
.st.on i {
  background: var(--brand);
  color: #fff;
  animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.st.no i {
  background: var(--red);
}
.st.no span {
  color: var(--red);
}
.st.on i::after {
  background: var(--leaf);
}
.st.on span {
  color: var(--ink);
  font-weight: 700;
}
@keyframes pop {
  from {
    transform: scale(0.5);
  }
  to {
    transform: scale(1);
  }
}

/* Sello que aparece cuando la estadía está cerrada. */
.seal {
  display: none;
  margin-top: 14px;
  padding: 8px 16px;
  border-radius: 50px;
  background: #fff;
  color: #1d6b38;
  border: 2px solid var(--leaf);
  font: 800 14px var(--font-head);
  transform: rotate(-3deg);
}
.feature.done .seal {
  display: inline-block;
  animation: sello 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes sello {
  from {
    opacity: 0;
    transform: scale(0.4) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(-3deg);
  }
}

@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .feature {
    grid-template-columns: 1fr;
  }
  .gauge {
    min-width: 0;
  }
  .row {
    grid-template-columns: 40px 1fr;
  }
  .row .right {
    grid-column: 1/-1;
    justify-items: stretch;
  }
}

@media (max-width: 520px) {
  .met {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: 1fr;
  }
}

/* Cada avance aparece con la animación (se muestra al recibir la clase «on»). */
.row[data-av] {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}
.row[data-av].on {
  opacity: 1;
  transform: none;
}
.row .right small {
  text-align: right;
}
