/* Estilos para login.php, registro.php y activar.php — misma identidad visual que index.html */
:root { --naranja: #E8501A; --naranja-boton: #C43F14; --negro: #191714; --crema: #f6f1e7; --gris: #6b675f; --borde: #e3dccc; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Archivo', sans-serif;
  color: var(--negro);
  background: var(--crema);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* --- Nav: idéntica a la de index.html (mismo fondo/blur al hacer scroll,
   mismo padding) para que no se note el cambio de pantalla al navegar. --- */
nav.auth-nav { background: rgba(246,241,231,0.9); border-bottom: 1px solid transparent; position: sticky; top: 0; z-index: 40; transition: box-shadow .3s ease, background-color .3s ease, border-color .3s ease; }
nav.auth-nav.scrolled { background: rgba(246,241,231,0.92); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); box-shadow: 0 6px 24px rgba(25,23,20,0.08); border-color: var(--borde); }
.auth-nav .nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; row-gap: 10px; }
.auth-nav .logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; letter-spacing: -0.5px; color: var(--negro); text-decoration: none; flex-shrink: 0; }
.auth-nav .volver { font-size: 14px; font-weight: 600; color: var(--gris); text-decoration: none; }
.auth-nav .volver:hover { color: var(--negro); }
.nav-auth { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.nav-usuario { font-size: 14px; font-weight: 600; color: var(--gris); white-space: nowrap; }
a.btn, a.btn.ghost { text-decoration: none; }

/* --- Menú de usuario (escritorio): avatar + nombre con desplegable, en vez
   de un botón suelto por cada opción de la cuenta. --- */
.user-menu { position: relative; }
.user-menu-btn {
  display: flex; align-items: center; gap: 8px; background: transparent; border: 1.5px solid var(--borde);
  border-radius: 24px; padding: 5px 14px 5px 5px; cursor: pointer; font-family: inherit;
  transition: border-color .2s ease, background-color .2s ease;
}
.user-menu-btn:hover, .user-menu.open .user-menu-btn { border-color: var(--naranja); background: #fff; }
.user-menu-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--naranja); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.user-menu-nombre { font-size: 14px; font-weight: 600; color: var(--negro); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.user-menu-chevron { color: var(--gris); flex-shrink: 0; transition: transform .2s ease; }
.user-menu.open .user-menu-chevron { transform: rotate(180deg); }
.user-menu-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0; min-width: 200px;
  background: #fff; border: 1px solid var(--borde); border-radius: 14px; box-shadow: 0 18px 40px rgba(25,23,20,0.16);
  padding: 8px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .16s ease, transform .16s cubic-bezier(.4,0,.2,1); z-index: 45;
}
.user-menu.open .user-menu-dropdown { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.user-menu-dropdown a, .user-menu-dropdown button {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--negro); text-decoration: none;
  padding: 10px 12px; border-radius: 8px; transition: background-color .15s ease;
}
.user-menu-dropdown a:hover, .user-menu-dropdown button:hover { background: var(--crema); }
.user-menu-dropdown #btnLogout { color: #c0392b; }
.user-menu-divider { height: 1px; background: var(--borde); margin: 4px 0; }

/* --- Hamburguesa / menú mobile (mismo patrón que index.html) --------------
   En páginas con sesión iniciada, #navAuthArea puede traer 5-6 botones
   ("Mi calendario", "Mis códigos", "Mi perfil", "Cerrar sesión"...): sin
   esto, todos quedaban sueltos y visibles arriba del contenido en mobile. */
.hamburger { display: none; position: relative; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer; padding: 0; z-index: 60; flex-shrink: 0; }
.hamburger span { position: absolute; left: 12px; right: 12px; height: 2.5px; background: var(--negro); border-radius: 2px; transition: transform .3s ease, opacity .2s ease, top .3s ease; }
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }
.hamburger.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.menu-overlay { position: fixed; inset: 0; background: rgba(25,23,20,0.45); opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 35; }
.menu-overlay.show { opacity: 1; pointer-events: auto; }

.mobile-menu { position: fixed; top: 0; right: -340px; height: 100dvh; width: min(80vw, 320px); background: var(--crema); box-shadow: -12px 0 34px rgba(25,23,20,0.18); transition: right .35s cubic-bezier(.4,0,.2,1); z-index: 50; padding: 90px 28px 32px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.mobile-menu.open { right: 0; }
.mobile-menu a { font-size: 16px; font-weight: 600; padding: 15px 2px; border-bottom: 1px solid var(--borde); text-decoration: none; color: var(--negro); }
.mobile-menu .btn { width: 100%; text-align: center; margin-top: 20px; }
.mobile-auth { display: flex; flex-direction: column; }
.mobile-auth .nav-usuario { padding: 4px 2px 15px; border-bottom: 1px solid var(--borde); margin-bottom: 6px; width: auto; text-align: left; }
body.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  /* !important a propósito: .nav-cta comparte especificidad con .btn/.btn.ghost
     (una clase cada uno), que se definen más abajo en este archivo — sin esto,
     esas reglas ganan por orden de aparición y los botones nunca se ocultan. */
  .nav-cta { display: none !important; }
  .hamburger { display: block; }
}

/* --- Contenedor central --- */
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
  background: #fff; border: 1px solid var(--borde); border-radius: 18px;
  padding: 40px 36px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 50px rgba(25,23,20,0.08);
}
.auth-card h1 { font-size: 26px; font-weight: 900; letter-spacing: -0.6px; margin-bottom: 6px; }
.auth-card .sub { font-size: 14px; color: var(--gris); margin-bottom: 28px; line-height: 1.5; }

.campo { margin-bottom: 16px; }
.campo label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.campo .fila-doble { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.campo input {
  width: 100%; font-family: inherit; font-size: 14px; padding: 11px 14px;
  border-radius: 9px; border: 1.5px solid var(--borde); background: var(--crema);
  color: var(--negro); transition: border-color .2s ease, box-shadow .2s ease;
}
.campo input:focus { outline: none; border-color: var(--naranja); box-shadow: 0 0 0 3px rgba(232,80,26,0.12); }
.campo input.invalido { border-color: #c0392b; }
.campo .error-msg { display: none; font-size: 12px; color: #c0392b; margin-top: 5px; }
.campo .error-msg.show { display: block; }
.campo .ayuda { font-size: 12px; color: var(--gris); margin-top: 5px; }

.password-wrap { position: relative; }
.password-wrap .toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--gris); font-size: 12px; font-weight: 600;
  font-family: inherit; padding: 4px 6px;
}
.fuerza-pass { display: flex; gap: 4px; margin-top: 8px; }
.fuerza-pass span { height: 4px; flex: 1; border-radius: 2px; background: var(--borde); transition: background .25s ease; }
.fuerza-pass.n1 span:nth-child(1) { background: #c0392b; }
.fuerza-pass.n2 span:nth-child(-n+2) { background: #e67e22; }
.fuerza-pass.n3 span:nth-child(-n+3) { background: #f1c40f; }
.fuerza-pass.n4 span:nth-child(-n+4) { background: #27ae60; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--naranja-boton); color: #fff; font-weight: 700; font-size: 14px;
  padding: 13px 20px; border-radius: 9px; border: none; cursor: pointer;
  font-family: inherit; transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(232,80,26,0.3); }
.btn:active { transform: translateY(0) scale(.96); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-block { width: 100%; }
.btn.ghost { background: transparent; color: var(--negro); border: 1.5px solid var(--negro); }
.btn.ghost:hover { box-shadow: none; background: var(--negro); color: #fff; }
.btn.small { padding: 8px 14px; font-size: 13px; }

.divisor { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--gris); font-size: 12px; }
.divisor::before, .divisor::after { content: ""; flex: 1; height: 1px; background: var(--borde); }

#googleBtnWrap { display: flex; justify-content: center; }

.auth-footer { text-align: center; font-size: 13px; color: var(--gris); margin-top: 22px; }
.auth-footer a { color: var(--naranja); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.mensaje-global {
  display: none; font-size: 13px; font-weight: 600; padding: 12px 14px; border-radius: 9px; margin-bottom: 18px;
}
.mensaje-global.show { display: block; }
.mensaje-global.error { background: #fceceb; color: #c0392b; }
.mensaje-global.exito { background: #eaf6ec; color: #1e7d38; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff;
  animation: girar .7s linear infinite; display: none;
}
.btn.cargando .spinner { display: inline-block; }
.btn.cargando .btn-texto { opacity: .85; }
@keyframes girar { to { transform: rotate(360deg); } }

.icono-resultado { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.icono-resultado.exito { background: #eaf6ec; color: #1e7d38; }
.icono-resultado.error { background: #fceceb; color: #c0392b; }
.icono-resultado svg { width: 30px; height: 30px; }
.auth-card.centrado { text-align: center; }

@media (max-width: 480px) {
  .auth-card { padding: 32px 22px; }
  .campo .fila-doble { grid-template-columns: 1fr; gap: 0; }
}

/* --- Perfil --- */
.auth-card.ancho { max-width: 640px; }
.perfil-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--naranja); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; margin-bottom: 16px; }
.perfil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.perfil-item span { display: block; font-size: 12px; color: var(--gris); margin-bottom: 4px; }
.perfil-item b { font-size: 14px; color: var(--negro); }
.seccion-titulo { font-size: 15px; font-weight: 800; margin: 28px 0 12px; }

.membresia-card { background: var(--crema); border: 1px solid var(--borde); border-radius: 14px; padding: 18px 20px; }
.membresia-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.membresia-cabeza b { font-size: 15px; }
.membresia-estado { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 10px; white-space: nowrap; }
.membresia-estado-authorized { background: #eaf6ec; color: #1e7d38; }
.membresia-estado-pending { background: #fdeae2; color: var(--naranja); }
.membresia-estado-cancelled { background: #f1eee7; color: var(--gris); }
.membresia-detalle { font-size: 13px; color: var(--gris); margin-bottom: 14px; }
.membresia-vacia { text-align: center; }
.membresia-vacia p { font-size: 14px; color: var(--gris); margin-bottom: 14px; }
.mensaje-membresia {
  margin-top: 12px; padding: 9px 12px; border-radius: 9px; font-size: 13px; font-weight: 600;
  background: #fceceb; color: #c0392b; display: none;
}
.mensaje-membresia.show { display: block; }

.btn-peligro { background: #c0392b; }
.btn-peligro:hover { box-shadow: 0 10px 22px rgba(192,57,43,0.3); }

.confirm-overlay {
  position: fixed; inset: 0; background: rgba(25,23,20,0.5);
  opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 80;
}
.confirm-overlay.show { opacity: 1; pointer-events: auto; }

.confirm-modal {
  position: fixed; top: 50%; left: 50%; width: min(90vw, 400px);
  background: #fff; border-radius: 20px; padding: 30px 26px 26px; text-align: center;
  box-shadow: 0 30px 60px rgba(25,23,20,0.3); z-index: 90;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) scale(.94);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}
.confirm-modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.confirm-modal-icono {
  width: 56px; height: 56px; border-radius: 50%; background: #fdeae2; color: var(--naranja);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.confirm-modal-icono svg { width: 28px; height: 28px; }
.confirm-modal h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 8px; }
.confirm-modal-sub { color: var(--gris); font-size: 13.5px; line-height: 1.55; margin-bottom: 24px; }
.confirm-modal-botones { display: flex; flex-direction: column-reverse; gap: 10px; }
.confirm-modal-botones .btn { width: 100%; }

@media (max-width: 480px) {
  .confirm-modal {
    top: auto; bottom: 0; left: 0; width: 100%; max-width: none;
    border-radius: 22px 22px 0 0; transform: translateY(100%);
  }
  .confirm-modal.show { transform: translateY(0); }
}

/* --- Mi calendario --- */
.cal-upsell { background: var(--crema); border: 1px solid var(--borde); border-radius: 14px; padding: 20px; margin-top: 8px; }
.cal-upsell p { font-size: 14px; color: var(--negro); font-weight: 600; margin-bottom: 16px; }
.cal-upsell-acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.cal-vacio { font-size: 14px; color: var(--gris); line-height: 1.6; }
.cal-vacio a, .auth-card .sub a { color: var(--naranja); font-weight: 600; text-decoration: none; }
.cal-vacio a:hover, .auth-card .sub a:hover { text-decoration: underline; }

.cal-lista { display: flex; flex-direction: column; gap: 10px; }
.cal-item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 56px 14px 14px;
  background: #fff; border: 1px solid var(--borde); border-radius: 14px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.cal-item:hover { border-color: #d9d0ba; box-shadow: 0 8px 20px rgba(25,23,20,0.06); }

.cal-fecha {
  flex-shrink: 0; width: 52px; text-align: center;
  background: var(--crema); border: 1px solid var(--borde); border-radius: 10px; padding: 8px 4px;
}
.cal-fecha b { display: block; font-size: 21px; font-weight: 900; color: var(--naranja); line-height: 1; }
.cal-fecha span { display: block; font-size: 10px; font-weight: 700; color: var(--gris); margin-top: 3px; letter-spacing: .4px; }

.cal-info { flex: 1; min-width: 0; }
.cal-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 5px; line-height: 1.3; }
.cal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cal-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 10px; background: #fdeae2; color: var(--naranja); white-space: nowrap; }
.cal-lugar { font-size: 12.5px; color: var(--gris); }
.cal-badge-pasado { font-size: 10px; font-weight: 700; color: var(--gris); background: var(--crema); padding: 2px 8px; border-radius: 10px; }

.cal-acciones { flex-shrink: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cal-acciones .btn { text-decoration: none; }
.cal-ics {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px; background: #fdeae2; color: var(--naranja);
  border-radius: 10px; font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.cal-ics svg { width: 18px; height: 18px; flex-shrink: 0; }
.cal-ics:hover { background: var(--naranja); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(232,80,26,0.25); }

.cal-quitar {
  position: absolute; top: 6px; right: 6px;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--gris); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.cal-quitar svg { width: 15px; height: 15px; }
.cal-quitar:hover, .cal-quitar:active { background: #fceceb; color: #c0392b; }

@media (max-width: 480px) {
  .cal-item { flex-wrap: wrap; padding: 14px 56px 14px 14px; }
  .cal-acciones { width: 100%; margin-left: 66px; }
}

/* Deslizar hacia cualquier lado para quitar el evento de mi calendario
   (además del ícono ×). El fondo rojo "Quitar" queda debajo de la
   tarjeta y se revela a medida que se corre, sin importar el sentido. */
.cal-swipe-wrap { position: relative; border-radius: 14px; overflow: hidden; }
.cal-swipe-fondo {
  position: absolute; inset: 0; background: #c0392b; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 13px; border-radius: 14px;
}
.cal-swipe-fondo svg { width: 18px; height: 18px; flex-shrink: 0; }
.cal-swipe-item {
  position: relative; background: #fff; touch-action: pan-y;
  transition: transform .25s ease;
}
.cal-swipe-item.cal-arrastrando { transition: none; }
.cal-swipe-item.cal-saliendo { transition: transform .2s ease, opacity .2s ease; opacity: 0; }

/* --- Mis códigos --- */
.cod-resumen { background: var(--crema); border: 1px solid var(--borde); border-radius: 12px; padding: 12px 16px; font-size: 13px; color: var(--negro); font-weight: 600; margin-bottom: 18px; }
.cod-icono {
  flex-shrink: 0; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  background: var(--crema); border: 1px solid var(--borde); border-radius: 10px; color: var(--naranja);
}
.cod-icono svg { width: 22px; height: 22px; }
.cod-codigo {
  font-family: 'Courier New', monospace; font-weight: 800; font-size: 14px; letter-spacing: 2px;
  background: var(--crema); padding: 2px 9px; border-radius: 7px; white-space: nowrap;
}
.cod-badge-vigente { font-size: 10px; font-weight: 700; color: #1e7d38; background: #eaf6ec; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.cod-badge-vencido { font-size: 10px; font-weight: 700; color: var(--gris); background: var(--crema); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }

/* Deslizar hacia la izquierda para borrar (además del ícono ×). El fondo
   rojo "Eliminar" vive debajo de la tarjeta y se revela a medida que la
   tarjeta se corre; si no se llega al umbral, vuelve a su lugar sola. */
.cod-swipe-wrap { position: relative; border-radius: 14px; overflow: hidden; }
.cod-swipe-fondo {
  position: absolute; inset: 0; background: #c0392b; color: #fff;
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 0 22px; font-weight: 700; font-size: 13px; border-radius: 14px;
}
.cod-swipe-fondo svg { width: 18px; height: 18px; flex-shrink: 0; }
.cod-swipe-item {
  position: relative; background: #fff; touch-action: pan-y;
  transition: transform .25s ease;
}
.cod-swipe-item.cod-arrastrando { transition: none; }
.cod-swipe-item.cod-saliendo { transition: transform .2s ease, opacity .2s ease; opacity: 0; }

/* --- Modal de QR (mismo componente que index.html) --- */
.qr-overlay {
  position: fixed; inset: 0; background: rgba(25,23,20,0.5);
  opacity: 0; pointer-events: none; transition: opacity .3s ease; z-index: 80;
}
.qr-overlay.show { opacity: 1; pointer-events: auto; }
.qr-modal {
  position: fixed; top: 50%; left: 50%; width: min(90vw, 400px); max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: 20px; padding: 32px 28px 28px; text-align: center;
  box-shadow: 0 30px 60px rgba(25,23,20,0.3); z-index: 90;
  opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%) scale(.94);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s ease;
}
.qr-modal.show { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.qr-modal-cerrar {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--crema); border: none; color: var(--gris); font-size: 20px; line-height: 1;
  cursor: pointer; transition: background .2s ease, color .2s ease;
}
.qr-modal-cerrar:hover { background: var(--negro); color: #fff; }
.qr-modal-icono-ok {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 14px;
  background: #eaf6ec; color: #1e7d38; display: flex; align-items: center; justify-content: center;
}
.qr-modal-icono-ok svg { width: 26px; height: 26px; }
.qr-modal h3 { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 4px; }
.qr-modal-sub { color: var(--gris); font-size: 13px; margin-bottom: 18px; }
.qr-modal-imagen { width: 200px; height: 200px; margin: 0 auto 16px; padding: 10px; background: #fff; border: 1px solid var(--borde); border-radius: 14px; }
.qr-modal-imagen img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.qr-modal-codigo { font-family: 'Courier New', monospace; font-weight: 800; font-size: 22px; letter-spacing: 4px; background: var(--crema); border-radius: 10px; padding: 8px 14px; margin-bottom: 12px; }
.qr-modal-vigencia { font-size: 12.5px; color: var(--gris); margin-bottom: 20px; }
.qr-modal-vigencia.vencido { color: #c0392b; font-weight: 700; }
.qr-modal-acciones { margin-bottom: 14px; }
.qr-modal-acciones .btn { width: 100%; text-decoration: none; }
.qr-modal-nota { font-size: 12px; color: var(--gris); }
.qr-modal-nota a { color: var(--naranja); font-weight: 600; text-decoration: none; }
.qr-modal-nota a:hover { text-decoration: underline; }
.qr-modal-ios-ayuda { font-size: 12px; color: var(--naranja); background: #fdeae2; border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }

@media (max-width: 600px) {
  .qr-modal {
    top: auto; bottom: 0; left: 0; width: 100%; max-width: none; max-height: 90vh;
    border-radius: 22px 22px 0 0; transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .3s ease;
  }
  .qr-modal.show { transform: translateY(0); }
}

/* --- Selector de deportes (tag-select) --- */
.tag-select { position: relative; }
.tag-select-control {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 46px; padding: 7px 38px 7px 8px; border-radius: 10px;
  border: 1.5px solid var(--borde); background: var(--crema); cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tag-select-control:hover { border-color: #c9c0a8; }
.tag-select-control:focus { outline: none; }
.tag-select.abierto .tag-select-control,
.tag-select-control:focus-visible {
  border-color: var(--naranja); box-shadow: 0 0 0 3px rgba(232,80,26,0.12);
}

.tag-select-placeholder { font-size: 14px; color: var(--gris); padding: 4px 6px; }

.tag-select-tag {
  display: inline-flex; align-items: center; gap: 6px; background: var(--negro); color: #fff;
  font-size: 13px; font-weight: 600; padding: 5px 6px 5px 12px; border-radius: 20px;
  animation: tagPop .18s cubic-bezier(.4,0,.2,1);
}
.tag-select-tag button {
  display: flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 50%; border: none; background: rgba(255,255,255,0.18); color: #fff;
  cursor: pointer; font-size: 13px; line-height: 1; padding: 0; transition: background .15s ease, transform .15s ease;
}
.tag-select-tag button:hover { background: var(--naranja); transform: scale(1.1); }
@keyframes tagPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

.tag-select-chevron { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--gris); pointer-events: none; transition: transform .25s cubic-bezier(.4,0,.2,1); }
.tag-select.abierto .tag-select-chevron { transform: translateY(-50%) rotate(180deg); }

.tag-select-dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 15;
  background: #fff; border: 1px solid var(--borde); border-radius: 12px;
  box-shadow: 0 18px 38px rgba(25,23,20,0.16); padding: 6px; max-height: 240px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .16s ease, transform .16s cubic-bezier(.4,0,.2,1);
}
.tag-select.abierto .tag-select-dropdown { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.tag-select-option {
  display: block; width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--negro); padding: 10px 12px; border-radius: 8px;
  transition: background .15s ease;
}
.tag-select-option:hover, .tag-select-option:focus-visible { background: var(--crema); outline: none; }
.tag-select-vacio { font-size: 13px; color: var(--gris); padding: 10px 12px; }

@media (max-width: 480px) {
  .perfil-grid { grid-template-columns: 1fr; }
}

/* --- Toast (mensajes de error no bloqueantes, reemplaza alert()) --------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--negro); color: #fff; font-size: 13px; font-weight: 600;
  padding: 12px 18px; border-radius: 10px; box-shadow: 0 12px 30px rgba(25,23,20,0.3);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 120;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
