/* Aviso de novedades al iniciar sesión (includes/novedades.php) */
.novedades-fondo[hidden] { display: none; }
.novedades-fondo {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: novedades-aparecer .2s ease-out;
}
@keyframes novedades-aparecer { from { opacity: 0; } }
.novedades {
  width: min(680px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--white, #fff); border-radius: 16px; box-shadow: 0 25px 60px rgba(15, 23, 42, .3);
  animation: novedades-subir .25s ease-out;
}
@keyframes novedades-subir { from { transform: translateY(8px) scale(.99); } }

.novedades-cabecera { padding: 22px 24px 4px; }
.novedades-version { display: block; font-size: 12.5px; font-weight: 600; color: #2563eb; }
.novedades-cabecera h2 { margin: 4px 0 6px; font-size: 20px; line-height: 1.25; font-weight: 700; color: var(--text-dark, #0f172a); }
.novedades-cabecera p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-light, #64748b); }

/* Destacados en grilla 2×2 */
.novedades-lista { list-style: none; margin: 0; padding: 16px 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.novedades-lista li {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px;
  border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; background: #fff;
  }
/* Si quedan en número impar (según permisos), el último ocupa todo el ancho */
.novedades-lista li:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* Sin recuadros de color: el ícono va en el azul de la plataforma, sobre gris claro */
.novedades-icono {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #1e3a5f; background: #f1f5f9;
}
.novedades-icono .material-icons { font-size: 18px; }
.novedades-texto { min-width: 0; }
.novedades-texto strong { display: block; font-size: 13.5px; line-height: 1.3; color: var(--text-dark, #0f172a); margin-bottom: 3px; }
.novedades-etiqueta { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; vertical-align: 1px; color: #475569; background: #f1f5f9; }
.novedades-texto p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-light, #64748b); }

/* Pie */
.novedades-pie {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px; border-top: 1px solid var(--border-color, #e5e7eb); background: #fafbfd;
  border-radius: 0 0 16px 16px;
}
/* "No volver a mostrar" como interruptor */
.novedades-ocultar { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-light, #475569); cursor: pointer; user-select: none; }
.novedades-ocultar input {
  appearance: none; -webkit-appearance: none; flex: none; position: relative; margin: 0; cursor: pointer;
  width: 34px; height: 20px; border-radius: 999px; background: #cbd5e1; transition: background .2s;
}
.novedades-ocultar input::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .2s;
}
.novedades-ocultar input:checked { background: #2563eb; }
.novedades-ocultar input:checked::before { transform: translateX(14px); }
.novedades-ocultar input:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.novedades-ocultar:hover input:not(:checked) { background: #b6c0cf; }

.novedades-botones { display: flex; gap: 8px; flex-wrap: wrap; }
.novedades-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 34px; padding: 0 14px;
  border-radius: 9px; border: 1px solid transparent; font: inherit; font-size: 13px; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.novedades-btn-sec { background: #fff; border-color: var(--border-color, #e2e8f0); color: var(--text-dark, #0f172a); }
.novedades-btn-sec:hover { background: #f1f5f9; }
.novedades-btn-pri { background: #2563eb; color: #fff; }
.novedades-btn-pri:hover { background: #1d4ed8; }
.novedades-btn:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) { .novedades-fondo, .novedades { animation: none; } }
@media (max-width: 600px) {
  .novedades-lista { grid-template-columns: 1fr; }
  .novedades-pie { flex-direction: column; align-items: stretch; }
  .novedades-botones { flex-direction: column-reverse; }
  .novedades-btn { width: 100%; }
}
