@charset "UTF-8";
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Reset base */
html,
body,
h1,
h2,
h3,
p,
ul,
li,
figure,
figcaption {
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  margin: 0;
}

/* Listas */
ul,
ol {
  list-style: none;
}

/* Enlaces */
a {
  text-decoration: none;
  color: inherit;
}

/* Multimedia */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* Formularios */
input,
button,
textarea,
select {
  font: inherit;
  margin: 0;
}

button {
  background: none;
  border: none;
}

:root {
  --bg-main: #ffffff;
  --bg-surface: #fef8f8;
  --bg-muted: #f3e9ea;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-on-primary: #ffffff;
  --brand-primary: #6c2d3a;
  --brand-dark: #3f0f1a;
  --accent-green: #2ecc71;
  --accent-purple: #9b59b6;
  --alert: #f0d1a0;
  --accent-danger: #e74c3c;
  --accent-info: #3498db;
  --border-color: #e0e0e0;
  --desactivate-color: #b8b4b4;
  --c-yellow: #d59217;
  --c-yellow-rgb: 213, 146, 23;
  --c-green: #44b363;
  --c-green-rgb: 68, 179, 99;
  --c-red: #ff3150;
  --c-red-rgb: 255, 49, 80;
  --c-purple: #6a1d41;
  --c-purple-rgb: 106, 29, 65;
  --btn-edit: #4a6fa5;
  --btn-edit-hover: #3f5f8e;
  --btn-details: #d4a373;
  --btn-details-hover: #b88a5f;
  --btn-delete: #b23a48;
  --btn-delete-hover: #962f3b;
  --btn-function-accept: #5fa77a;
  --btn-function-accept-hover: #4f9168;
}

.dark-mode {
  --bg-main: #1a1214;
  --bg-surface: #2a1b1e;
  --bg-muted: #f0f0f0;
  --text-primary: #f0f0f0;
  --text-secondary: #b8a5a8;
  --text-on-primary: #f0f0f0;
  --brand-primary: #c87b7f;
  --brand-dark: #99595c;
  --accent-green: #27ae60;
  --accent-purple: #8e44ad;
  --alert: #b28946;
  --accent-danger: #c0392b;
  --accent-info: #2980b9;
  --border-color: #382527;
  --desactivate-color: #373435;
  --c-yellow: #dcb403;
  --c-yellow-rgb: 220, 180, 3;
  --c-green: #06d970;
  --c-green-rgb: 6, 217, 112;
  --c-red: #d95659;
  --c-red-rgb: 217, 86, 89;
  --c-purple: #d08084;
  --c-purple-rgb: 208, 128, 132;
  --btn-edit: #6f9bd1;
  --btn-edit-hover: #5c86bb;
  --btn-details: #e6b980;
  --btn-details-hover: #cfa76e;
  --btn-delete: #d96b75;
  --btn-delete-hover: #c45862;
  --btn-function-accept: #7fd1a3;
  --btn-function-accept-hover: #6bbc90;
}

/* Base body */
body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100vh;
  font-family: "Inter", Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
  overflow-x: hidden;
}

/* Header */
header {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
}
header nav {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
header nav a {
  text-decoration: none;
  color: var(--brand-dark);
  font-weight: 500;
}
header nav a:hover {
  color: var(--brand-primary);
  border-bottom: 1px solid var(--brand-dark);
}
header nav > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
header nav > div button {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  padding: 0.5rem 0.1rem;
}
header nav > div button:last-child {
  color: var(--text-on-primary);
}

/* Footer */
footer {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  padding: 3rem 2rem 1rem;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
}
footer section {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 2rem;
}
footer h3 {
  color: var(--brand-primary);
}
footer h4 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
footer ul {
  list-style: none;
  padding: 0;
}
footer li {
  margin: 0.4rem 0;
}
footer a {
  text-decoration: none;
  color: var(--text-primary);
}
footer a:hover {
  color: var(--brand-primary);
}
footer p {
  text-align: center;
  font-size: 0.9rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.user-menu-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* Botones login/register para usuarios no autenticados */
.auth-header-btns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-header-login {
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-header-register {
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

#user-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 1000;
}

#user-dropdown a,
#display-username {
  padding: 0.7rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

#user-dropdown a:hover,
#display-username:hover {
  background-color: var(--brand-primary);
  color: var(--bg-main);
  cursor: pointer;
}

#user-dropdown.visible {
  display: flex;
}

/* Sidebar del usuario   */
.sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  right: 0;
  background: linear-gradient(to bottom, var(--brand-primary), var(--brand-dark));
  overflow-x: hidden;
  transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  padding-top: 6rem;
  z-index: 9999;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}

.sidebar a {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  color: var(--bg-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  letter-spacing: 0.5px;
  width: 100%;
  text-align: left;
}

.sidebar a:hover {
  color: var(--bg-main) !important;
  background-color: var(--brand-dark);
  border-left: 4px solid var(--bg-main);
  padding-left: 3rem;
  border-bottom: none;
}

.sidebar .closebtn {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 2.5rem;
  color: var(--bg-main);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.sidebar .closebtn:hover {
  transform: rotate(90deg) scale(1.1);
}

/* Logo */
.logo-container a {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-container a:hover {
  border-bottom: none;
}
.logo-container img {
  height: 40px;
  width: auto;
  margin-right: 8px;
}
.logo-container span {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-primary);
}

/* Main */
main {
  display: flex;
  flex-direction: column;
  /* Apilar secciones verticalmente */
  background-color: var(--bg-surface);
  width: 100%;
  flex: 1;
}

/* Primera sección */
main section:first-of-type {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem 3rem;
}
main section:first-of-type p:first-child {
  color: var(--brand-primary);
  margin-bottom: 1rem;
  font-weight: 500;
}
main section:first-of-type h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--brand-dark);
}
main section:first-of-type p:nth-of-type(2) {
  max-width: 600px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  color: var(--brand-primary);
}
main section:first-of-type div {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
main section:first-of-type button {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid var(--brand-primary);
  background: var(--bg-main);
  font-weight: 600;
}
main section:first-of-type button:first-child {
  background: var(--brand-primary);
  color: var(--text-on-primary);
}
main section:first-of-type button:hover {
  opacity: 0.9;
}

.grid-activities {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 1rem;
}

.grid-activities article {
  width: calc(30vw - 1rem);
  height: calc(85vh - 1rem);
}

.grid-activities p a {
  color: var(--c-yellow);
  text-decoration: underline;
}

/* Características y demás secciones */
main section {
  display: flex;
  flex-direction: column;
  /* Cada sección apilada */
  align-items: center;
  gap: 2rem;
  padding: 3rem 2rem;
}

/* Opcional: si quieres los cards en fila dentro de una sección */
.features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

/* Estadísticas */
.stats div {
  text-align: center;
}

.activity {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 440px;
}

.menu-toggle {
  color: var(--brand-dark);
  display: none;
}

.invisible {
  display: none;
}

.visible {
  display: flex;
}

#gridActivitiesFinished {
  display: none;
}
#gridActivitiesFinished.visible {
  display: flex;
}

#btn-state {
  all: unset;
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  padding: 0.4rem;
  cursor: pointer;
}

@media (max-width: 1200px) {
  header nav {
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  header {
    /* Botón hamburguesa */
  }
  header .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
  }
  header {
    /* Ocultar menú y acciones por defecto */
  }
  header nav ul,
  header nav .icons {
    display: none;
    width: 100%;
  }
  header {
    /* Menú abierto */
  }
  header nav.open ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
  }
  header nav.open .icons {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }
  .logo-container span {
    font-size: 1.4rem;
  }
  main section:first-of-type {
    padding: 2.5rem 1rem;
  }
  main section:first-of-type h1 {
    font-size: 2rem;
  }
  main section:first-of-type p:nth-of-type(2) {
    font-size: 1rem;
  }
  main section {
    padding: 2rem 1rem;
  }
  footer section {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
  }
}
.loading-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--border-color);
  font-size: 0.9rem;
  padding: 8px 0;
}

.loading-spinner .fa-spinner {
  color: var(--bg-main);
}

/* ============================================================
   Overlay fallback — Login / Register
   Usado cuando el servidor PHP redirige a loginView/register.
   El modal JS (auth-modal.js) es el flujo principal en cliente.
   ============================================================ */
/* Overlay de página completa */
.first {
  inset: 0;
  display: flex;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  z-index: 1000;
  animation: overlayFadeIn 0.2s ease forwards;
  justify-content: center;
}

@keyframes overlayFadeIn {
  from {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
  to {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(5px);
  }
}
/* Contenedor del formulario */
.container {
  position: relative;
  margin: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 440px;
  animation: modalPopIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.container .close-btn {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 50%;
}
.container .close-btn:hover {
  color: var(--accent-danger);
  transform: scale(1.15);
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
/* Encabezado */
.header-form h1 {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: var(--brand-dark);
}
.header-form p {
  font-size: 1.0625rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* Login / Register */
.tab-switch {
  display: flex;
  background-color: var(--bg-main);
  border-radius: 2rem;
  padding: 0.3rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tab-switch .tab-btn {
  background-color: var(--bg-main);
  color: var(--text-secondary);
  border-radius: 2rem;
  padding: clamp(0.6rem, 2vw, 0.9rem) clamp(1rem, 3vw, 1.3rem);
  border-color: var(--border-color);
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: background-color 0.2s;
  flex-grow: 1;
  font-weight: bold;
  font-size: 1.125rem;
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 0.125rem 0.3rem rgba(0, 0, 0, 0.1);
}
.tab-switch .tab-btn.active {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.tab-switch-home {
  display: flex;
  background-color: var(--bg-surface);
  padding: 0.3rem;
  justify-content: center;
  gap: 0.5rem;
  padding-top: 1rem;
}
.tab-switch-home .tab-btn {
  background-color: var(--bg-main);
  color: var(--text-secondary);
  border-radius: 2rem;
  padding: clamp(0.6rem, 2vw, 0.9rem) clamp(1rem, 3vw, 1.3rem);
  border-color: var(--border-color);
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: background-color 0.2s;
  font-weight: bold;
  transition: all 0.3s ease;
  border: 1px solid;
  border-color: var(--border-color);
  box-shadow: 0 0.125rem 0.3rem rgba(0, 0, 0, 0.1);
  margin: 0;
}
.tab-switch-home .tab-btn.active {
  background-color: var(--brand-primary);
  color: var(--bg-main);
}

/* Input group */
.input-group {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: 0;
  padding: 0.4rem 0.6rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  transition: border-color 0.3s;
}
.input-group:focus-within {
  border-color: var(--brand-primary);
}
.input-group input {
  flex-grow: 1;
  padding: 0.8rem 0.6rem;
  border: none;
  outline: none;
  font-size: 1.0625rem;
  background: none;
  color: var(--text-secondary);
}
.input-group input::placeholder {
  color: var(--text-secondary);
}
.input-group p {
  flex-grow: 1;
  padding: 0.8rem 0.6rem;
  border: none;
  outline: none;
  font-size: 1.0625rem;
  background: none;
  color: var(--text-secondary);
}
.input-group .icon,
.input-group .eye-icon {
  color: var(--text-secondary);
  font-size: 1.125rem;
  width: 1.5rem;
  text-align: center;
}
.input-group .eye-icon {
  cursor: pointer;
}

.links {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  align-items: center;
  margin-top: 1rem;
}
.links a:hover {
  color: var(--brand-primary);
}

/* Enviar */
.submit-btn {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.75rem;
  border-color: var(--border-color);
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: background-color 0.2s;
  width: 100%;
  margin-top: 0.75rem;
  background-color: var(--brand-dark);
  color: var(--bg-main);
  text-align: center;
}

/* Info message */
.info-message {
  background-color: var(--bg-main);
  border-left: 4px solid var(--brand-primary);
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.info-message i {
  color: var(--brand-primary);
  font-size: 1.25rem;
}
.info-message span {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* Link button */
.link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
  margin-top: 1rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.3s ease;
  width: 100%;
  justify-content: center;
}
.link-btn:hover {
  color: var(--brand-primary);
}
.link-btn i {
  font-size: 0.9rem;
}

/* Lista usuarios */
.user-list {
  padding: 0;
  margin-bottom: 2rem;
}
.user-list li {
  background-color: var(--bg-main);
  margin: 0.6rem 0;
  padding: 0.75rem;
  border-radius: 0.5rem;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: background-color 0.3s;
}

/* Contenedor del input de contraseña */
.div-password {
  position: relative;
  width: 100%;
}
.div-password input {
  width: 100%;
  padding-right: 40px;
  box-sizing: border-box;
}
.div-password #toggle-password,
.div-password .toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.div-password #toggle-password:hover,
.div-password .toggle-password:hover {
  color: var(--brand-primary);
}
.div-password #toggle-password i,
.div-password .toggle-password i {
  pointer-events: none;
}

.forgot-password-form {
  padding: 1rem;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.profile-avatar-section .profile-avatar-wrapper {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}
.profile-avatar-section .profile-avatar-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}
.profile-avatar-section .profile-avatar-wrapper:hover .profile-avatar-overlay {
  opacity: 1;
}
.profile-avatar-section .profile-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-section .profile-avatar-wrapper .profile-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.profile-avatar-section .profile-avatar-wrapper .profile-avatar-overlay i {
  color: var(--bg-main);
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.6rem;
  border-radius: 50%;
  backdrop-filter: blur(4px);
}
.profile-avatar-section .profile-avatar-hint {
  font-size: 0.85rem;
  color: var(--brand-primary);
  text-align: center;
  transition: color 0.2s ease;
}
.profile-avatar-section .profile-avatar-hint:hover {
  color: var(--brand-dark);
}

.current-image-card {
  background: linear-gradient(135deg, var(--bg-main) 0%, color-mix(in srgb, var(--brand-primary) 6%, var(--bg-main)) 100%);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.current-image-card .current-image-preview {
  position: relative;
  width: fit-content;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}
.current-image-card .current-image-preview img {
  display: block;
  width: 180px;
  height: 130px;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.current-image-card .current-image-preview .current-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
}
.current-image-card .current-image-preview .current-image-overlay i {
  font-size: 1.4rem;
}
.current-image-card .current-image-preview .current-image-overlay span {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.current-image-card .current-image-preview:hover img {
  transform: scale(1.06);
}
.current-image-card .current-image-preview:hover .current-image-overlay {
  opacity: 1;
}
.current-image-card .current-image-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}
.current-image-card .current-image-hint i {
  color: var(--brand-primary);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(0px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
  cursor: pointer;
}
.lightbox-overlay.active {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}
.lightbox-overlay.active .lightbox-content {
  transform: scale(1);
  opacity: 1;
}
.lightbox-overlay .lightbox-content {
  position: relative;
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  cursor: default;
}
.lightbox-overlay .lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: block;
}
.lightbox-overlay .lightbox-close {
  position: absolute;
  top: -1rem;
  right: -1rem;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: none;
  background: var(--brand-dark);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 1;
}
.lightbox-overlay .lightbox-close:hover {
  transform: scale(1.1) rotate(90deg);
  background: var(--brand-primary);
}

/* Responsive — modal en pantallas pequeñas */
@media (max-width: 576px), (max-height: 700px) {
  .first {
    align-items: flex-start;
    justify-content: center;
    padding: 1rem 0.75rem;
  }
  .container {
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    border-radius: 1rem;
  }
  .header-form h1 {
    font-size: 1.35rem;
  }
  .header-form p {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
  .tab-switch {
    margin-bottom: 1.25rem;
  }
  .tab-switch .tab-btn {
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
  }
  .submit-btn {
    font-size: 1.05rem;
  }
}
/* ============================================================
   Auth Modal Global (auth-modal.js)
   Se inyecta dinámicamente en cualquier página
   ============================================================ */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  z-index: 9000;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  overflow-y: auto;
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}
.auth-modal-overlay.auth-modal-visible {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.auth-modal-overlay.auth-modal-visible .auth-modal-container {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.auth-modal-container {
  margin: auto 0;
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 440px;
  opacity: 0;
  transform: scale(0.9) translateY(12px);
  transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.auth-modal-container .auth-modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease, transform 0.2s ease;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 50%;
}
.auth-modal-container .auth-modal-close:hover {
  color: var(--accent-danger);
  transform: scale(1.15);
}
.auth-modal-container .user-type-group {
  display: flex;
  flex-direction: row;
}

/* Responsive — auth modal en móviles */
@media (max-width: 576px) {
  .auth-modal-overlay {
    align-items: flex-start;
    padding: 1rem 0.75rem;
  }
  .auth-modal-container {
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    border-radius: 1rem;
  }
}
/* Enlace "¿Olvidaste tu contraseña?" */
.forgot-password {
  display: block;
  text-align: left;
  color: var(--brand-primary);
  font-size: 14px;
  font-weight: bold;
  margin-top: 5px;
  margin-bottom: 25px;
  text-decoration: none;
  transition: color 0.2s;
}
.forgot-password:hover {
  text-decoration: underline;
}

/* Grupo tipo de usuario */
.user-type-group {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
  margin: 1rem 0.75rem 0.3rem;
  border: none;
}
.user-type-group .option {
  flex: 1;
}
.user-type-group input[type=radio] {
  display: none;
}
.user-type-group input[type=radio]:checked + .user-type-card {
  background-color: var(--bg-surface);
  border-color: var(--brand-primary);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}
.user-type-group input[type=radio]:checked + .user-type-card .icon {
  color: var(--brand-primary);
}

/* Tarjeta tipo usuario */
.user-type-card {
  display: block;
  width: 83%;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 5% 4%;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}
.user-type-card .icon {
  font-size: 26px;
  margin-bottom: 10px;
  color: var(--text-secondary);
}
.user-type-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-primary);
}
.user-type-card p {
  font-size: 13px;
  margin-top: 5px;
  color: var(--text-secondary);
}
.user-type-card:hover {
  border-color: var(--brand-primary);
}

.users {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: var(--bg-surface);
}

.user-card {
  background-color: var(--bg-main);
  border-radius: 12px;
  margin: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 1.5rem 2rem;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.user-card.inactive {
  opacity: 0.6;
  filter: grayscale(0.7);
}
.user-card .user-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-main);
  padding-left: 0;
}
.user-card .user-header .username-role {
  display: flex;
  flex-direction: row;
  gap: 0.6rem;
}
.user-card .user-header .username-role .username {
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0;
}
.user-card .user-header .username-role .role {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary);
}
.user-card .user-header .btn-toggle {
  background-color: var(--brand-dark);
  border: none;
  border-radius: 20px;
  color: var(--text-on-primary);
  padding: 0.3rem 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
  background-color: var(--alert);
  border-color: var(--c-yellow);
}
.user-card .vac-data {
  background-color: var(--bg-surface);
  padding: 1rem;
  border-radius: 8px;
  color: var(--text-primary);
  margin: 0.2rem;
  display: none;
}
.user-card .vac-data h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-style: italic;
}
.user-card .vac-data p {
  color: var(--text-secondary);
}
.user-card .alert-message {
  background-color: #ffe5e5;
  border-left: 5px solid #dc3545;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  color: #a00;
}

.buttons .btn {
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: solid 1px;
  border-color: var(--text-secondary);
}

.user-avatar-wrapper {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  align-self: center;
}
.user-avatar-wrapper:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}
.user-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-avatar-wrapper .user-avatar--placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-avatar-wrapper .user-avatar--placeholder i {
  color: var(--brand-dark);
  font-size: 1.1rem;
}

/* Switch del tema */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch input:checked + .slider {
  background-color: var(--brand-primary);
}
.switch input:checked + .slider::before {
  transform: translateX(24px);
}

.switch.top-right {
  position: fixed;
  top: 2.5rem;
  right: 2.5rem;
  z-index: 1000;
}

/* Parte deslizante */
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-muted);
  transition: 0.4s;
  border-radius: 26px;
}
.slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-on-primary);
  transition: 0.4s;
  border-radius: 50%;
}

/* =========================
   Contenedores y Layout Global
========================= */
.container-home {
  background-color: var(--bg-surface);
  width: 100%;
  max-width: 100%;
  position: relative;
  box-sizing: border-box;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  align-items: stretch;
  margin-bottom: 2rem;
}
.filters #filterInput {
  flex: 3;
}
.filters input[type=text],
.filters select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text-primary);
  box-sizing: border-box;
}
.filters select {
  flex: 1;
  appearance: none;
}

/* =========================
   Componentes: Tarjeta Actividad
========================= */
.activity {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 370px;
  position: relative;
  background-color: var(--bg-surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.activity:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}
.activity {
  /* ---------- Imagen ---------- */
}
.activity .activity-image {
  position: relative;
  min-height: 200px;
  max-height: 240px;
  overflow: hidden;
}
.activity .activity-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.activity .activity-image .tag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.3rem 0.8rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-on-primary);
}
.activity .activity-image .tag.destacado {
  background-color: var(--accent-green);
}
.activity .activity-image .tag.nuevo {
  background-color: var(--accent-purple);
}
.activity {
  /* ---------- Contenido ---------- */
}
.activity .activity-content {
  min-width: 370px;
  flex: 1;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.activity .activity-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.activity .activity-content p {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.activity .activity-content .details {
  list-style: none;
  padding: 0;
  margin: 0 0 0.3rem;
  font-size: 0.9rem;
}
.activity .activity-content .details li {
  margin-bottom: 0.25rem;
}
.activity .activity-content .price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-top: auto;
  margin-bottom: 1rem;
}
.activity .activity-content .actions {
  display: flex;
  gap: 0.5rem;
}
.activity .activity-content .actions button,
.activity .activity-content .actions a {
  flex: 1;
}
.activity .activity-content .actions .btn-detail {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-radius: 10px;
  padding: 0.75rem;
  border-color: var(--border-color);
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: background-color 0.2s;
  background-color: var(--btn-details);
  color: whitesmoke;
  border: 1px solid var(--btn-details-hover);
  flex: 1;
}
.activity .activity-content .actions .btn-detail:hover {
  background-color: var(--btn-details-hover);
}
.activity .activity-content .actions .btn-signup {
  background-color: var(--brand-primary);
  color: whitesmoke;
  border-radius: 10px;
  padding: 0.75rem;
  border-color: var(--border-color);
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: background-color 0.2s;
  flex: 1;
}
.activity .activity-content .actions .btn-signup.enrolled {
  background-color: var(--desactivate-color);
}
.activity .activity-content.desactivate {
  background-color: var(--desactivate-color);
  opacity: 0.55;
}
.activity .activity-content .category {
  display: block;
  position: absolute;
  top: 0.5rem;
  left: 0.7rem;
  background-color: var(--alert);
  border: solid 1px var(--c-yellow);
  border-radius: 2rem;
  padding: 0.4rem;
}
.activity .activity-content .state {
  display: block;
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  padding: 0.4rem;
}
.activity .activity-content i {
  color: var(--brand-dark);
}
.activity .activity-content .state i.fa-hourglass-half {
  display: inline-block;
  animation: spin 3s linear infinite;
}
.activity .activity-content .state i.fa-check-double {
  display: inline-block;
  opacity: 0;
  transform: scale(0.5);
  animation: popIn 0.5s forwards;
}

.btn-edit {
  background-color: var(--btn-edit) !important;
  color: whitesmoke;
  border: 1px solid var(--btn-edit-hover) !important;
}
.btn-edit:hover {
  background-color: var(--btn-edit-hover) !important;
}

.btn-delete {
  background-color: var(--btn-delete) !important;
  color: whitesmoke;
  border: 1px solid var(--btn-delete-hover) !important;
}
.btn-delete:hover {
  background-color: var(--btn-delete-hover) !important;
}

.btn-function.accept {
  background-color: var(--btn-function-accept);
  color: whitesmoke;
  border: 1px solid var(--btn-function-accept-hover);
}
.btn-function.accept:hover {
  background-color: var(--btn-function-accept-hover);
}
.btn-function.cancel {
  background-color: var(--btn-delete);
  color: whitesmoke;
  border: 1px solid var(--btn-delete-hover);
}
.btn-function.cancel:hover {
  background-color: var(--btn-delete-hover);
}

/* ---------- Keyframes ---------- */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.modalHome {
  position: fixed;
  display: none;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  color: var(--text-primary);
  overscroll-behavior: contain;
  transition: background-color 0.25s ease, backdrop-filter 0.25s ease;
}
.modalHome[style*=flex] {
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.modalHome .modal-content {
  background-color: var(--bg-main);
  border-radius: 16px;
  width: 92%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding-top: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  animation: modalHomePopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.modalHome .modal-content .modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  cursor: pointer;
  font-size: 1.5rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
  line-height: 1;
}
.modalHome .modal-content .modal-close:hover {
  color: var(--accent-danger, #e74c3c);
  background-color: rgba(231, 76, 60, 0.1);
}
.modalHome .modal-content .modal-header-activity {
  margin-bottom: 1rem;
  color: var(--text-primary);
  padding: 1rem 1rem 0;
}
.modalHome .modal-content .modal-header-activity h2 {
  font-size: 1.3rem;
  padding-bottom: 0.75rem;
  padding-right: 2.5rem;
  /* espacio para el botón de cierre */
}
.modalHome .modal-content .modal-header-activity .category {
  background-color: var(--alert);
  border: solid 1px var(--c-yellow);
  border-radius: 2rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.modalHome .modal-content .modal-tabs {
  display: flex;
  background-color: var(--bg-surface);
  border-radius: 2rem;
  padding: 0.4rem;
  margin: 0 1rem 1.25rem;
}
.modalHome .modal-content .modal-tabs .tab-btn {
  background-color: transparent;
  color: var(--text-secondary);
  border-radius: 2rem;
  padding: clamp(0.6rem, 2vw, 0.9rem) clamp(1rem, 3vw, 1.3rem);
  border-color: var(--border-color);
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: background-color 0.2s;
  flex-grow: 1;
  font-weight: bold;
  font-size: 1rem;
  transition: all 0.25s ease;
  text-align: center;
}
.modalHome .modal-content .modal-tabs .tab-btn.active {
  background-color: var(--brand-primary);
  color: var(--text-on-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.modalHome .modal-content .modal-body .modal-image img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  margin-bottom: 1rem;
}
.modalHome .modal-content .modal-body .modal-description {
  margin-bottom: 1rem;
  background: var(--bg-surface);
  padding: 1rem;
  border-radius: 8px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.modalHome .modal-content .modal-body .modal-info,
.modalHome .modal-content .modal-body .modal-info-aditional {
  background: var(--bg-surface);
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.modalHome .modal-content .modal-body .modal-info p,
.modalHome .modal-content .modal-body .modal-info-aditional p {
  margin: 0.5rem 0;
  color: var(--text-primary);
  font-size: 0.9rem;
}
.modalHome .modal-content .modal-body .modal-info p .title,
.modalHome .modal-content .modal-body .modal-info-aditional p .title {
  display: block;
  margin-bottom: 0.2rem;
  font-weight: bold;
}
.modalHome .modal-content .modal-body .modal-info p .title i,
.modalHome .modal-content .modal-body .modal-info-aditional p .title i {
  margin-right: 0.3rem;
}
.modalHome .modal-content .modal-body .modal-info h3,
.modalHome .modal-content .modal-body .modal-info-aditional h3 {
  grid-column: span 2;
  margin: 0;
}
.modalHome .modal-content .modal-body .modal-info i,
.modalHome .modal-content .modal-body .modal-info-aditional i {
  color: var(--brand-dark);
}

@keyframes modalHomePopIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
#gridRegistrationsFinished {
  display: none;
}

#gridRegistrationsFinished.visible {
  display: flex;
}

#toggleFinished {
  background: var(--brand-primary);
  color: var(--text-on-primary);
}

/* =========================
   Responsive
========================= */
@media (max-width: 576px) {
  .filters {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  .filters input[type=text],
  .filters select,
  .filters .btn-filters {
    width: 100%;
    min-width: 100%;
  }
  .container-home {
    padding: 1.5rem 1rem;
  }
  .activity {
    border-radius: 16px;
  }
  .activity .activity-content {
    padding: 1rem;
    padding-top: 0rem;
  }
  .activity .activity-content .actions {
    flex-direction: column;
  }
  .btn-detail,
  .btn-signup,
  .btn-filters {
    min-height: 44px;
  }
}
/* Contenedor base */
.how-it-works {
  background-color: var(--bg-surface);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
}
.how-it-works a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--bg-main);
  border: 1px solid var(--brand-primary);
  border-radius: 2rem;
  padding: 0.5rem 1.2rem;
  color: var(--text-primary);
  font-size: 1rem;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  width: auto;
  min-width: 180px;
  margin: 2rem auto;
}
.how-it-works a i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--brand-primary);
  border-radius: 50%;
  color: var(--text-on-primary);
  font-size: 10px;
  flex-shrink: 0;
}
.how-it-works a:hover {
  color: var(--brand-dark);
}
.how-it-works {
  /* Encabezado */
}
.how-it-works .hiw-header {
  text-align: center;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
.how-it-works .hiw-header h1 {
  font-size: 2.4rem;
  color: var(--brand-primary);
  font-weight: 700;
}
.how-it-works .hiw-header p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 1.1rem;
}
.how-it-works {
  /* Indicadores de paso */
}
.how-it-works .hiw-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 0 !important;
  padding-bottom: 1rem !important;
  padding-top: 1rem !important;
}
.how-it-works .hiw-steps .step-number {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
}
.how-it-works .hiw-steps .step-number:hover {
  background: var(--brand-dark);
  color: var(--text-on-primary);
}
.how-it-works .hiw-steps .step-number.active {
  background: var(--brand-primary);
  color: var(--text-on-primary);
}
.how-it-works {
  /* Tarjeta principal */
}
.how-it-works .hiw-card {
  width: 100%;
  max-width: 720px;
  min-width: 320px;
  margin: 0 auto;
  padding: 0;
  background: none;
  border-radius: 0;
  border: none !important;
}
.how-it-works .hiw-card-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg-main);
  border: 1.5px solid var(--brand-primary);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}
.how-it-works .hiw-card-content > div {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  flex-wrap: wrap;
}
.how-it-works .hiw-card h2 {
  color: var(--text-primary);
  font-weight: 700;
}
.how-it-works .hiw-card .subtitle {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.how-it-works {
  /* Lista */
}
.how-it-works .hiw-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.how-it-works .hiw-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.how-it-works .hiw-list li p {
  text-align: start;
}
.how-it-works .hiw-list div {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  background-color: var(--brand-primary);
  color: var(--bg-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.how-it-works .hiw-list div i {
  font-size: small;
}
.how-it-works {
  /* Botones participante / ofertante */
}
.how-it-works .tab-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
  background-color: var(--bg-surface);
  flex-wrap: wrap;
}
.how-it-works .tab-switch .tab-btn {
  padding: 12px 18px;
  min-width: 180px;
  font-weight: bold;
  font-size: 16px;
  border-radius: 16px;
  background-color: var(--bg-muted) !important;
  border: 2px solid var(--brand-primary) !important;
  color: var(--brand-primary) !important;
  transition: 0.2s ease;
}
.how-it-works .tab-switch .tab-btn.active {
  background-color: var(--brand-primary) !important;
  color: var(--bg-muted) !important;
  border-color: var(--brand-primary) !important;
}
.how-it-works .hiw-video-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 85vw;
  z-index: 1001;
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--bg-muted);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.how-it-works {
  /* ============================= */
  /* OVERLAY OSCURO */
  /* ============================= */
}
.how-it-works .hiw-video-wrapper::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: -1;
}
.how-it-works {
  /* ============================= */
  /* VIDEO */
  /* ============================= */
}
.how-it-works .hiw-video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  background-color: var(--bg-surface);
}
.how-it-works {
  /* ============================= */
  /* BOTÓN CERRAR */
  /* ============================= */
}
.how-it-works .hiw-video-wrapper .close-video {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  color: var(--brand-primary);
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}
.how-it-works {
  /* ============================= */
  /* CONTROLES */
  /* ============================= */
}
.how-it-works .hiw-video-wrapper .video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.7);
}
.how-it-works .hiw-video-wrapper .video-controls button.play {
  background-color: var(--brand-primary);
  border: none;
  color: var(--bg-surface);
  font-size: 1.2rem;
  border-radius: 50%;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.how-it-works .hiw-video-wrapper .video-controls button.play:hover {
  background-color: var(--brand-primary);
}
.how-it-works .hiw-video-wrapper .video-controls input[type=range] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-surface);
  cursor: pointer;
  border: none;
  outline: none;
}
.how-it-works .hiw-video-wrapper .video-controls .time {
  color: var(--bg-muted);
  font-size: 0.85rem;
  min-width: 40px;
  text-align: center;
}
.how-it-works .hiw-video-wrapper .video-controls .volume {
  max-width: 80px;
}

.docs {
  margin: 0;
}

/* =============================
   RESPONSIVE - how-it-works
   ============================= */
/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
  .how-it-works .hiw-card {
    max-width: 620px;
    padding: 0 1rem;
    /* margen lateral en tablet */
  }
}
@media (max-width: 768px) {
  .how-it-works .hiw-card {
    max-width: 100%;
    padding: 0 1.2rem;
  }
}
@media (max-width: 480px) {
  .how-it-works .hiw-card {
    padding: 0 0.8rem;
    box-sizing: border-box;
  }
  .how-it-works .tab-switch {
    flex-direction: column;
  }
  .how-it-works .tab-switch .tab-btn {
    width: 100%;
  }
}
/* =========================
   Slogan
========================= */
.slogan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  background-color: var(--bg-main);
  color: var(--brand-primary);
  padding: 0.6em 1.2em;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  font-weight: 400;
  width: fit-content;
  margin: 1em auto;
}
.slogan i {
  font-size: 1.2rem;
  color: var(--brand-primary);
}
.slogan p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* =========================
   Opciones
========================= */
.options {
  margin-top: 1.5rem;
}
.options button {
  color: var(--text-primary);
}

/* =========================
   Cards y Secciones principales
========================= */
main section:nth-of-type(2) {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 3rem 2rem;
}
main section:nth-of-type(2) article {
  background-color: var(--bg-surface);
  border: 1px solid var(--brand-primary);
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  box-sizing: border-box;
  width: 25%;
  text-align: center;
}
main section:nth-of-type(2) article h3 {
  color: var(--brand-primary);
  margin-bottom: 0.5rem;
}
main {
  /* Estadísticas */
}
main section:nth-of-type(3) {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}
main section:nth-of-type(3) div {
  text-align: center;
}
main section:nth-of-type(3) h2 {
  color: var(--brand-primary);
  font-size: 2rem;
}
main section:nth-of-type(3) p {
  color: var(--brand-primary);
}

/* =========================
   Iconos
========================= */
.icons {
  display: flex;
  align-items: center;
  gap: 1.8em;
}
.icons i {
  font-size: 1rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  padding: 1em;
  border-radius: 6px;
}
.icons i:hover {
  color: var(--brand-primary);
}

/* =========================
   Botones
========================= */
.btn-post {
  background-color: var(--brand-primary);
  color: var(--text-on-primary);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  border-color: var(--border-color);
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: background-color 0.2s;
}

/* =========================
   Características / Features
========================= */
.features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 2rem 0;
  background-color: var(--bg-surface);
}
.features .feature-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  padding: 1.5rem;
  box-sizing: border-box;
  width: 280px;
  text-align: center;
}
.features .feature-card .icon-circle {
  background-color: var(--bg-surface);
  color: var(--brand-primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.features .feature-card .icon-circle i {
  font-size: 1.5rem;
}
.features .feature-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.features .feature-card p {
  color: var(--text-primary);
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ================= HEADER ================= */
.header {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  padding: 2%;
  border-bottom: none;
}

.header-icon {
  background: var(--bg-muted);
  padding: 15px;
  border-radius: 50%;
  color: var(--brand-primary);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-content h1 {
  font-size: 26px;
  margin: 0;
}

.header-content p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ================= STATS ================= */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 0.5rem;
  margin-bottom: 2%;
  background-color: var(--bg-surface);
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 14px;
  position: relative;
}
.card h2 {
  font-size: 32px;
  margin-bottom: 4px;
}
.card p {
  font-weight: 600;
}
.card small {
  color: var(--text-secondary);
}
.card .icon {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 18px;
}

.pending {
  border: 2px solid var(--c-yellow);
  background-color: rgba(var(--c-yellow-rgb), 0.2);
}
.pending .icon {
  color: var(--c-yellow);
}

.approved {
  border: 2px solid var(--c-green);
  background-color: rgba(var(--c-green-rgb), 0.2);
}
.approved .icon {
  color: var(--c-green);
}

.rejected {
  border: 2px solid var(--c-red);
  background-color: rgba(var(--c-red-rgb), 0.2);
}
.rejected .icon {
  color: var(--c-red);
}

.total {
  border: 2px solid var(--c-purple);
  background-color: rgba(var(--c-purple-rgb), 0.2);
}
.total .icon {
  color: var(--c-purple);
}

/* ================= TAB SWITCH ================= */
.tab-switch .control {
  display: flex;
  gap: 2rem;
  align-items: center;
  font-size: 0.9rem;
  max-width: 11rem;
}

.control {
  margin-left: 1rem;
}
.control span {
  background: var(--brand-primary);
  color: var(--text-on-primary);
  padding: 2px 10px;
  border-radius: 1rem;
}

/* ================= ACTIVITIES ================= */
.activities {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 1rem;
}

/* ================= ACTIVITY CARD ================= */
.activity-control {
  display: flex;
  flex-wrap: wrap;
  background: var(--bg-surface);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* IMAGEN */
.activity-image-control {
  flex: 1 1 250px;
  max-height: 20rem;
  overflow: hidden;
}
.activity-image-control img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* INFO */
.activity-info {
  flex: 1 1 300px;
  min-width: 0;
  padding: 20px;
  align-content: center;
}

/* TAGS */
.tags {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.tag {
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tag.blue {
  background: rgba(52, 152, 219, 0.15);
  color: var(--accent-info);
}

.tag.orange {
  background: rgba(245, 176, 65, 0.2);
  color: var(--accent-warning);
}

/* TEXTOS */
.description {
  color: var(--text-secondary);
  margin: 10px 0;
  word-break: break-word;
}

.organizer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

/* META */
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.meta i {
  margin-right: 5px;
}

/* ================= ACTIONS ================= */
.actions-control {
  display: flex;
  gap: 15px;
  margin-top: auto;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.approve {
  background: var(--btn-function-accept);
  color: whitesmoke;
}
.approve:hover {
  background-color: var(--btn-function-accept-hover);
}

.reject {
  background: transparent;
  border: 1px solid var(--btn-delete);
  color: var(--btn-delete);
}
.reject:hover {
  background-color: var(--btn-delete-hover);
  color: whitesmoke;
}

.btn:disabled {
  background: var(--desactivate-color);
  border-color: none;
  cursor: not-allowed;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 600px) {
  .activity-control {
    flex-direction: column;
  }
  .activity-image-control {
    width: 100%;
    height: 200px;
    flex: unset;
  }
  .btn {
    flex: 1 1 100%;
  }
}
/* ============================================================
   Modal de confirmación — recuadro compacto centrado en pantalla
   Usa grid en lugar de flex para evitar conflictos con el body flex
   ============================================================ */
#modal-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
  z-index: 100000;
  display: none;
}
#modal-container.active {
  display: grid !important;
  /* grid centra sin conflictos con flex body */
  place-items: center !important;
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
#modal-container .modal {
  background: var(--bg-surface);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  width: auto;
  min-width: 220px;
  max-width: 340px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  animation: modalPopInConfirm 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
#modal-container .modal .modal-header {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}
#modal-container .modal .modal-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 0.25rem;
}
#modal-container .modal .modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: stretch;
}
#modal-container .modal .modal-actions button {
  flex: 1;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
#modal-container .modal .modal-actions button:active {
  transform: scale(0.96);
}
#modal-container .modal .modal-actions button.cancel {
  background: var(--bg-main);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
#modal-container .modal .modal-actions button.cancel:hover {
  background: var(--border-color);
}
#modal-container .modal .modal-actions button.confirm {
  background: var(--brand-dark);
  color: var(--text-on-primary);
}
#modal-container .modal .modal-actions button.confirm:hover {
  opacity: 0.85;
}

@keyframes overlayFadeInConfirm {
  from {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
  to {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
  }
}
@keyframes modalPopInConfirm {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}
/* Contenedor de la alerta — centrado arriba */
.alert-overlay {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  max-width: 380px;
  display: none;
  z-index: 10001;
  pointer-events: none;
}
.alert-overlay.active {
  display: flex !important;
  pointer-events: auto;
}

/* Caja de alerta */
.alert-box {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  border-radius: 14px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  animation-duration: 0.4s;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  pointer-events: all;
  border: 1px solid var(--border-color);
}
.alert-box .alert-header {
  font-weight: 700;
  font-size: 0.95rem;
}
.alert-box .alert-body {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
.alert-box .alert-body ul {
  padding-left: 18px;
  margin: 0;
  list-style: disc;
}
.alert-box .alert-body li {
  margin-bottom: 4px;
}
.alert-box .alert-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

/* Tipos de alertas */
.alert-overlay.info .alert-box {
  border-left: 4px solid var(--brand-primary);
}

.alert-overlay.success .alert-box {
  border-left: 4px solid var(--c-green);
}

.alert-overlay.error .alert-box {
  border-left: 4px solid var(--c-red);
}

.alert-overlay.warning .alert-box {
  border-left: 4px solid var(--c-yellow);
}

/* Página entera con fondo y padding para se pueda scrollear */
body:has(.form-activity) {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
  background-color: var(--bg-main);
}

/* Contenedor central de la página crear actividad */
.c {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
}

.create {
  border: none;
}

.alert {
  background: var(--alert);
  border: 1px solid var(--c-yellow);
  padding: 1rem 1.4rem;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 1.8rem;
}

.form-activity {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.form-activity label:has(+ input[required])::after,
.form-activity label:has(+ textarea[required])::after,
.form-activity label:has(+ select[required])::after {
  content: " *";
  color: var(--c-yellow);
  font-weight: bold;
}
.form-activity .full:has(input[type=file][required]) > label::after {
  content: " *";
  color: var(--c-yellow);
  font-weight: bold;
}

.full {
  grid-column: 1/-1;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  background-color: var(--bg-main);
  box-sizing: border-box;
  color: var(--text-primary);
}

textarea {
  color: var(--text-secondary);
  resize: vertical;
  min-height: 7rem;
}

.checkbox-group {
  grid-column: 1/-1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  margin-bottom: 0;
}

input[type=checkbox] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand-dark);
  cursor: pointer;
}

.upload-box {
  position: relative;
  overflow: hidden;
}

#image-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  display: none;
}

.upload-box {
  border: 2px dashed var(--brand-primary);
  border-radius: 10px;
  padding: 0.5rem;
  text-align: center;
  position: relative;
  max-width: 50%;
  margin: 0 auto;
}
.upload-box input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-content {
  color: var(--text-secondary);
}
.upload-content span {
  font-size: 14px;
  color: var(--desactivate-color);
}
.upload-content i {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

.actions {
  display: flex;
  margin-top: 20px;
  grid-column: 1/-1;
  justify-content: center;
}

.btn-submit {
  background-color: var(--brand-primary);
  color: var(--text-on-primary);
  border-radius: 10px;
  padding: 0.75rem;
  border-color: var(--border-color);
  cursor: pointer;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  box-sizing: border-box;
  transition: background-color 0.2s;
  flex: none;
  width: 30%;
  min-height: 44px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: none;
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background-color 0.2s, color 0.2s;
}
.back-btn:hover {
  background: var(--brand-primary);
  color: var(--text-on-primary);
  border-color: var(--brand-primary);
}

/* =========================
   Responsive — Tablet
========================= */
@media (max-width: 768px) {
  body:has(.form-activity) {
    padding: 1.5rem 1rem;
  }
  .btn-submit {
    width: 50%;
  }
}
/* =========================
   Responsive — Móvil
========================= */
@media (max-width: 576px) {
  body:has(.form-activity) {
    padding: 1rem 0.75rem;
  }
  .header-form h1 {
    font-size: 1.4rem;
  }
  .header-form p {
    font-size: 0.9rem;
  }
  .alert {
    font-size: 0.85rem;
    padding: 0.85rem 1rem;
  }
  .form-activity {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .full {
    grid-column: 1/-1;
  }
  input,
  textarea,
  select {
    font-size: 1rem; /* evita zoom automático en iOS */
    padding: 0.9rem 1rem;
  }
  .checkbox-group {
    flex-direction: column;
    gap: 1rem;
  }
  .checkbox-group label {
    white-space: normal; /* permite wrap en pantallas muy pequeñas */
  }
  .upload-box {
    padding: 1.5rem 1rem;
  }
  .current-image-card .current-image-preview {
    height: 140px;
  }
  .actions {
    flex-direction: column;
    gap: 1rem;
    justify-content: stretch;
    margin-top: 1rem;
  }
  .btn-submit,
  .btn-cancel {
    width: 100%;
    padding: 1rem 0;
    font-size: 1rem;
    min-height: 48px;
  }
}
/* =========================
   Responsive — Altura reducida (landscape móvil)
========================= */
@media (max-height: 700px) {
  .container {
    max-height: none !important;
  }
  .form-activity {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-height: 700px) and (max-width: 576px) {
  .form-activity {
    grid-template-columns: 1fr;
  }
}
.inactive-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: var(--bg-main);
}

.inactive-card {
  background-color: var(--bg-surface);
  border-radius: 1.5rem;
  padding: 3rem 2.5rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.inactive-icon {
  font-size: 4rem;
  color: var(--brand-primary);
  margin-bottom: 1.5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
.inactive-card h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.inactive-card .subtitle {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.inactive-card .username {
  font-weight: 600;
  color: var(--brand-primary);
}

.inactive-card .info-box {
  background: var(--alert);
  border: 1px solid var(--c-yellow);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(text-primary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.inactive-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn-inactive-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-inactive-logout:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-logout {
  background: var(--brand-primary);
  color: var(--bg-muted);
}

.btn-profile {
  background: var(--bg-main);
  color: var(--brand-dark);
}

.chat-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  min-height: 60px;
  width: 100%;
  box-sizing: border-box;
}
.chat-header--hidden {
  display: none;
}

.chat-back-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--brand-primary);
  padding: 0.4rem;
  border-radius: 8px;
  transition: background-color 0.2s;
}
.chat-back-btn:hover {
  background-color: var(--bg-muted);
}

.chat-header-info h1 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.chat-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.chat-messages-area {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.2rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: var(--bg-main);
  scroll-behavior: smooth;
  width: 100%;
  box-sizing: border-box;
}
.chat-messages-area--hidden {
  display: none !important;
}

.chat-header,
.chat-input-area {
  flex-shrink: 0;
}

.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
  color: var(--text-secondary);
  font-size: 0.95rem;
  text-align: center;
  padding: 2rem;
}
.chat-empty-state i {
  font-size: 2rem;
  opacity: 0.4;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chat-bubble {
  display: flex;
  flex-direction: column;
  max-width: 65%;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  line-height: 1.45;
  animation: bubbleIn 0.2s ease-out;
}
.chat-bubble--own {
  align-self: flex-end;
  background: var(--brand-primary);
  color: var(--text-on-primary);
  border-bottom-right-radius: 4px;
}
.chat-bubble--other {
  align-self: flex-start;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}
.chat-bubble__sender {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.75;
  margin-bottom: 0.2rem;
}
.chat-bubble__body {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5rem;
}
.chat-bubble__text {
  font-size: 0.95rem;
  word-break: break-word;
  margin: 0;
  flex: 1;
}
.chat-bubble__time {
  font-size: 0.68rem;
  opacity: 0.6;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-bubble--own .chat-bubble__text {
  color: var(--text-on-primary) !important;
}

.chat-bubble--other .chat-bubble__text {
  color: var(--text-primary) !important;
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.chat-input-area--hidden {
  display: none;
}

.chat-input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 22px;
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus {
  border-color: var(--brand-primary);
}
.chat-input::placeholder {
  color: var(--text-secondary);
}
.chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-muted);
}
.chat-input:disabled::placeholder {
  color: var(--text-secondary);
}

.chat-send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50% !important;
  background-color: var(--brand-primary) !important;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  flex-shrink: 0;
}
.chat-send-btn:hover {
  background-color: var(--brand-dark) !important;
}
.chat-send-btn:active {
  transform: scale(0.93);
}
.chat-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-muted);
  color: var(--text-secondary);
}
.chat-send-btn:disabled:hover {
  background: var(--bg-muted);
  transform: none;
}

.chat-readonly-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.75rem 1.2rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-align: center;
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.chat-readonly-notice i {
  color: var(--brand-primary);
  font-size: 0.9rem;
  flex-shrink: 0;
}

.btn-chat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--brand-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--brand-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.btn-chat:hover {
  background: var(--brand-primary);
  color: #fff;
}

.chat-admin-title {
  font-size: 1.3rem;
  font-weight: 700;
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  background: var(--bg-surface);
  margin: 0;
}

.chat-admin-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: var(--bg-main);
}

.chat-user-list-panel {
  width: 300px;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: var(--bg-surface);
  overflow-y: auto;
  flex-shrink: 0;
}

.chat-user-list-header {
  padding: 0.8rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  position: sticky;
  top: 0;
  z-index: 1;
}

.chat-user-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.chat-user-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  gap: 0.5rem;
  text-align: center;
}

.chat-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.15s;
  position: relative;
}
.chat-user-item:hover {
  background-color: var(--brand-dark);
}
.chat-user-item:hover .chat-user-item__name {
  color: var(--bg-main);
}
.chat-user-item--active {
  background: rgba(140, 30, 50, 0.08);
  border-left: 3px solid var(--brand-primary);
}
.chat-user-item--active .chat-user-item__name {
  color: var(--brand-primary);
}
.chat-user-item:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: -2px;
}
.chat-user-item__info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}
.chat-user-item__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-user-item__preview {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  min-height: 1em;
}
.chat-user-item__time {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-conversation-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-main);
  min-height: 0;
  width: 0;
  padding: 0rem !important;
}
.chat-conversation-panel .chat-header {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
}
.chat-conversation-panel .chat-header #chatSelectedUserName {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.chat-conversation-panel .chat-messages-area {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  background: var(--bg-main);
  padding: 1rem 1.5rem;
}
.chat-conversation-panel .chat-input-area {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 0.8rem 1.2rem;
}
.chat-conversation-panel .chat-readonly-notice {
  width: 100%;
  box-sizing: border-box;
}

.chat-no-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--text-secondary);
  gap: 1rem;
  font-size: 1rem;
  text-align: center;
  padding: 2rem;
  background: var(--bg-main);
}
.chat-no-selection i {
  font-size: 3.5rem;
  opacity: 0.25;
}

.chat-hub-page {
  padding-bottom: 2rem;
}

.chat-hub-page-select {
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-color);
  gap: 0.5rem;
  /* 👇 tamaño del contenedor */
  width: 100%;
  max-width: 400px;
  height: 300px;
  /* o max-height */
  /* 👇 scroll */
  overflow: auto;
  /* vertical + horizontal si hace falta */
  min-height: 0;
  min-width: 0;
}

.chat-hub-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  justify-content: center;
}

.chat-hub-header i {
  font-size: 2rem;
  color: var(--brand-primary);
}

.chat-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 0.5rem;
}

.chat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-align: start !important;
  flex-shrink: 0;
}

.chat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  border-color: var(--brand-primary);
}

.chat-card--support {
  background: rgba(140, 30, 50, 0.05);
  border: 1px solid rgba(140, 30, 50, 0.3);
}

.chat-card__header {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-main);
}

.chat-card--support .chat-card__header {
  background: rgba(140, 30, 50, 0.05);
}

.chat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-main);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.chat-card__img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--bg-surface);
}

.chat-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: start !important;
}

.chat-card__type {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-align: start !important;
}

.chat-card--support .chat-card__type {
  color: var(--brand-primary);
}

.chat-card__body {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 0.5rem;
  background-color: var(--bg-main);
}

.chat-card__preview {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-top: 0.6rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.chat-card__preview::before {
  content: "\f075";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-right: 6px;
}

.chat-card__time {
  padding-left: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  opacity: 0.8;
  align-self: flex-end;
}

.chat-hub-loading {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.chat-hub-loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--brand-primary);
}

.chat-menu-container:has(#chat-dropdown.visible) #chat-btn i {
  color: var(--c-yellow);
}

.user-menu-container:has(#user-dropdown.visible) #user-btn {
  border: 2px solid var(--c-yellow);
}

#user-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

.chat-menu-container {
  position: relative;
  display: flex;
  align-items: center;
}

#chat-dropdown {
  position: absolute;
  top: calc(100% + 0.1rem);
  right: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  z-index: 1000;
  overflow: clip;
  contain: layout paint;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#chat-dropdown.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 700px) {
  .chat-admin-layout {
    flex-direction: column;
  }
  .chat-user-list-panel {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 200px;
  }
  .chat-bubble {
    max-width: 90%;
  }
  .chat-conversation-panel {
    width: 100%;
  }
  #chat-dropdown {
    position: fixed;
    top: 50%;
    right: 4%;
    transform: translateX(-50%) translateY(-5px);
    width: calc(100% - 2rem);
    max-width: 400px;
    min-width: unset;
  }
}
@media (max-width: 1200px) {
  #chat-dropdown {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(-5px);
  }
  #chat-dropdown.visible {
    transform: translateX(-50%) translateY(0);
  }
}
.modal-social {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}
.modal-social.invisible {
  display: none;
}
.modal-social.visible {
  display: flex;
}
.modal-social .modal-content {
  position: relative;
  background: var(--bg-surface);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
}
.modal-social .modal-content .close-modal {
  position: absolute;
  top: 10px;
  left: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
}
.modal-social .modal-content .social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.modal-social .modal-content .social-links a {
  width: 7rem;
  height: 7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: #f5f5f5;
  border: solid 3px var(--border-color);
  transition: transform 0.2s ease;
}
.modal-social .modal-content .social-links a:hover {
  transform: scale(1.1);
}
.modal-social .modal-content .social-links a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .modal-social .modal-content .social-links {
    flex-direction: column;
    align-items: center;
  }
}
/* =========================
   DOCS DROPDOWN (igual que user-dropdown)
   ========================= */
.docs-menu-container {
  position: relative;
  display: flex;
  align-items: center;
}
.docs-menu-container button {
  color: var(--brand-dark);
}

#docs-dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  min-width: 180px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 1000;
}

#docs-dropdown a {
  padding: 0.7rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* hover igual que user dropdown */
#docs-dropdown a:hover {
  background-color: var(--brand-primary);
  color: var(--bg-main);
  cursor: pointer;
}

/* estado visible (igual que user-dropdown) */
#docs-dropdown.visible {
  display: flex;
}

/*# sourceMappingURL=main.css.map */
