:root {
  --orange: #ff7900;
  --black: #0b0b0b;
  --soft: #fff4ea;
  --ink: #161616;
}
* {
  box-sizing: border-box;
}
body {
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Ubuntu,
    Cantarell,
    sans-serif;
  color: var(--ink);
  background: #f8f3ed;
}
.btn-orange {
  background: var(--orange);
  border-color: var(--orange);
  color: #111;
  font-weight: 800;
}
.btn-orange:hover {
  background: #ff8f28;
  border-color: #ff8f28;
}
.login-page {
  min-height: 100vh;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.42) 42%,
      rgba(255, 121, 0, 0.16) 100%
    ),
    url("../img/fondo-login.webp") center center / cover no-repeat fixed;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 520px) 1fr;
  gap: clamp(20px, 5vw, 70px);
  align-items: center;
  padding: clamp(20px, 5vw, 70px);
}
.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 32px;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.brand-pill {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border: 1px solid #ffd2aa;
  background: #fff7ef;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.9rem;
}
.brand-pill span,
.brand-dot {
  width: 14px;
  height: 14px;
  background: var(--orange);
  border-radius: 50%;
  display: inline-block;
}

.login-brand-logo {
  display: block;
  height: 150px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 18px;
}

.login-card h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 950;
  letter-spacing: -0.06em;
  margin: 20px 0 10px;
}
.login-note {
  display: flex;
  gap: 10px;
  background: #111;
  color: #fff;
  border-radius: 16px;
  padding: 14px;
}
.login-visual {
  min-height: 560px;
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  /* background: #111; */
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}
.login-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sun {
  position: absolute;
  right: 12%;
  top: 10%;
  width: 110px;
  height: 110px;
  background: #fff1c7;
  border-radius: 50%;
}
.mountain {
  position: absolute;
  bottom: 0;
  width: 75%;
  height: 62%;
  background: #111;
  clip-path: polygon(0 100%, 45% 0, 100% 100%);
}
.m1 {
  left: -5%;
  opacity: 0.95;
}
.m2 {
  right: -20%;
  height: 52%;
  opacity: 0.75;
}
.cyclist {
  position: absolute;
  left: 47%;
  bottom: 31%;
  font-size: 68px;
  transform: rotate(-10deg);
}
.visual-copy {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 30px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  padding: 22px;
  display: grid;
}
.visual-copy strong {
  font-size: 1.5rem;
}
.app-navbar {
  background: var(--orange);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  min-height: 82px;
  padding: 0.7rem 0;
}
.navbar-logo-link {
  display: flex;
  align-items: center;
  padding: 0 !important;
}
.navbar-logo {
  height: 58px;
  width: auto;
  display: block;
  object-fit: contain;
}
.navbar-brand {
  font-weight: 950;
  color: #111 !important;
  letter-spacing: -0.03em;
}
.nav-link {
  color: #fff !important;
  font-weight: 500;
  border-radius: 999px;
  padding: 0.45rem 0.9rem !important;
}
.nav-link.active,
.nav-link:hover {
  background: rgba(255, 255, 255, 0.36);
}
.hero-strip {
  background: #000;
  padding: 20px 0;
  color: var(--orange);
}
.hero-strip h1 {
  font-weight: 950;
  letter-spacing: -0.045em;
  font-size: clamp(1.45rem, 2.4vw, 2.7rem);
  margin: 4px 0;
}
.hero-strip p {
  font-size: 0.98rem;
  max-width: 760px;
  margin: 0;
}
.eyebrow {
  text-transform: uppercase;
  font-weight: 950;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}
.status-card {
  background: #111;
  color: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  display: grid;
  gap: 2px;
}
.status-card span {
  color: #bbb;
}
.status-card strong {
  font-size: 1.22rem;
  color: var(--orange);
}
.mountain-bg {
  min-height: calc(100vh - 210px);
  background: #fefcfb;
}
.tour-panel,
.content-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 28px;
  padding: clamp(18px, 3vw, 30px);
}
.tour-map-section {
  margin-left: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
  margin-right: calc(var(--bs-gutter-x, 1.5rem) * -0.5);
}
.tour-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 8px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.tour-map-section .tour-toolbar {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}
.tour-toolbar h2,
.content-card h2 {
  font-weight: 950;
  letter-spacing: -0.04em;
  margin: 0;
}
.tour-toolbar h2 {
  font-size: 1.35rem;
}
.tour-toolbar p {
  margin: 1px 0 0;
  color: #555;
  font-size: 0.88rem;
}
.legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-weight: 800;
  font-size: 0.84rem;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}
.dot.done {
  background: #24a148;
}
.dot.current {
  background: var(--orange);
}
.dot.locked {
  background: #999;
}
.route-window {
  overflow: hidden;
  cursor: grab;
  background: linear-gradient(#dff3ff, #fff 65%);
  touch-action: pan-y;
  user-select: none;
}
.route-window.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
.route-window.dragging {
  cursor: grabbing;
}
.route-track {
  position: relative;
  width: max(1800px, 165vw);
  height: clamp(330px, 42vw, 520px);
  min-height: 330px;
}
.route-track svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.altitude-fill {
  fill: url(#profileFill);
}
.altitude-line {
  fill: none;
  stroke: #111;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.month-marker circle {
  stroke: #111;
  stroke-width: 7;
}
.month-marker text {
  font-weight: 950;
  text-anchor: middle;
  fill: #111;
  font-size: 34px;
}
.month-marker.done circle {
  fill: #35c46a;
}
.month-marker.current circle {
  fill: var(--orange);
  filter: drop-shadow(0 0 10px rgba(255, 121, 0, 0.75));
}
.month-marker.locked circle {
  fill: #ddd;
}
.rider {
  position: absolute;
  top: 18%;
  left: 0;
  font-size: 58px;
  transform: translateX(-50%);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25));
  transition: left 0.35s ease;
}
.port-card {
  height: 100%;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}
.port-card span {
  display: block;
  font-weight: 900;
  color: #555;
}
.port-card strong {
  display: block;
  font-size: 1.4rem;
  margin: 6px 0;
  font-weight:800!important;
}
.port-card p {
  margin: 0;
  color: #666;
}
.port-card.done {
  border-color: #bdeccf;
  background: #f4fff8;
}
.port-card.current {
  border: 2px solid var(--orange);
  background: #fff4ea;
}
.port-card.locked {
  opacity: 0.62;
}
.timeline {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.timeline div {
  border-left: 6px solid var(--orange);
  padding: 12px 18px;
  background: #fff7ef;
  border-radius: 0 16px 16px 0;
}
.timeline b {
  display: block;
  font-size: 1.2rem;
}
.timeline span {
  color: #555;
}
.content-card.dark {
  background: #111;
  color: #fff;
}
.content-card.dark p {
  color: #eee;
}
.support p {
  display: flex;
  gap: 10px;
  align-items: center;
}
.app-footer {
  background: #050505;
  color: #fff;
  padding: 20px 0;
}
.app-footer-inner {
  width: min(100% - 32px, 1320px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-logos img {
  display: block;
  max-width: min(420px, 52vw);
  max-height: 54px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  flex-wrap: wrap;
}
.footer-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
}
.footer-links a:hover,
.footer-links a:focus {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-visual {
    min-height: 300px;
  }
  .tour-toolbar {
    display: block;
  }
  .legend {
    margin-top: 12px;
  }
  .route-track {
    width: 1800px;
    height: 350px;
  }
  .ports-summary {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  .login-page {
    min-height: 100dvh;
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.68) 0%,
        rgba(0, 0, 0, 0.36) 45%,
        rgba(255, 121, 0, 0.18) 100%
      ),
      url("../img/fondo-login.webp") center center / cover no-repeat;
    background-attachment: scroll;
  }
  .login-shell {
    min-height: 100dvh;
  }
}

/* v1.3: imagen real del perfil de carrera */
.route-window {
  background: transparent;
}
.route-track.route-track-image {
  width: max(1942px, 165vw);
  height: auto;
  min-height: 0;
}
.route-image {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.route-track.route-track-image .rider {
  top: 70%;
  font-size: 46px;
  z-index: 2;
}
@media (max-width: 900px) {
  .app-navbar {
    min-height: 74px;
  }
  .navbar-logo {
    height: 50px;
  }
  .hero-strip {
    padding: 16px 0;
  }
  .route-track.route-track-image {
    width: 1942px;
    height: auto;
  }
  .route-track.route-track-image .rider {
    font-size: 40px;
  }
}

/* v1.5: ajustar altura del mapa de Tour sin deformar la imagen */
.route-window.full-bleed {
  background: #eaf6ff;
}
.route-track.route-track-image {
  width: max(1500px, 120vw);
  height: clamp(280px, 30vw, 420px);
  min-height: 0;
  overflow: hidden;
}
.route-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}
.route-track.route-track-image .rider {
  top: 68%;
  transform: translateX(-50%) scaleX(-1);
}
@media (max-width: 900px) {
  .route-track.route-track-image {
    width: 1500px;
    height: 330px;
  }
}
@media (max-width: 576px) {
  .route-track.route-track-image {
    width: 1300px;
    height: 290px;
  }
  .route-track.route-track-image .rider {
    top: 66%;
  }
}

/* v1.6: mostrar la imagen completa del tour sin recorte */
.route-window.full-bleed {
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.route-track.route-track-image {
  --route-height: clamp(250px, 26vw, 360px);
  width: calc(var(--route-height) * 2.4005);
  max-width: 100vw;
  height: auto;
  min-height: 0;
  overflow: visible;
  flex: 0 0 auto;
}
.route-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
}
.route-track.route-track-image .rider {
  top: 68%;
}
@media (max-width: 900px) {
  .route-track.route-track-image {
    --route-height: clamp(220px, 34vw, 300px);
    width: calc(var(--route-height) * 2.4005);
    max-width: 100vw;
    height: auto;
  }
}
@media (max-width: 576px) {
  .route-track.route-track-image {
    --route-height: clamp(190px, 46vw, 260px);
    width: calc(var(--route-height) * 2.4005);
    max-width: 100vw;
    height: auto;
  }
}

/* v1.7: aumentar al doble la altura visible del perfil sin recortar la imagen */
.route-window.full-bleed {
  background: #eaf6ff;
  display: block;
  overflow: hidden;
}
.route-track.route-track-image {
  --route-ratio: 6.588;
  --route-height: clamp(500px, 52vw, 720px);
  width: calc(var(--route-height) * var(--route-ratio));
  max-width: none;
  height: var(--route-height);
  min-height: var(--route-height);
  overflow: visible;
  flex: 0 0 auto;
}
.route-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.route-track.route-track-image .rider {
  top: 68%;
}
@media (max-width: 900px) {
  .route-track.route-track-image {
    --route-height: clamp(420px, 68vw, 620px);
  }
}
@media (max-width: 576px) {
  .route-track.route-track-image {
    --route-height: clamp(360px, 92vw, 520px);
  }
}

/* v2.0: limitar Tour a la altura real de la imagen para evitar pixelado */
.route-window.full-bleed {
  background: #fefcfb;
  display: block;
  overflow: hidden;
}
.route-track.route-track-image {
  --route-image-width: 1983px;
  --route-image-height: 301px;
  width: var(--route-image-width);
  max-width: none;
  height: var(--route-image-height);
  max-height: 301px;
  min-height: 0;
  overflow: visible;
  flex: 0 0 auto;
}
.route-image {
  display: block;
  width: var(--route-image-width);
  max-width: none;
  height: var(--route-image-height);
  max-height: 301px;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.route-track.route-track-image .rider {
  top: 68%;
}
@media (max-width: 900px) {
  .route-track.route-track-image {
    width: var(--route-image-width);
    height: var(--route-image-height);
  }
}
@media (max-width: 576px) {
  .route-track.route-track-image {
    width: var(--route-image-width);
    height: var(--route-image-height);
  }
}

/* v2.2: posicionamiento del ciclista por coordenadas X/Y sobre la imagen */
.route-track.route-track-image .rider {
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 3;
  line-height: 1;
}

/* v2.4: currentRider usa la imagen PNG del ciclista */
.route-track.route-track-image .rider {
  width: 46px;
  height: 46px;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.current-rider-img {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25));
}
@media (max-width: 900px) {
  .route-track.route-track-image .rider,
  .current-rider-img {
    width: 42px;
    height: 42px;
  }
}
@media (max-width: 576px) {
  .route-track.route-track-image .rider,
  .current-rider-img {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 700px) {
  .app-footer {
    padding: 22px 0;
  }
  .app-footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .footer-logos img {
    max-width: min(280px, 86vw);
    max-height: 48px;
  }
  .footer-links {
    justify-content: center;
    gap: 12px 18px;
  }
  .footer-links a {
    font-size: 0.86rem;
  }
}

/* v4.2: ajustes login inicial */
.login-card {
  text-align: center;
}
.login-card .lead,
.login-card form {
  text-align: left;
}
.login-brand-logo {
  margin-left: auto;
  margin-right: auto;
}
.login-visual {
  /* background-color: #111; */
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.18)),
    url("../img/energia-carga-70.png");
  background-position:
    center center,
    center center;
  background-size:
    cover,
    30% auto;
  background-repeat: no-repeat, no-repeat;
}
.login-access-link {
  color: var(--orange);
  font-weight: 500;
  text-decoration: none;
}
.login-access-link:hover,
.login-access-link:focus {
  color: #d96300;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.access-modal .modal-title {
  font-weight: 900;
}
.access-modal a {
  color: var(--orange);
  font-weight: 500;
}
@media (max-width: 900px) {
  .login-visual {
    display: none;
  }
  .login-shell {
    align-items: center;
  }
}

/* v4.4: navbar alto y nuevo header del Tour */
.app-navbar {
  min-height: 110px;
  padding: 0.9rem 0;
}
.navbar-logo {
  height: 82px;
}
.hero-strip {
  position: relative;
  overflow: visible;
  padding: 22px 0 16px;
}
.hero-strip .row {
  min-height: 150px;
}
.hero-strip h1 {
  font-size: clamp(1.75rem, 3vw, 3.35rem);
  line-height: 0.98;
}
.hero-strip p {
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
  margin-top: 20px;
  line-height: 0.8;
}
.hero-gift-card {
  position: relative;
  z-index: 2;
  margin-bottom: -48px;
  transform: rotate(3deg);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.24));
}
.hero-gift-card img {
  display: block;
  width: min(300px, 38vw);
  height: auto;
}
@media (max-width: 991.98px) {
  .app-navbar {
    min-height: 96px;
  }
  .navbar-logo {
    height: 70px;
  }
  .hero-strip {
    padding: 20px 0 42px;
  }
  .hero-strip .row {
    min-height: 0;
  }
  .hero-gift-card {
    margin-top: 8px;
    margin-bottom: -58px;
  }
  .hero-gift-card img {
    width: min(260px, 62vw);
  }
}
@media (max-width: 576px) {
  .app-navbar {
    min-height: 86px;
    padding: 0.65rem 0;
  }
  .navbar-logo {
    height: 58px;
  }
  .hero-strip {
    padding-bottom: 38px;
  }
  .hero-gift-card img {
    width: min(230px, 72vw);
  }
}

/* v4.6: etapas con naming ciclista, claim dinámico e iconos personalizados */
.hero-stage-claim {
  color: #fff;
  white-space: pre-line;
}
.hero-prize-block {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  width: 100%;
}
.hero-prize-copy {
  color: #fff;
  max-width: 230px;
  text-align: right;
  line-height: 1.15;
}
.hero-prize-copy span {
  display: block;
  color: var(--orange);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 5px;
}
.hero-prize-copy strong {
  display: block;
  font-size: clamp(1rem, 1.25vw, 1.35rem);
  font-weight: 950;
}
.port-card span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.port-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}
@media (max-width: 991.98px) {
  .hero-prize-block {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    width: 100%;
  }
  .hero-prize-copy {
    text-align: left;
    max-width: min(52vw, 360px);
    margin-right: auto;
  }
  .hero-gift-card {
    margin-left: auto;
    flex: 0 0 auto;
  }
}
@media (max-width: 576px) {
  .port-icon {
    width: 30px;
    height: 30px;
  }
}

/* v4.8: Tour sin toolbar y perfil de carrera a 410px reales */
.route-track.route-track-image {
  --route-image-width: 1983px;
  --route-image-height: 410px;
  width: var(--route-image-width);
  max-width: none;
  height: var(--route-image-height);
  max-height: 410px;
  min-height: 0;
}
.route-image {
  display: block;
  width: var(--route-image-width);
  max-width: none;
  height: var(--route-image-height);
  max-height: 410px;
  object-fit: contain;
  object-position: center center;
}
@media (max-width: 900px) {
  .route-track.route-track-image {
    width: var(--route-image-width);
    height: var(--route-image-height);
    max-height: 410px;
  }
  .route-image {
    width: var(--route-image-width);
    height: var(--route-image-height);
    max-height: 410px;
  }
}
@media (max-width: 576px) {
  .route-track.route-track-image {
    width: var(--route-image-width);
    height: var(--route-image-height);
    max-height: 410px;
  }
  .route-image {
    width: var(--route-image-width);
    height: var(--route-image-height);
    max-height: 410px;
  }
}

/* v5.6: login centrado sin aside + contenidos info/faq */
.login-shell {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: clamp(18px, 5vw, 70px);
}
.login-card {
  width: min(100%, 520px);
  margin: 0 auto;
}
.login-visual {
  display: none !important;
}
.text-orange {
  color: var(--orange) !important;
}
.info-intro h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 950;
  letter-spacing: -0.05em;
}
.info-intro p {
  font-size: 1.06rem;
  color: #3f3f3f;
}
.info-gift-img {
  width: min(260px, 70vw);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.2));
}
.info-stage-list {
  display: grid;
  gap: 14px;
}
.info-stage-list article {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  background: #fffaf5;
}
.info-stage-list article > img:first-child {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.info-stage-list strong {
  display: block;
  font-weight: 900;
  color: #111;
}
.info-stage-list span {
  display: block;
  color: #555;
  margin-top: 3px;
}
.info-stage-list .mini-gift {
  width: 70px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.16));
}
.accordion-button {
  font-weight: 850;
}
.accordion-button:not(.collapsed) {
  background: #fff4ea;
  color: #111;
}
@media (max-width: 575.98px) {
  .info-stage-list article {
    grid-template-columns: 44px 1fr;
  }
  .info-stage-list .mini-gift {
    grid-column: 2;
    width: 58px;
  }
}

.profile-page-main .content-card {
  overflow: hidden;
}
.profile-card h2 {
  margin-top: 8px;
  font-weight: 950;
  letter-spacing: -0.03em;
}
.profile-id {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 900;
}
.profile-list {
  display: grid;
  gap: 14px;
}
.profile-list div {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 12px;
}
.profile-list dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a5b31;
  margin-bottom: 3px;
}
.profile-list dd {
  margin: 0;
  font-weight: 700;
}
.profile-help {
  background: #fff4ea;
  border-radius: 16px;
  padding: 14px;
  font-size: 0.94rem;
}
.participation-badge,
.sale-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 950;
  white-space: nowrap;
}
.participation-badge {
  min-width: 150px;
  padding: 12px 18px;
}
.participation-badge.ok,
.sale-pill.yes {
  background: #e7f8e7;
  color: #116b1c;
}
.participation-badge.ko,
.sale-pill.no {
  background: #fff0ec;
  color: #a32912;
}
.sale-pill {
  padding: 7px 11px;
  font-size: 0.84rem;
}
.profile-status-table {
  margin: 0;
}
.profile-status-table thead th {
  background: #111;
  color: #fff;
  border: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.profile-status-table tbody td {
  border-color: rgba(0, 0, 0, 0.08);
}
.profile-status-table small {
  color: #8a5b31;
  font-weight: 800;
}

.support-form-card .form-label {
  font-weight: 700;
  color: #1f2937;
}

.support-ticket-form .form-control,
.support-ticket-form .form-select {
  border-radius: 14px;
  border-color: rgba(17, 24, 39, 0.16);
}

.support-email-note {
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.ticket-list {
  display: grid;
  gap: 0.75rem;
}

.ticket-item {
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.ticket-item strong,
.ticket-item span,
.ticket-item small {
  display: block;
}

.ticket-item span {
  margin-top: 0.15rem;
  color: #1f2937;
}

.ticket-item small {
  margin-top: 0.2rem;
  color: #6b7280;
}

/* Legal pages */
.legal-page-main .legal-card {
  max-width: 980px;
  margin: 0 auto;
}
.legal-card h2 {
  margin-top: 1.8rem;
  margin-bottom: 0.65rem;
  font-size: 1.35rem;
}
.legal-card h2:first-of-type {
  margin-top: 0;
}
.legal-note {
  border-left: 4px solid var(--tour-orange, #ff6b00);
  background: rgba(255, 255, 255, 0.72);
  padding: 1rem 1.25rem;
  border-radius: 12px;
}
.legal-list {
  padding-left: 1.2rem;
}
.legal-list li {
  margin-bottom: 0.45rem;
}

/* Panel privado de administracion */
.admin-page {
  background: #f8f3ed;
}
.admin-login-page .login-shell {
  grid-template-columns: minmax(320px, 520px);
  justify-content: center;
}
.admin-shell {
  min-height: calc(100vh - 80px);
}
.admin-title {
  font-weight: 950;
  letter-spacing: -0.04em;
}
.admin-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-weight: 800;
}
.admin-card,
.admin-stat {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
}
.admin-card {
  padding: clamp(18px, 3vw, 28px);
}
.admin-card h2 {
  font-size: 1.2rem;
  font-weight: 900;
  margin: 0;
}
.admin-stat {
  padding: 22px;
  min-height: 130px;
}
.admin-stat span {
  display: block;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 900;
  color: #7a6c61;
  letter-spacing: 0.08em;
}
.admin-stat strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  margin-top: 12px;
  font-weight: 950;
}
.admin-stat.warning {
  border-color: rgba(255, 121, 0, 0.35);
  background: #fff7ef;
}
.admin-table {
  margin-bottom: 0;
}
.admin-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a6c61;
  white-space: nowrap;
}
.admin-table td {
  vertical-align: middle;
}
.admin-ticket-row {
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.admin-ticket-row:last-child {
  border-bottom: 0;
}
.admin-ticket-row small {
  color: #7a6c61;
}

/* Admin imports */
.admin-upload-form code,
.admin-details code {
  white-space: normal;
}

.admin-details {
  border: 1px solid rgba(20, 20, 20, 0.12);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.75);
}

.admin-details summary {
  cursor: pointer;
  font-weight: 700;
}

/* Admin v1.15: estados mensuales */
.admin-status-table th,
.admin-status-table td {
  min-width: 120px;
}
.admin-status-table th:first-child,
.admin-status-table td:first-child {
  min-width: 90px;
}
.admin-inline-edit summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: #343a40;
}
.admin-inline-edit form {
  min-width: 160px;
}
/* v1.16 - Gestión de tickets admin */
.admin-detail-list dt {
  color: #6c757d;
  font-weight: 700;
}
.admin-message-box {
  background: rgba(0, 0, 0, 0.035);
  border-radius: 14px;
  padding: 1rem;
  white-space: normal;
}
.admin-timeline {
  border-left: 3px solid rgba(0, 0, 0, 0.08);
  margin-left: 0.35rem;
  padding-left: 1rem;
}
.admin-timeline-item {
  position: relative;
  padding-bottom: 1rem;
}
.admin-timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1rem - 6px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff7a00;
}

.admin-audit-json {
  max-width: 520px;
  max-height: 260px;
  overflow: auto;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.04);
  font-size: 0.78rem;
  white-space: pre-wrap;
}

/* v1.23 - Modales de avisos para PDV */
.tour-session-modal .modal-dialog {
  max-width: 520px;
}
.tour-session-modal-content {
  border: 0;
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(20, 20, 20, 0.24);
  overflow: hidden;
}
.tour-session-modal-content .modal-body {
  padding: 2.3rem 2.1rem 1.25rem;
}
.tour-session-modal-content .modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1rem 1.5rem 1.5rem;
}
.tour-session-modal-icon {
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    rgba(255, 121, 0, 0.14),
    rgba(255, 214, 102, 0.24)
  );
  color: #ff7900;
  font-size: 2rem;
}
.tour-session-modal-eyebrow {
  margin-bottom: 0.55rem;
  color: #7a6c61;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tour-session-modal .modal-title {
  margin: 0 auto 0.85rem;
  max-width: 420px;
  color: #24170f;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 900;
  line-height: 1.12;
}
.tour-session-modal-text {
  max-width: 430px;
  margin: 0 auto;
  color: #51483f;
  font-size: 1rem;
  line-height: 1.6;
}
.tour-session-modal-winner .tour-session-modal-icon {
  background: linear-gradient(
    135deg,
    rgba(255, 121, 0, 0.16),
    rgba(255, 214, 102, 0.36)
  );
}
.tour-session-modal-passed .tour-session-modal-icon {
  background: linear-gradient(
    135deg,
    rgba(25, 135, 84, 0.12),
    rgba(25, 135, 84, 0.22)
  );
  color: #198754;
}
.tour-session-modal-last-days .tour-session-modal-icon {
  background: linear-gradient(
    135deg,
    rgba(255, 193, 7, 0.16),
    rgba(255, 121, 0, 0.18)
  );
  color: #c76a00;
}
.tour-session-modal-eliminated .tour-session-modal-icon {
  background: linear-gradient(
    135deg,
    rgba(108, 117, 125, 0.12),
    rgba(108, 117, 125, 0.22)
  );
  color: #6c757d;
}

/* Modo demo de modales PDV: visible solo si PHP lo activa en entorno development. */
.tour-demo-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1040;
  width: min(360px, calc(100vw - 2rem));
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(20, 20, 20, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1.25rem 3rem rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(10px);
}

.tour-demo-panel-title {
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
  color: #1b1b1b;
}

.tour-demo-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.tour-demo-panel small {
  display: block;
  color: #6f6f6f;
  line-height: 1.35;
}

@media (max-width: 575.98px) {
  .tour-demo-panel {
    left: 1rem;
    right: 1rem;
    bottom: 0.75rem;
    width: auto;
  }
}

/* v1.27: logos de marcas en login y llamada de acción en etapas */
.login-shell {
  flex-direction: column;
}
.login-logos-card {
  width: min(100%, 520px);
  margin: clamp(14px, 2vw, 22px) auto 0;
  padding: clamp(14px, 2.4vw, 22px);
  /* border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6); */
  text-align: center;
}
.login-logos-card img {
  display: block;
  width: 100%;
  max-height: 78px;
  object-fit: contain;
}
.port-card .port-action {
  margin-top: 14px;
  margin-left: -20px;
  margin-right: -20px;
  padding: 10px 20px;
  background: #fff7ef;
  color: #2b1b0b;
  font-weight: 900;
  line-height: 1.25;
}
.port-card.current .port-action {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 10px 22px rgba(255, 121, 0, 0.22);
}
.port-card.done .port-action {
  background: rgba(28, 159, 83, 0.1);
  color: #17683b;
}
.port-card.locked .port-action {
  background: #f5f5f5;
  color: #555;
}
@media (max-width: 575.98px) {
  .login-logos-card img {
    max-height: 56px;
  }
}


/* v1.28 - Imágenes específicas en modales PDV */
.tour-session-modal-icon-img {
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  margin-bottom: 1rem;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: inherit;
}
.tour-session-modal-icon-img img {
  display: block;
  width: auto;
  max-width: 136px;
  max-height: 96px;
  object-fit: contain;
}
.tour-session-modal-winner .tour-session-modal-icon-img img {
  max-width: 168px;
  max-height: 112px;
}
.tour-session-modal-passed .tour-session-modal-icon-img img,
.tour-session-modal-last-days .tour-session-modal-icon-img img {
  max-width: 92px;
  max-height: 82px;
}

/* v1.29 - Ajuste solicitado de iconos en modales PDV */
.tour-session-modal-eliminated .tour-session-modal-icon {
  background: transparent !important;
  color: #d71920;
  box-shadow: none;
}
.tour-session-modal-eliminated .tour-session-modal-icon i {
  font-size: 3.15rem;
  line-height: 1;
}
.tour-session-modal-last-days .tour-session-modal-icon-img img {
  max-width: 100px;
  max-height: 104px;
}

/* v1.42: continuidad excepcional para PDV sin venta en julio */
.port-card.exception {
  border-color: rgba(255, 127, 24, 0.6);
  background: linear-gradient(180deg, #fff9f1 0%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 127, 24, 0.12);
}
.port-card.exception .port-action {
  border-color: rgba(255, 127, 24, 0.35);
  background: #fff4e5;
  color: #8a3f00;
}
.sale-pill.pending {
  background: #f1f3f5;
  color: #5f6368;
}
.tour-session-modal-exceptional .tour-session-modal-icon-img {
  background: transparent;
}
.tour-session-modal-exceptional .tour-session-modal-icon-img img {
  width: min(150px, 38vw);
  max-height: 112px;
  object-fit: contain;
}


/* v1.45 - Repesca de agosto para PDV que sí vendieron en julio */
.port-card.repechage {
  border-color: rgba(255, 127, 24, 0.72);
  background: linear-gradient(180deg, #fff4df 0%, #fff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 127, 24, 0.18);
}
.port-card.repechage .port-action {
  border-color: rgba(255, 127, 24, 0.45);
  background: #ffead0;
  color: #7b3700;
  font-weight: 800;
}
