/* ============================================================
   COMPONENTES REUTILIZABLES
   Requiere tokens.css cargado antes que este archivo.
   ============================================================ */

/* ---------- Reset base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--white);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}


/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-20);
  gap: 8px;
}



.logo span {
  display: inline-block;
  transform: skewX(8deg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions a.link {
  font-size: 13px;
  font-weight: bold;
  color: var(--elanco-blue);
  text-decoration: none;
  padding: 10px 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.header-actions a.link:hover {
  text-decoration: underline;
}

/* ---------- Botones ----------
   Estados cubiertos: normal, hover. Pendientes: focus-visible, disabled,
   loading — se completan cuando diseñemos el componente Botón de forma
   aislada con sus 8 estados (ver ficha de pantalla Login).
------------------------------------------------------------- */


.btn-on-blue {
  background: var(--white);
  color: var(--elanco-blue);
}

.btn-on-blue:hover {
  background: var(--elanco-blue-20);
}

.btn-outline-on-blue {
  background: transparent;
  color: var(--elanco-blue);
  border-color: var(--elanco-blue);
}

.btn-outline-on-blue:hover {
  background: var(--elanco-blue-20);
}

.btn-blue {
  background: var(--elanco-blue);
  color: var(--white);
}

.btn-blue:hover {
  background: var(--elanco-blue-hover);
}

/* ---------- Botón: estados loading y disabled ---------- */
.btn:disabled,
.btn.is-disabled {
  background: var(--grey-20);
  color: var(--grey);
  border-color: var(--grey-20);
  cursor: not-allowed;
  pointer-events: none;
}

.btn.is-loading {
  color: transparent;
  pointer-events: none;
  position: relative;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Foto full-bleed con overlay de marca ----------
   Reutilizado por Landing (hero) y Login/Registro (panel lateral).
   El tamaño (aspect-ratio o height:100%) se define por pantalla en pages.css.
------------------------------------------------------------- */
.media-bleed {
  position: relative;
  overflow: hidden;
  background: var(--beige);
}

.media-bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-bleed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(0, 17, 73, 0.35), rgba(0, 114, 206, 0.12));
  mix-blend-mode: multiply;
  pointer-events: none;
}

.media-tag {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 4px;
}

/* ---------- Formulario: Input ----------
   Estados: normal, hover, focus, disabled, error. Loading/success no aplican
   a un input de texto simple (viven en el botón de submit).
------------------------------------------------------------- */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--grey-20);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--white);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder {
  color: var(--grey);
}

.form-input:hover {
  border-color: var(--grey);
}

.form-input:focus {
  outline: none;
  border-color: var(--elanco-blue);
  box-shadow: 0 0 0 3px var(--elanco-blue-20);
}

.form-input:disabled {
  background: var(--grey-20);
  color: var(--grey);
  cursor: not-allowed;
}

.form-input.is-error {
  border-color: var(--error);
}

.form-input.is-error:focus {
  box-shadow: 0 0 0 3px var(--error-20);
}

.form-error-message {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--error);
  margin-top: 6px;
}

.form-error-message svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.password-field {
  position: relative;
}

.password-field .form-input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--grey);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: var(--elanco-blue);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.form-hint {
  font-size: 12px;
  color: var(--grey);
  margin-top: 4px;
}

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f7f7f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

select.form-input:invalid {
  color: var(--grey);
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--elanco-blue);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 13px;
  color: var(--grey);
  line-height: 1.5;
  cursor: pointer;
}

.checkbox-group a {
  color: var(--elanco-blue);
  text-decoration: none;
  font-weight: bold;
}

.checkbox-group a:hover {
  text-decoration: underline;
}

/* ---------- Alerta (banner de error general del formulario) ---------- */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-error {
  background: var(--error-20);
  color: var(--error);
  border: 1px solid var(--error);
}

.alert svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---------- Shell de aplicación autenticada ----------
   Sidebar (desktop) + bottom nav (mobile/tablet) + header autenticado.
   Se construye una sola vez acá — lo reutiliza Dashboard, Historial de
   Retos, Historial de Puntos, Catálogo, Mis Redenciones, Perfil, y el
   panel Admin (mismo patrón, distintos links en el nav).
------------------------------------------------------------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  display: none;
  width: 240px;
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--grey-20);
  flex-direction: column;
  padding: 24px 0 0 0;
}

.app-sidebar .logo {
  margin: 0 24px 32px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 12px;
  flex: 1;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--grey);
}

.sidebar-link:hover {
  background: var(--beige-20);
}

.sidebar-link.active {
  background: var(--elanco-blue-20);
  color: var(--elanco-blue);
}

.sidebar-link.active svg {
  color: var(--elanco-blue);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--grey-20);
  margin-top: 12px;
  position: sticky;
  bottom: 0;
  background: var(--white);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--grey-20);
  background: var(--white);
  gap: 12px;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.app-content {
  flex: 1;
  align-self: center;
  padding: 20px 16px 96px;
  width: 100%;
  margin: 0 auto;
}

.app-content.app-content--narrow {
  max-width: 640px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--navy);
  position: relative;
}

.icon-btn:hover {
  background: var(--grey-20);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  border: 2px solid var(--white);
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--white);
  border-top: 1px solid var(--grey-20);
  display: flex;
  justify-content: space-around;
  padding: 6px 4px;
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--grey);
  text-decoration: none;
  font-size: 11px;
  font-weight: bold;
  padding: 6px 8px;
  min-width: 56px;
  min-height: 48px;
  justify-content: center;
}

.bottom-nav-link svg {
  width: 22px;
  height: 22px;
}

.bottom-nav-link.active {
  color: var(--elanco-blue);
}

@media(min-width:1024px) {
  .app-sidebar {
    display: flex;
  }

  .app-header .logo {
    display: none;
  }

  .bottom-nav {
    display: none;
  }


}

/* ---------- Badge de estado ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
}

.badge-pending {
  background: var(--grey);
  color: var(--navy);
}

.badge-success {
  background: var(--teal);
  color: var(--navy);
}

.badge-error {
  background: var(--error);
  color: var(--error);
}

.badge-bronze {
  background: var(--tier-bronze);
  color: var(--tier-bronze);
}

.badge-silver {
  background: var(--tier-silver-20);
  color: var(--tier-silver);
}

.badge-gold {
  background: var(--tier-gold-20);
  color: var(--tier-gold);
}

.badge-platinum {
  background: var(--tier-platinum-20);
  color: var(--tier-platinum);
}

.badge-diamond {
  background: var(--elanco-blue-20);
  color: var(--elanco-blue);
}

/* ---------- Hero de Dashboard ----------
   Mismo lenguaje que el Hero de Landing (gradiente + foto full-bleed),
   aplicado acá para que el saludo tenga el mismo nivel de impacto.
------------------------------------------------------------- */
.dashboard-hero {
  background: linear-gradient(135deg, var(--elanco-blue), var(--navy));
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 24px;
  color: var(--white);
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.dashboard-hero-copy {
  padding: 28px 24px;
}

.dashboard-hero-copy .eyebrow {
  font-size: 12px;
  color: var(--elanco-blue-20);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: bold;
}

.dashboard-hero-copy h1 {
  font-size: 26px;
  font-weight: bold;
  margin-bottom: 8px;
  line-height: 1.2;
}

.dashboard-hero-copy p {
  font-size: 14px;
  color: var(--elanco-blue-20);
}

.dashboard-hero-media {
  position: relative;
  aspect-ratio: 16/9;
}

.dashboard-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.dashboard-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--navy) 0%, rgba(0, 17, 73, 0.15) 60%);
  pointer-events: none;
}

@media(min-width:768px) {
  .dashboard-hero-grid {
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
  }

  .dashboard-hero-copy {
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .dashboard-hero-copy h1 {
    font-size: 30px;
  }

  .dashboard-hero-media {
    aspect-ratio: auto;
  }

  .dashboard-hero-media::after {
    background: linear-gradient(90deg, var(--navy) 0%, rgba(0, 17, 73, 0.05) 40%, transparent 70%);
  }
}

/* ---------- Grid de retos por campaña ---------- */
.campaign-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.campaign-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
  border: 1.5px solid var(--grey-20);
  background: var(--white);
  color: var(--grey);
  cursor: pointer;
  white-space: nowrap;
}

.campaign-tab.active {
  background: var(--elanco-blue);
  color: var(--white);
  border-color: var(--elanco-blue);
}

.retos-grid {
  margin-bottom: 28px;
}

.reto-card {
  background: var(--white);
  border: 1px solid var(--grey-20);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.reto-card:hover {
  border-color: var(--elanco-blue);
  box-shadow: 0 4px 12px rgba(0, 17, 73, 0.08);
}

.reto-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--elanco-blue-20);
  color: var(--elanco-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reto-card-icon svg {
  width: 20px;
  height: 20px;
}

.reto-card h3 {
  font-size: 15px;
  font-weight: bold;
  color: var(--navy);
}

.reto-card-desc {
  font-size: 12px;
  color: var(--grey);
  line-height: 1.4;
  margin-top: -4px;
}

.reto-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.reto-card-points {
  font-size: 14px;
  font-weight: bold;
  color: var(--elanco-blue);
}

.reto-card-freq {
  font-size: 11px;
  color: var(--grey);
  background: var(--beige-20);
  padding: 3px 8px;
  border-radius: 6px;
}

.reto-card-cta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: bold;
  color: var(--elanco-blue);
  padding-top: 10px;
  border-top: 1px solid var(--grey-20);
}

.reto-card-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.reto-card:hover .reto-card-cta svg {
  transform: translateX(3px);
}




/* ---------- Selector de campaña ---------- */
.campaign-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--elanco-blue-20);
  color: var(--navy);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  margin-bottom: 20px;
}

.campaign-selector svg {
  width: 16px;
  height: 16px;
}

/* ---------- Métricas (KPI) ---------- */
.metrics-grid {
  margin-bottom: 24px;
}

.metric-card {
  background: var(--white);
  border: 1px solid var(--grey-20);
  border-radius: 12px;
  padding: 18px;
}

.metric-card .metric-label {
  font-size: 12px;
  color: var(--grey);
  margin-bottom: 6px;
}

.metric-card .metric-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--navy);
}

.metric-card .metric-sub {
  font-size: 11px;
  color: var(--grey);
  margin-top: 4px;
}

/* ---------- Accesos rápidos ---------- */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

/* ---------- Lista de actividad ---------- */
.section-heading {
  font-size: 16px;
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 12px;
}

.activity-list {
  background: var(--white);
  border: 1px solid var(--grey-20);
  border-radius: 12px;
  padding: 4px 16px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--grey-20);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-info .activity-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.activity-info .activity-date {
  font-size: 12px;
  color: var(--grey);
}

.activity-info .activity-desc {
  font-size: 13px;
  color: var(--text-dark);
  margin: 2px 0;
}

.activity-info .activity-reason {
  color: var(--error);
}

@media(min-width:600px) {
  .quick-actions {
    flex-direction: row;
  }

  .quick-actions .btn {
    flex: 1;
  }
}

/* ---------- Card de formulario ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--grey-20);
  border-radius: 12px;
  padding: 20px;
  max-width: 600px;
}

@media(min-width:768px) {
  .form-card {
    padding: 28px;
  }
}

textarea.form-input {
  min-height: 100px;
  resize: vertical;
  font-family: var(--font);
}

/* ---------- Alerta informativa ---------- */
.alert-info {
  background: var(--elanco-blue-20);
  color: var(--elanco-blue);
  border: 1px solid var(--elanco-blue-40);
}

/* ---------- Upload de evidencia ---------- */
.upload-zone {
  display: block;
  border: 2px dashed var(--grey-20);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--beige-20);
}

.upload-zone:hover {
  border-color: var(--elanco-blue);
}

.upload-zone svg {
  width: 32px;
  height: 32px;
  color: var(--grey);
  margin: 0 auto 8px;
}

.upload-zone .upload-text {
  font-size: 14px;
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 4px;
}

.upload-zone .upload-hint {
  font-size: 12px;
  color: var(--grey);
}

.upload-zone input[type="file"] {
  display: none;
}

.upload-preview {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--grey-20);
}

.upload-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.upload-preview .remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 17, 73, 0.75);
  color: var(--white);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ---------- Patrón "agregar producto" ----------
   Select + cantidad + botón, con lista acumulable y opción de quitar.
   Reemplaza al multi-select tradicional — no escala bien en mobile con
   más de 3-4 opciones y obliga a un grid de inputs difícil de tocar.
------------------------------------------------------------- */
.product-adder {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.product-adder .form-group {
  flex: 1;
  margin-bottom: 0;
}

.product-adder .qty-group {
  width: 84px;
  flex: none;
  margin-bottom: 0;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.product-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--beige-20);
  border: 1px solid var(--grey-20);
  border-radius: var(--radius);
}

.product-list-item .product-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-dark);
}

.product-list-item .product-qty {
  font-size: 13px;
  color: var(--grey);
}

.product-list-item .remove-item {
  background: none;
  border: none;
  color: var(--grey);
  cursor: pointer;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.product-list-item .remove-item:hover {
  background: var(--error-20);
  color: var(--error);
}

.product-list-empty {
  font-size: 13px;
  color: var(--grey);
  text-align: center;
  padding: 16px;
  border: 1px dashed var(--grey-20);
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.rank-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.rank-bar-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-dark);
}

.rank-bar-track {
  flex: 1;
  background: var(--grey-20);
  border-radius: 999px;
  height: 20px;
  overflow: hidden;
}

.rank-bar-fill {
  background: var(--elanco-blue);
  height: 100%;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
}

.rank-bar-fill span {
  font-size: 11px;
  color: var(--white);
  font-weight: bold;
}

.reto-config-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.reto-config-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--beige-20);
  border: 1px solid var(--grey-20);
  border-radius: var(--radius);
}

.reto-config-item .reto-name {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-dark);
}

.reto-config-item .reto-meta {
  font-size: 12px;
  color: var(--grey);
}

/* ---------- Banner de bienvenida (Dashboard) ----------
   Cuarta reutilización de .media-bleed (Hero, franja lifestyle, panel
   Login/Registro, y ahora acá) — mismo lenguaje visual, costo marginal.
------------------------------------------------------------- */
.welcome-banner {
  background: var(--white);
  border: 1px solid var(--grey-20);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
}

.welcome-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.welcome-media {
  aspect-ratio: 16/9;
}

.welcome-copy {
  padding: 22px 20px;
}

.welcome-copy .eyebrow {
  font-size: 13px;
  color: var(--grey);
  margin-bottom: 4px;
}

.welcome-copy h1 {
  font-size: 22px;
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.3;
}

.welcome-copy p {
  font-size: 14px;
  color: var(--grey);
}

@media(min-width:768px) {
  .welcome-grid {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .welcome-media {
    aspect-ratio: auto;
    order: 2;
  }

  .welcome-copy {
    order: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 32px;
  }
}

/* ---------- Dropdown de header (notificaciones / perfil) ---------- */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  background: var(--white);
  border: 1px solid var(--grey-20);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 17, 73, 0.12);
  min-width: 220px;
  overflow: hidden;
}

.dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-title {
  font-size: 12px;
  font-weight: bold;
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 12px 16px 8px;
}

.dropdown-link {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: bold;
  color: var(--text-dark);
  text-decoration: none;
}

.dropdown-link:hover {
  background: var(--beige-20);
}

.dropdown-link--danger {
  color: var(--error);
  border-top: 1px solid var(--grey-20);
}

.dropdown-item {
  padding: 10px 16px;
  border-top: 1px solid var(--grey-20);
}

.dropdown-item-title {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.dropdown-item-sub {
  font-size: 12px;
  color: var(--grey);
}

.dropdown-empty {
  padding: 16px;
  font-size: 13px;
  color: var(--grey);
  text-align: center;
}

/* ---------- Tabla de datos (Admin) ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--grey-20);
  border-radius: 12px;
  overflow: hidden;
}

.data-table th {
  background: var(--beige-20);
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: bold;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text-dark);
  border-top: 1px solid var(--grey-20);
}

.data-table tbody tr {
  cursor: pointer;
}

.data-table tbody tr:hover td {
  background: var(--beige-20);
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

/* ---------- Modal de confirmación ----------
   Para acciones irreversibles: redención de premios (Participante) y
   aprobar/rechazar retos (Admin, más adelante).
------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 17, 73, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.modal-card h2 {
  font-size: 18px;
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 8px;
}

.modal-card p {
  font-size: 14px;
  color: var(--grey);
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .btn {
  flex: 1;
}

/* ---------- Catálogo de premios ---------- */
.catalog-grid {
  margin-bottom: 24px;
}

.catalog-card {
  background: var(--white);
  border: 1px solid var(--grey-20);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.catalog-card-image {
  aspect-ratio: 1/1;
  background: var(--beige-20);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-size: 11px;
  text-align: center;
  padding: 12px;
}

.catalog-card.is-soldout .catalog-card-image {
  filter: grayscale(1);
  opacity: 0.6;
}

.catalog-card-body {
  padding: 12px;
}

.catalog-card-name {
  font-size: 13px;
  font-weight: bold;
  color: var(--text-dark);
  margin-bottom: 6px;
  line-height: 1.3;
  min-height: 34px;
}

.catalog-card-cost {
  font-size: 15px;
  font-weight: bold;
  color: var(--elanco-blue);
}

.catalog-card-missing {
  font-size: 11px;
  color: var(--grey);
  margin-top: 2px;
}

.soldout-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--navy);
  color: var(--white);
  font-size: 10px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 4px;
}



.form-card.form-card--wide {
  max-width: 900px;
}

.detail-grid {
  display: block;
}

@media(min-width:768px) {
  .detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
  }
}

/* ---------- Fila de detalle (read-only) ---------- */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--grey-20);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 13px;
  color: var(--grey);
  flex-shrink: 0;
}

.detail-value {
  font-size: 14px;
  font-weight: bold;
  color: var(--text-dark);
  text-align: right;
}

.detail-evidence img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--grey-20);
  margin-bottom: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: bold;
  color: var(--grey);
  text-decoration: none;
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--elanco-blue);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

/* ---------- Filtro por estado (chips) ---------- */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.filter-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
  border: 1px solid var(--grey-20);
  background: var(--white);
  color: var(--grey);
  cursor: pointer;
  white-space: nowrap;
}

.filter-tab.active {
  background: var(--elanco-blue);
  color: var(--white);
  border-color: var(--elanco-blue);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: var(--white);
  padding: 32px 20px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.footer-links a {
  text-decoration: none;
  color: var(--elanco-blue-40);
  padding: 6px 0;
  display: inline-block;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-logo {
  align-self: flex-start;
}

.footer-copy {
  font-size: 12px;
  color: var(--grey);
  margin-top: 8px;
}

/* ---------- Responsive de componentes ---------- */
@media(max-width:380px) {
  .logo {
    font-size: 14px;
    padding: 6px 10px;
  }

  .header-actions a.link {
    font-size: 12px;
    padding: 10px 6px;
  }

  .btn-sm {
    padding: 9px 12px;
    font-size: 12px;
  }
}

@media(min-width:768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-logo {
    align-self: flex-end;
  }
}

@media(min-width:1024px) {
  .header {
    padding: 18px 40px;
  }

  .footer {
    padding: 48px 40px;
  }
}

/* ============================================================
   DASHBOARD PARTICIPANTE — vistas conmutables, selector de campaña
   y estilos migrados desde inline de dashboard.html / catalogo.html.
   ============================================================ */

/* Vistas conmutables: campañas / registrar retos / catálogo */
.view[hidden] {
  display: none;
}

/* Encabezado de campaña (1 campaña) o selector (varias) */
.campaign-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.campaign-heading h2 {
  font-size: 18px;
  font-weight: bold;
  color: var(--navy);
  margin: 0;
}

.campaign-select {
  max-width: 420px;
  margin-bottom: 20px;
}

/* Banner (imagen destacada) + texto de la campaña activa */
.campaign-banner {
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
}

.campaign-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: cover;
}

.campaign-content {
  margin-bottom: 20px;
}

/* Contenido de campaña cargado async */
.campaigns-content {
  position: relative;
  min-height: 80px;
}

.campaigns-content[aria-busy="true"],
.rewards-content[aria-busy="true"],
.activities-content[aria-busy="true"] {
  opacity: .5;
  pointer-events: none;
}

/* Badge grande para encabezados + variante primary de marca */
.badge--lg {
  font-size: 13px;
  padding: 6px 14px;
}

.badge-primary {
  background: var(--elanco-blue);
  color: var(--white);
}

/* Métrica en alerta (puntos que vencen) */
.metric-sub--alert {
  color: var(--error);
  font-weight: bold;
}

/* reto-card es un <a>: reset de enlace (antes inline) */
.reto-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* back-link usado como <button> */
button.back-link {
  background: none;
  border: none;
  font-family: var(--font);
  cursor: pointer;
}

/* Catálogo: encabezado con saldo (migrado de inline) */
.catalog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.catalog-heading-title {
  font-size: 20px;
  margin-bottom: 0;
}

.catalog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-card-body .badge {
  margin-bottom: 6px;
}

/* Registrar retos: línea de reto dinámica (reutiliza lenguaje product-adder) */
.reto-line {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
  padding: 12px 14px;
  background: var(--beige-20);
  border: 1px solid var(--grey-20);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.reto-line .form-group {
  margin-bottom: 0;
}

.reto-line .reto-remove {
  justify-self: end;
}

@media(min-width:600px) {
  .reto-line {
    grid-template-columns: 2fr 1fr auto;
  }
}

/* Evidencia por cámara (mobile) */
.cam-panel {
  margin-top: 10px;
}

.cam-panel video {
  width: 100%;
  border-radius: var(--radius);
  background: var(--navy);
  max-height: 320px;
}

.cam-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.cam-thumb {
  margin-top: 10px;
  max-height: 160px;
  border-radius: var(--radius);
  border: 1px solid var(--grey-20);
}