/* ============================================================
   AUTENTICACIÓN
   ============================================================ */

/* Contenedor principal del login */

.login-container {
  width: 100%;
  max-width: 420px;

  margin: 40px auto 60px;
  padding: 30px;

  box-sizing: border-box;

  border: 1px solid #ccc;
  border-radius: 4px;

  background: #444;
}

/* ============================================================
   TÍTULO
   ============================================================ */

.login-container h1 {
  text-align: center;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 28px;
  font-weight: bold;

  color: #ef5f5a;
}

.login-container h6 {
  margin: 0 0 30px;

  text-align: center;

  font-family: Arial, Helvetica, sans-serif;

  text-transform: uppercase;
  font-size: 0.8rem;
  color: gray;
}

/* ============================================================
   FORMULARIO
   ============================================================ */

.login-form {
  width: 100%;
}

/* Grupo de campo */

.form-group {
  margin-bottom: 20px;
}

/* Etiquetas */

.form-group label {
  display: block;

  margin-bottom: 7px;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: bold;
}

/* Campos de texto */

.form-group textarea,
.form-group input {
  display: block;

  width: 100%;
  min-height: 44px;

  padding: 9px 12px;

  box-sizing: border-box;

  border: 1px solid #999;
  border-radius: 3px;

  background: #fff;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* Campo seleccionado */

.form-group input:focus {
  outline: none;

  border-color: #ef5f5a;

  box-shadow: 0 0 0 2px rgba(239, 95, 90, 0.15);
}

/* ============================================================
   BOTÓN
   ============================================================ */

.login-button {
  display: block;
  margin: 0 auto;

  width: fit-content;
  min-width: 200px;
  display: block;

  min-height: 44px;

  margin-top: 25px;
  padding: 9px 20px;

  box-sizing: border-box;

  border: none;
  border-radius: 3px;

  background: #ef5f5a;
  color: #fff;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: bold;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

/* Botón al pasar el ratón */

.login-button:hover {
  background: #d94f4a;
}

/* Botón al pulsar */

.login-button:active {
  transform: translateY(1px);
}

/* ============================================================
   MENSAJES DE ERROR
   ============================================================ */

.login-error {
  margin-bottom: 25px;
  padding: 12px 15px;

  box-sizing: border-box;

  border: 1px solid #e0a0a0;
  border-radius: 3px;

  background: #fff0f0;

  color: #9b2c2c;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.login-error p {
  margin: 0;
}

.login-error p + p {
  margin-top: 6px;
}

/* ============================================================
   SEPARADOR
   ============================================================ */

.login-separator {
  height: 1px;

  margin: 30px 0 20px;

  background: #ccc;
}

/* ============================================================
   REGISTRO
   ============================================================ */

.login-register {
  margin-top: 1rem;

  text-align: center;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

.login-register a {
  color: #ef5f5a;

  font-weight: bold;

  text-decoration: none;
}

.login-register a:hover {
  text-decoration: underline;
}

/* ============================================================
   MÓVILES
   ============================================================ */

@media (max-width: 600px) {
  .login-container {
    max-width: 360px;

    margin: 25px auto 40px;

    padding: 20px;
  }

  .login-container h1 {
    font-size: 24px;
  }

  .form-group label {
    font-size: 15px;
  }

  .form-group input {
    font-size: 15px;
  }
  .perfil-section form .login-button {
    display: block;
    width: fit-content;
    min-width: 200px;
    margin: 25px auto 0;
  }
  .login-button {
    font-size: 15px;
  }

  .login-register {
    font-size: 14px;
  }
}

/* ============================================================
   AYUDA DEL FORMULARIO
   ============================================================ */

.form-help {
  margin-top: 6px;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;

  color: #777;
}

.login-forgot {
  text-align: center;
  margin-top: -0.5rem;
  margin-bottom: 1.2rem;
}

.login-forgot a {
  font-size: 0.9rem;
  color: azure;
  text-decoration: none;
}
.login-forgot a:hover {
  text-decoration: underline;
}

.login-info {
  text-align: center;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.login-success {
  margin-bottom: 1.5rem;
  padding: 0.8rem 1rem;
  color: #263065;
  background-color: #f2f3f8;
  border: 1px solid #d8dbea;
}

.login-success p {
  margin: 0;
  text-align: center;
}

/* ============================================================
   CAMPOS DE CONTRASEÑA
   ============================================================ */

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 45px;
  box-sizing: border-box;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);

  width: 30px;
  height: 30px;

  padding: 0;
  margin: 0;

  border: 0;
  background: transparent;

  color: #666;
  font-size: 18px;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: #263065;
}

.password-toggle:focus {
  outline: none;
}

.password-toggle:focus-visible {
  outline: 2px solid #263065;
  outline-offset: 2px;
}

/* ============================================================
   PERFIL DE USUARIO
============================================================ */

.perfil-section {
  margin-top: 24px;
  padding: 24px 26px;

  background-color: #fafafa;

  border: 1px solid #ddd;
  border-left: 3px solid #263065;

  box-sizing: border-box;
}

.perfil-section:first-of-type {
  margin-top: 20px;
}

.perfil-section h2 {
  margin: 0 0 22px;

  padding-bottom: 12px;

  border-bottom: 1px solid #ddd;

  color: #263065;

  font-size: 18px;
  font-weight: 700;
}

.perfil-section h2 i {
  margin-right: 8px;

  color: #263065;

  font-size: 17px;
}

.perfil-section p,
.perfil-section label {
  color: #555;
}

.perfil-section input[readonly] {
  background-color: #f5f5f5;
  color: #555;
  cursor: not-allowed;
}

.perfil-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 11px 13px;
  background: #f6f7fa;
  border-left: 3px solid #263065;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.perfil-info i {
  color: #555;
  margin-top: 2px;
}

/* ------------------------------------------------------------
   CONTRASEÑA
------------------------------------------------------------ */

.perfil-section .password-wrapper {
  position: relative;
}

.perfil-section .password-wrapper input {
  padding-right: 45px;
}

.perfil-section .password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: none;
  background: transparent;

  color: #263065;

  cursor: pointer;
}

.perfil-section .password-toggle:hover {
  color: #e83c3d;
}

/* ------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------ */

@media (max-width: 600px) {
  .perfil-section {
    margin-top: 24px;
    padding-top: 20px;
  }

  .perfil-section h2 {
    font-size: 17px;
  }
}

/* ============================================================
   ENLACES INFERIORES DEL PERFIL
============================================================ */

.perfil-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perfil-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.perfil-links .perfil-logout {
  color: #e83c3d;
}

.perfil-links .perfil-logout:hover {
  color: #263065;
}

/* ============================================================
   CONTENEDOR DEL PERFIL
============================================================ */

.perfil-container {
  width: 100%;

  margin: 40px auto 60px;
  padding: 30px;

  box-sizing: border-box;

  border: 1px solid #ccc;
  border-radius: 4px;

  background: #444;
}

@media (max-width: 600px) {
  .perfil-container {
    width: 100%;
    max-width: none;
  }
}

/* ============================================================
   CONTENEDOR DEL CONTACTO
============================================================ */

.contacto-container {
  width: 100%;
  box-sizing: border-box;

  margin: 0;
  padding: 0.5rem 2rem;
  background: #444;
}

.contacto-info {
  text-align: center;
  gap: 8px;
  margin-top: 8px;
  padding: 11px 13px;
  background: #f6f7fa;
  border-left: 3px solid #263065;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.contacto-info i {
  color: #fff;
  margin-top: 2px;
}

@media (max-width: 600px) {
  .contacto-container {
    width: 100%;
    max-width: none;
  }
}

/* ============================================================
   NEWSLETTER
============================================================ */

.newsletter-option {
  display: flex;
  align-items: center;
  gap: 10px;

  margin: 0 0 10px;
  padding: 11px 13px;

  background-color: #fff;

  border: 1px solid #e2e2e2;

  color: #444;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.newsletter-option:hover {
  background-color: #f7f7fa;
  border-color: #d9dbea;
}

.newsletter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;

  margin: 0;

  accent-color: #263065;

  cursor: pointer;
}

.perfil-section .newsletter-option + .perfil-info {
  margin-top: 4px;
}

/* ------------------------------------------------------------
   CABECERA
------------------------------------------------------------ */

.perfil-header,
.usuarios-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 24px;
}
.perfil-header h1,
.usuarios-header h1 {
  margin: 0;

  /*color: #263065;*/
  font-size: 24px;
  font-weight: 700;
}

.perfil-header h1 i,
.usuarios-header h1 i {
  margin-right: 7px;
}

.perfil-header p,
.usuarios-header p {
  margin-bottom: 0;
}
.usuarios-total {
  color: #777;
  font-size: 13px;
}

/* ------------------------------------------------------------
   TABLA
------------------------------------------------------------ */

.usuarios-table-wrapper {
  width: 100%;
  overflow-x: auto;

  border: 1px solid #ddd;
  background-color: #fff;
}

.usuarios-table {
  width: 100%;
  border-collapse: collapse;

  font-size: 14px;
}

.usuarios-table th {
  padding: 14px 16px;

  background-color: #263065;
  color: #fff;

  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;

  white-space: nowrap;
}

.usuarios-table td {
  padding: 16px;

  border-bottom: 1px solid #e5e5e5;

  color: #444;
  vertical-align: middle;
}
.usuarios-table:not(.estadisticas-table) td:nth-last-child(-n + 2) {
  white-space: nowrap;
}

.usuarios-table tbody tr:last-child td {
  border-bottom: none;
}

.usuarios-table tbody tr:hover {
  background-color: #fafafa;
}

/* ------------------------------------------------------------
   DATOS DEL USUARIO
------------------------------------------------------------ */

.usuario-name {
  display: flex;
  align-items: center;
  gap: 7px;

  color: #263065;
  font-weight: 700;
}

.usuario-name i {
  font-size: 17px;
}

.usuario-email {
  margin-top: 5px;

  color: #777;
  font-size: 12px;

  word-break: break-word;
}

/* ------------------------------------------------------------
   BADGES
------------------------------------------------------------ */

.usuario-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;

  padding: 5px 9px;

  border: 1px solid transparent;

  font-weight: 600;

  white-space: nowrap;
}

/* ROL */

.rol-admin {
  color: #263065;
  background-color: #f0f1f7;
  border-color: #d9dbea;
}

.rol-usuario {
  color: #555;
  background-color: #f5f5f5;
  border-color: #ddd;
}

/* NEWSLETTER */

.newsletter-si {
  color: #263065;
  background-color: #f0f1f7;
  border-color: #d9dbea;
}

.newsletter-no {
  color: #777;
  background-color: #f7f7f7;
  border-color: #e1e1e1;
}

/* ESTADO */

.estado-activo {
  color: #287a5a;
  background-color: #eef7f2;
  border-color: #cfe7da;
}

.estado-inactivo {
  color: #777;
  background-color: #f7f7f7;
  border-color: #e1e1e1;
}

/* ------------------------------------------------------------
   ÚLTIMO ACCESO
------------------------------------------------------------ */

.usuario-acceso {
  color: #555;
  white-space: nowrap;
}

.usuario-acceso small {
  color: #888;
  font-size: 11px;
}

.sin-acceso {
  color: #999;
  font-style: italic;
}

/* ------------------------------------------------------------
   EDITAR
------------------------------------------------------------ */

.usuario-accion {
  white-space: nowrap;
}

.usuario-editar {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 7px 11px;

  background-color: #263065;
  color: #fff;

  text-decoration: none;

  font-size: 12px;
  font-weight: 600;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.usuario-editar:hover {
  background-color: #e83c3d;
  color: #fff;
}

/* ------------------------------------------------------------
   SIN USUARIOS
------------------------------------------------------------ */

.usuarios-vacio {
  padding: 50px 20px;

  border: 1px solid #ddd;

  background-color: #fafafa;

  text-align: center;
  color: #777;
}

.usuarios-vacio i {
  display: block;

  margin-bottom: 12px;

  color: #263065;
  font-size: 32px;
}

.usuarios-vacio p {
  margin: 0;
}

/* ------------------------------------------------------------
   PIE / VOLVER
------------------------------------------------------------ */

.usuarios-footer {
  margin-top: 22px;

  text-align: center;
}

.usuarios-footer a {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  /*color: #263065;*/

  font-size: 14px;
  text-decoration: none;
}

.usuarios-footer a:hover {
  /*  color: #e83c3d; */
}

/* ------------------------------------------------------------
   RESPONSIVE
------------------------------------------------------------ */

@media (max-width: 800px) {
  .usuarios-container {
    max-width: 100%;
  }

  .usuarios-table-wrapper {
    border: none;
    overflow: visible;
  }

  .usuarios-table,
  .usuarios-table tbody,
  .usuarios-table tr,
  .usuarios-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .usuarios-table thead {
    display: none;
  }

  .usuarios-table tbody tr {
    margin-bottom: 16px;

    border: 1px solid #ddd;

    background-color: #fff;
  }

  .usuarios-table tbody tr:last-child {
    border-bottom: 1px solid #ddd;
  }

  .usuarios-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    padding: 12px 14px;

    border-bottom: 1px solid #eee;

    text-align: right;
  }

  .usuarios-table td:last-child {
    border-bottom: none;
  }

  .usuarios-table td::before {
    content: attr(data-label);

    flex: 0 0 auto;

    color: #777;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;

    text-align: left;
  }

  .usuarios-table .usuario-datos {
    display: block;

    text-align: left;

    padding-top: 16px;
    padding-bottom: 16px;
  }

  .usuarios-table .usuario-datos::before {
    display: none;
  }

  .usuarios-table .usuario-accion {
    justify-content: flex-end;
  }

  .usuarios-table .usuario-accion::before {
    display: none;
  }
}

@media (max-width: 500px) {
  .perfil-header,
  .usuarios-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .perfil-header h1,
  .usuarios-header h1 {
    font-size: 21px;
  }
}

.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 18px;

  background-color: #263065;
  color: #fff;

  border: 1px solid #263065;

  text-decoration: none;
  font-weight: 600;

  cursor: pointer;
}

.admin-button:hover {
  background-color: #e83c3d;
  border-color: #e83c3d;
  color: #fff;
}

.usuarios-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-top: 24px;
  padding: 10px 18px;

  background-color: #263065;
  color: #fff;

  border: 1px solid #263065;

  text-decoration: none;
  font-weight: 600;

  cursor: pointer;
}

.usuarios-back-button:hover {
  background-color: #e83c3d;
  border-color: #e83c3d;
  color: #fff;
}

/* =========================================================
   RESUMEN DE USUARIOS
========================================================= */

.usuarios-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 25px;
}

.usuarios-summary-item {
  padding: 18px 15px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  text-align: center;
}

.usuarios-summary-number {
  display: block;
  color: #263065;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.usuarios-summary-label {
  display: block;
  margin-top: 5px;
  color: #555;
  font-size: 13px;
}

/* =========================================================
   FILTROS
========================================================= */

.usuarios-filters {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;

  margin-bottom: 25px;
  padding: 18px;

  background-color: #f5f5f5;
  border: 1px solid #ddd;
}

.usuarios-filters label {
  display: block;
  margin-bottom: 6px;

  color: #263065;
  font-size: 14px;
  font-weight: 600;
}

.usuarios-search-wrapper {
  position: relative;
}

.usuarios-search-wrapper i {
  position: absolute;
  left: 11px;
  top: 50%;

  transform: translateY(-50%);

  color: #777;
  pointer-events: none;
}

.usuarios-search-wrapper input,
.usuarios-filter-field select {
  width: 100%;
  height: 42px;

  padding: 8px 10px;

  background-color: #fff;
  border: 1px solid #ccc;

  border-radius: 0;

  color: #333;
  font-size: 14px;

  box-sizing: border-box;
}

.usuarios-search-wrapper input {
  padding-left: 34px;
}

.usuarios-search-wrapper input:focus,
.usuarios-filter-field select:focus {
  outline: none;
  border-color: #263065;
  box-shadow: 0 0 0 1px #263065;
}

.usuarios-filter-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.usuarios-filter-buttons .admin-button {
  margin: 0;
  height: 42px;
  box-sizing: border-box;
}

.usuarios-clear-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  height: 42px;
  padding: 0 14px;

  box-sizing: border-box;

  background-color: #fff;
  color: #263065;

  border: 1px solid #263065;

  text-decoration: none;
  font-size: 14px;
  font-weight: 600;

  white-space: nowrap;
  cursor: pointer;
}

.usuarios-clear-button:hover {
  background-color: #263065;
  color: #fff;
}

/* =========================================================
   INFORMACIÓN DE RESULTADOS
========================================================= */

.usuarios-results-info {
  margin: 0 0 12px;

  color: #666;
  font-size: 14px;
}

/* =========================================================
   ESTADO VACÍO
========================================================= */

.usuarios-empty {
  padding: 45px 20px;

  background-color: #f6f6f6;
  border: 1px solid #ddd;

  text-align: center;
}

.usuarios-empty i {
  display: block;

  margin-bottom: 12px;

  color: #263065;
  font-size: 35px;
}

.usuarios-empty p {
  margin: 0;
  color: #555;
}

/* =========================================================
   BOTÓN EDITAR
========================================================= */

.usuarios-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 7px 11px;

  background-color: #263065;
  color: #fff;

  border: 1px solid #263065;

  text-decoration: none;

  font-size: 13px;
  font-weight: 600;

  white-space: nowrap;
  cursor: pointer;
}

.usuarios-edit-button:hover {
  background-color: #e83c3d;
  border-color: #e83c3d;
  color: #fff;
}

/* =========================================================
   BOTÓN VOLVER
========================================================= */

.usuarios-footer-buttons {
  margin-top: 25px;
}

.usuarios-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 18px;

  background-color: #263065;
  color: #fff;

  border: 1px solid #263065;

  text-decoration: none;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.usuarios-back-button:hover {
  background-color: #e83c3d;
  border-color: #e83c3d;
  color: #fff;
}

/* =========================================================
   FORMULARIO EDITAR USUARIO
========================================================= */

.perfil-form {
  width: 100%;
}

.perfil-field {
  margin-bottom: 20px;
}

.perfil-field:last-child {
  margin-bottom: 0;
}

.perfil-field label {
  display: block;

  margin-bottom: 7px;

  color: #263065;
  font-size: 14px;
  font-weight: 600;
}

.perfil-field input,
.perfil-field select {
  width: 100%;
  height: 42px;

  padding: 9px 11px;

  box-sizing: border-box;

  background-color: #fff;
  color: #333;

  border: 1px solid #ccc;
  border-radius: 0;

  font-family: inherit;
  font-size: 14px;
}
.perfil-field textarea {
  width: 100%;

  padding: 9px 11px;

  box-sizing: border-box;

  background-color: #fff;
  color: #333;

  border: 1px solid #ccc;
  border-radius: 0;

  font-family: inherit;
  font-size: 14px;
}

.perfil-field input:focus,
.perfil-field select:focus,
.perfil-field textarea:focus {
  outline: none;

  border-color: #263065;
  box-shadow: 0 0 0 1px #263065;
}

/* =========================================================
   CAMPOS NO MODIFICABLES
========================================================= */

.perfil-field input[readonly] {
  background-color: #f5f5f5;
  color: #555;
  cursor: not-allowed;
}

/* =========================================================
   INFORMACIÓN
========================================================= */

.perfil-info {
  margin: 1rem 0 2rem;
  padding: 11px 14px;

  box-sizing: border-box;

  background-color: #f1f2f6;

  border: 1px solid #d9dbea;
  border-left: 3px solid #263065;

  color: #666;

  font-size: 13px;
  line-height: 1.5;
}

.perfil-info .bi.bi-google {
  color: #555;
}
/* =========================================================
   NEWSLETTER / CHECKBOX
========================================================= */

.newsletter-option {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-bottom: 14px;

  color: #263065;

  font-size: 15px;
  font-weight: 600;

  cursor: pointer;
}

.newsletter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;

  margin: 0;

  cursor: pointer;
}

.newsletter-option span {
  color: #444;
}

.perfil-section .newsletter-option + .perfil-info {
  margin-top: 4px;
}

.newsletter-field-help {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 10px;
  color: #777;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 400;
}

.newsletter-field-help i {
  flex-shrink: 0;
  margin-top: 1px;
  color: #263065;
  font-size: 13px;
}

.newsletter-visual-editor-disabled {
  display: none !important;
}

.newsletter-html-editor {
  width: 100%;
  min-height: 400px;

  box-sizing: border-box;

  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.5;

  white-space: pre;
  tab-size: 4;

  resize: vertical;
}
.newsletter-editor.has-php .newsletter-tool[data-command],
.newsletter-editor.has-php #newsletter-insert-link,
.newsletter-editor.has-php #newsletter-insert-separator,
.newsletter-editor.has-php #newsletter-remove-format {
  display: none;
}
.newsletter-php-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;

  margin: 10px 0 15px;

  padding: 10px 13px;

  border-left: 3px solid #e83c3d;

  background: rgba(232, 60, 61, 0.08);

  line-height: 1.5;
}

.newsletter-php-warning i {
  flex-shrink: 0;
  margin-top: 2px;

  color: #e83c3d;
}

.newsletter-php-warning strong {
  margin-right: 3px;
}

.noticia-copiar-entradilla,
.articulo-copiar-entradilla {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  padding: 4px 9px;
  border: 1px solid rgba(38, 48, 101, 0.25);
  border-radius: 4px;
  background: rgba(38, 48, 101, 0.06);
  color: inherit;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  vertical-align: middle;
}

.noticia-copiar-entradilla:hover,
.articulo-copiar-entradilla:hover {
  background: rgba(38, 48, 101, 0.12);
}

.noticia-copiar-entradilla i,
.articulo-copiar-entradilla i {
  font-size: 13px;
}

/* =========================================================
   CONTRASEÑAS
========================================================= */

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;

  right: 1px;
  /*top: 1px;*/

  width: 40px;
  height: 40px;

  padding: 0;

  background: transparent;
  color: #263065;

  border: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.password-toggle:hover {
  color: #e83c3d;
}

.password-toggle i {
  font-size: 18px;
}

/* =========================================================
   BOTÓN ADMINISTRADOR
========================================================= */

.admin-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 18px;

  background-color: #263065;
  color: #fff;

  border: 1px solid #263065;

  text-decoration: none;

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.admin-button:hover {
  background-color: #e83c3d;
  border-color: #e83c3d;
  color: #fff;
}

/* =========================================================
   BOTONES FORMULARIO
========================================================= */

.usuarios-form-buttons {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-top: 28px;
  padding-top: 20px;

  border-top: 1px solid #ddd;
}

.usuarios-form-buttons .usuarios-back-button {
  margin-top: 0;
}

/* =========================================================
   MENSAJES
========================================================= */

.usuarios-message {
  margin-bottom: 20px;
  padding: 13px 15px;

  border: 1px solid #ccc;

  font-size: 14px;
  line-height: 1.5;
}

.usuarios-message i {
  margin-right: 6px;
}

.usuarios-error {
  background-color: #fff3f3;
  color: #a02020;
  border-color: #e0aaaa;
}

.usuarios-success {
  background-color: #f2f7f2;
  color: #276327;
  border-color: #b8d2b8;
}

/* =========================================================
   RESPONSIVE - EDITAR USUARIO
========================================================= */

@media (max-width: 700px) {
  .usuarios-form-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .usuarios-form-buttons .admin-button,
  .usuarios-form-buttons .usuarios-back-button {
    width: 100%;
  }
}

/* =========================================================
   RESPONSIVE - RESUMEN
========================================================= */

@media (max-width: 800px) {
  .usuarios-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   RESPONSIVE - FILTROS
========================================================= */

@media (max-width: 900px) {
  .usuarios-filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .usuarios-filter-search {
    grid-column: 1 / -1;
  }

  .usuarios-filter-buttons {
    grid-column: 1 / -1;
  }
}

/* =========================================================
   RESPONSIVE - MÓVIL
========================================================= */

@media (max-width: 600px) {
  .usuarios-summary {
    grid-template-columns: 1fr 1fr;
  }

  .usuarios-filters {
    grid-template-columns: 1fr;
  }

  .usuarios-filter-search,
  .usuarios-filter-buttons {
    grid-column: auto;
  }

  .usuarios-filter-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .usuarios-filter-buttons .admin-button,
  .usuarios-filter-buttons .usuarios-clear-button {
    width: 100%;
  }
}
/* =========================================================
   ACCIONES DE USUARIO
========================================================= */

.usuarios-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* =========================================================
   BOTÓN ELIMINAR
========================================================= */

.usuarios-delete-form {
  margin: 0;
}

.usuarios-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 7px 11px;

  background-color: #fff;
  color: #b02020;

  border: 1px solid #b02020;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  white-space: nowrap;

  cursor: pointer;
}

.usuarios-delete-button:hover {
  background-color: #e83c3d;
  border-color: #e83c3d;
  color: #fff;
}
@media (max-width: 600px) {
  .usuarios-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* =========================================================
   RESUMEN NEWSLETTER
========================================================= */

.newsletter-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;

  margin-bottom: 25px;
}

.newsletter-summary-item {
  padding: 18px;

  background-color: #f5f5f5;
  border: 1px solid #ddd;

  text-align: center;
}

.newsletter-summary-number {
  display: block;

  color: #263065;

  font-size: 28px;
  font-weight: 700;
}

.newsletter-summary-label {
  display: block;

  margin-top: 5px;

  color: #555;

  font-size: 13px;
}

/* =========================================================
   SELECCIÓN DE DESTINATARIOS
========================================================= */

.newsletter-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  margin-bottom: 12px;
  padding-bottom: 12px;

  border-bottom: 1px solid #ddd;
}

.newsletter-select-all {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  color: #263065;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.newsletter-select-all input,
.newsletter-recipient input {
  width: 18px;
  height: 18px;

  margin: 0;

  accent-color: #263065;

  cursor: pointer;
}

.newsletter-selection-counter {
  color: #666;
  font-size: 13px;
}

/* =========================================================
   LISTA DE DESTINATARIOS
========================================================= */

.newsletter-recipients {
  max-height: 360px;

  overflow-y: auto;

  border: 1px solid #ddd;

  background-color: #fff;
}

.newsletter-recipient {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 11px 13px;

  border-bottom: 1px solid #eee;

  cursor: pointer;
}

.newsletter-recipient:last-child {
  border-bottom: 0;
}

.newsletter-recipient:hover {
  background-color: #f7f7f7;
}

.newsletter-recipient-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.newsletter-recipient-info strong {
  color: #263065;

  font-size: 14px;
  font-weight: 600;
}

.newsletter-recipient-info small {
  color: #666;

  font-size: 13px;
}

/* =========================================================
   SIN SUSCRIPTORES
========================================================= */

.newsletter-no-subscribers {
  padding: 35px 20px;

  background-color: #f6f6f6;

  border: 1px solid #ddd;

  text-align: center;
}

.newsletter-no-subscribers i {
  display: block;

  margin-bottom: 10px;

  color: #263065;

  font-size: 32px;
}

.newsletter-no-subscribers p {
  margin: 0;

  color: #555;
}

/* =========================================================
   CONTENIDO
========================================================= */

.newsletter-content {
  width: 100%;

  min-height: 280px;

  padding: 12px;

  box-sizing: border-box;

  background-color: #fff;

  border: 1px solid #ccc;
  border-radius: 0;

  color: #333;

  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;

  line-height: 1.5;

  resize: vertical;
}

.newsletter-content:focus {
  outline: none;

  border-color: #263065;

  box-shadow: 0 0 0 1px #263065;
}

.newsletter-help {
  margin-top: 7px;
  margin-bottom: 0;
}

/* =========================================================
   VISTA PREVIA
========================================================= */

.newsletter-preview-section {
  margin-top: 30px;

  border: 1px solid #ddd;

  background-color: #f5f5f5;
}

.newsletter-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 18px 20px;

  background-color: #263065;

  color: #fff;
}

.newsletter-preview-header h2 {
  margin: 0;

  font-size: 20px;
  font-weight: 600;
}

.newsletter-preview-header h2 i {
  margin-right: 7px;
}

.newsletter-preview-header p {
  margin: 5px 0 0;

  color: #ddd;

  font-size: 13px;
}

.newsletter-preview-recipients {
  display: flex;
  align-items: center;
  gap: 7px;

  white-space: nowrap;

  font-size: 14px;
  font-weight: 600;
}

.newsletter-preview-frame {
  padding: 20px;

  background-color: #e9e9e9;
}

.newsletter-preview-frame iframe {
  display: block;

  width: 100%;
  min-height: 720px;

  border: 1px solid #ccc;

  background-color: #fff;
}

.newsletter-preview-warning {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 12px 15px;

  background-color: #fff;

  border-top: 1px solid #ddd;

  color: #555;

  font-size: 13px;
}

.newsletter-preview-warning i {
  color: #263065;
}

/* =========================================================
   RESPONSIVE NEWSLETTER
========================================================= */

@media (max-width: 700px) {
  .newsletter-summary {
    grid-template-columns: 1fr;
  }

  .newsletter-selection-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .newsletter-preview-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .newsletter-preview-frame {
    padding: 10px;
  }

  .newsletter-preview-frame iframe {
    height: 600px;
  }
}
/* =========================================================
   ENVÍO NEWSLETTER
========================================================= */

.newsletter-send-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 18px 20px;

  background-color: #fff;

  border-top: 1px solid #ddd;
}

.newsletter-send-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  color: #555;

  font-size: 13px;
  line-height: 1.5;
}

.newsletter-send-warning > i {
  flex-shrink: 0;

  margin-top: 2px;

  color: #e83c3d;

  font-size: 18px;
}

.newsletter-send-warning strong {
  display: block;

  margin-bottom: 2px;

  color: #263065;

  font-size: 14px;
}

.newsletter-send-warning span {
  display: block;
}

.newsletter-send-form {
  margin: 0;
}

.newsletter-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 10px 17px;

  background-color: #e83c3d;

  border: 1px solid #e83c3d;

  color: #fff;

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;

  white-space: nowrap;

  cursor: pointer;
}

.newsletter-send-button:hover {
  background-color: #263065;
  border-color: #263065;
}

/* =========================================================
   RESPONSIVE ENVÍO
========================================================= */

@media (max-width: 700px) {
  .newsletter-send-area {
    align-items: stretch;
    flex-direction: column;
  }

  .newsletter-send-form {
    width: 100%;
  }

  .newsletter-send-button {
    width: 100%;
  }
}

/* =========================================================
   HISTORIAL NEWSLETTER
========================================================= */

.newsletter-history-table th,
.newsletter-history-table td {
  vertical-align: middle;
}

.newsletter-history-date {
  display: block;

  color: #263065;

  font-weight: 600;
}

.newsletter-history-time {
  display: block;

  margin-top: 2px;

  color: #777;

  font-size: 12px;
}

.newsletter-history-subject {
  color: #263065;

  font-weight: 600;
}

.newsletter-history-number {
  font-weight: 600;
}

.newsletter-history-success {
  color: #26733a;

  font-size: 13px;
  font-weight: 600;
}

.newsletter-history-success i,
.newsletter-history-partial i {
  margin-right: 4px;
}

.newsletter-history-partial {
  color: #b02020;

  font-size: 13px;
  font-weight: 600;
}
/* =========================================================
   DETALLE NEWSLETTER
========================================================= */

.newsletter-detail-info {
  margin-bottom: 30px;

  border: 1px solid #ddd;

  background-color: #fff;
}

/* =========================================================
   ASUNTO
========================================================= */

.newsletter-detail-title {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 20px;

  background-color: #f5f5f5;

  border-bottom: 1px solid #ddd;
}

.newsletter-detail-title > i {
  color: #263065;

  font-size: 25px;
}

.newsletter-detail-title > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.newsletter-detail-label {
  color: #777;

  font-size: 12px;
  font-weight: 600;

  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.newsletter-detail-title strong {
  color: #263065;

  font-size: 18px;
}

/* =========================================================
   INFORMACIÓN
========================================================= */

.newsletter-detail-grid {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 0;
}

.newsletter-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;

  min-height: 75px;

  padding: 16px;

  border-right: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.newsletter-detail-item:nth-child(3n) {
  border-right: 0;
}

.newsletter-detail-item i {
  flex-shrink: 0;

  margin-top: 2px;

  color: #263065;

  font-size: 17px;
}

.newsletter-detail-item > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.newsletter-detail-item span {
  color: #777;

  font-size: 12px;
}

.newsletter-detail-item strong {
  color: #333;

  font-size: 13px;
}

.newsletter-detail-success {
  color: #26733a !important;
}

.newsletter-detail-error {
  color: #b02020 !important;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 850px) {
  .newsletter-detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .newsletter-detail-item:nth-child(3n) {
    border-right: 1px solid #eee;
  }

  .newsletter-detail-item:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 600px) {
  .newsletter-detail-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-detail-item,
  .newsletter-detail-item:nth-child(2n),
  .newsletter-detail-item:nth-child(3n) {
    border-right: 0;
  }
}
/* =========================================================
   EDITOR NEWSLETTER
========================================================= */

.newsletter-editor {
  width: 100%;
  border: 1px solid #ccc;
  background-color: #fff;
}

/* =========================================================
   BARRA DE HERRAMIENTAS
========================================================= */

.newsletter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.newsletter-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;

  padding: 0;

  background-color: #fff;
  color: #263065;

  border: 1px solid #ccc;

  font-family: inherit;
  font-size: 16px;

  cursor: pointer;
}

.newsletter-tool:hover {
  background-color: #263065;
  border-color: #263065;
  color: #fff;
}

.newsletter-tool.active {
  background-color: #263065;
  border-color: #263065;
  color: #fff;
}

.newsletter-toolbar-separator {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background-color: #ccc;
}

.newsletter-html-button {
  margin-left: auto;
}

/* =========================================================
   EDITOR VISUAL
========================================================= */

.newsletter-visual-editor {
  min-height: 320px;

  padding: 18px;

  background-color: #fff;

  color: #333;

  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.6;

  outline: none;

  overflow-y: auto;
}

.newsletter-visual-editor:focus {
  box-shadow: inset 0 0 0 1px #263065;
}

.newsletter-visual-editor:empty::before {
  content: attr(data-placeholder);

  color: #999;
  pointer-events: none;
}

/* =========================================================
   ELEMENTOS DEL CONTENIDO
========================================================= */

.newsletter-visual-editor h2 {
  margin: 0 0 15px;
  color: #263065;
  font-size: 24px;
}

.newsletter-visual-editor h3 {
  margin: 0 0 12px;
  color: #263065;
  font-size: 20px;
}

.newsletter-visual-editor p {
  margin: 0 0 14px;
}

.newsletter-visual-editor ul,
.newsletter-visual-editor ol {
  margin: 0 0 15px;
  padding-left: 25px;
}

.newsletter-visual-editor a {
  color: #263065;
  text-decoration: underline;
}

.newsletter-visual-editor hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid #ddd;
}

/* =========================================================
   EDITOR HTML
========================================================= */

.newsletter-html-editor {
  display: none;

  width: 100%;
  min-height: 320px;

  padding: 18px;

  box-sizing: border-box;

  resize: vertical;

  border: 0;
  outline: none;

  background-color: #1e1e1e;
  color: #f1f1f1;

  font-family: Consolas, "Courier New", monospace;

  font-size: 14px;
  line-height: 1.5;
}

.newsletter-editor.html-mode .newsletter-visual-editor {
  display: none;
}

.newsletter-editor.html-mode .newsletter-html-editor {
  display: block;
}

/* =========================================================
   AYUDA
========================================================= */

.newsletter-help {
  margin-top: 10px;
}

.newsletter-help strong {
  color: #263065;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 600px) {
  .newsletter-toolbar {
    gap: 3px;
  }

  .newsletter-tool {
    width: 32px;
    height: 32px;
  }

  .newsletter-toolbar-separator {
    margin: 0 2px;
  }

  .newsletter-html-button {
    margin-left: 0;
  }

  .newsletter-visual-editor,
  .newsletter-html-editor {
    min-height: 280px;
  }
}
/* =========================================================
   CANCELAR NEWSLETTER
========================================================= */

.newsletter-unsubscribe-result {
  text-align: center;
  padding: 45px 25px;
}

.newsletter-unsubscribe-icon {
  margin-bottom: 20px;
}

.newsletter-unsubscribe-icon i {
  color: #263065;
  font-size: 48px;
}

.newsletter-unsubscribe-result p {
  margin: 0 0 15px;
  color: #333;
  font-size: 16px;
}

.newsletter-unsubscribe-result .perfil-info {
  max-width: 600px;
  margin: 0 auto 25px;
}

.newsletter-unsubscribe-result .usuarios-form-buttons {
  justify-content: center;
}
.newsletter-unsubscribe-result.exito .newsletter-unsubscribe-icon i {
  color: #26733a;
}

.newsletter-unsubscribe-result.error .newsletter-unsubscribe-icon i {
  color: #b02020;
}
/* =========================================================
   CUENTA CERRADA
========================================================= */

.cuenta-cerrada-result {
  text-align: center;
  padding: 45px 25px;
}

.cuenta-cerrada-icon {
  margin-bottom: 20px;
}

.cuenta-cerrada-icon i {
  color: #263065;
  font-size: 48px;
}

.cuenta-cerrada-result h2 {
  margin: 0 0 15px;
  color: #263065;
  font-size: 22px;
}

.cuenta-cerrada-result p {
  margin: 0 0 15px;
  color: #333;
  font-size: 16px;
}

.cuenta-cerrada-result .perfil-info {
  max-width: 600px;
  margin: 0 auto 25px;
}

.cuenta-cerrada-result .usuarios-form-buttons {
  justify-content: center;
}
/* =========================================================
   CERRAR CUENTA
========================================================= */

.perfil-danger-section {
  border-top: 2px solid #e83c3d;
}

.perfil-danger-section h2 {
  color: #b02020;
}

.perfil-danger-section h2 i {
  color: #b02020;
}

.cerrar-cuenta-form {
  text-align: right;
}

.cerrar-cuenta-form {
  margin-top: 20px;
}

.cerrar-cuenta-button {
  display: inline-flex;
  align-items: end;
  justify-content: end;
  gap: 8px;

  padding: 10px 16px;

  background-color: #fff;
  color: #b02020;

  border: 1px solid #b02020;

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.cerrar-cuenta-button:hover {
  background-color: #e83c3d;
  border-color: #e83c3d;
  color: #fff;
}

/* =========================================================
   PESTAÑAS DEL PERFIL
========================================================= */

.perfil-tabs {
  display: flex;
  width: 100%;
  border-bottom: 2px solid #263065;
}

.perfil-tab-button {
  flex: 1;
  border: none;
  border-bottom: 3px solid transparent;
  background: #f1f1f1;
  color: #555;
  padding: 14px 18px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.perfil-tab-button + .perfil-tab-button {
  border-left: 1px solid #ddd;
}

.perfil-tab-button:hover {
  background: #e8e8e8;
  color: #263065;
}

.perfil-tab-button.active {
  background: #263065;
  color: #fff;
  border-bottom-color: #e83c3d;
}

.perfil-tab-button i {
  margin-right: 7px;
}

/* =========================================================
   CONTENIDO DE LAS PESTAÑAS
========================================================= */

.perfil-tab-content {
  display: none;

  margin: 0;
  padding: 0.5rem 2rem;
  background: #444;
}

.perfil-tab-content.active {
  display: block;
}

/* =========================================================
   CERRAR CUENTA
========================================================= */

.perfil-danger-section {
  border-top: 3px solid #e83c3d;
}

.perfil-danger-section h2 {
  background-color: #b02020;
  color: #fff;
  padding-top: 1rem;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 600px) {
  .perfil-tab-button {
    padding: 13px 8px;
    font-size: 14px;
  }

  .perfil-tab-button i {
    margin-right: 4px;
  }
}
/* =========================================================
   CONTACTO
========================================================= */

.contacto-section {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------------------------------------------------
   HONEYPOT
--------------------------------------------------------- */

.contacto-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ---------------------------------------------------------
   BOTÓN CONTACTO
--------------------------------------------------------- */

.contacto-boton {
  display: flex;
  justify-content: center;
  margin-top: 25px;
}

.contacto-boton .login-button {
  width: fit-content;
  min-width: 190px;
  text-decoration: none;
}

/* ---------------------------------------------------------
   ÉXITO
--------------------------------------------------------- */

.contacto-exito {
  text-align: center;
  padding: 45px 25px;
}

.contacto-exito-icono {
  margin-bottom: 18px;
}

.contacto-exito-icono i {
  font-size: 52px;
}

.contacto-exito h2 {
  margin-bottom: 15px;
}

.contacto-exito p {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* =========================================================
   CABECERAS ORDENABLES
========================================================= */

.usuarios-sort-link {
  display: inline-flex;

  align-items: center;

  gap: 3px;

  color: inherit;

  text-decoration: none;

  cursor: pointer;
}

.usuarios-sort-link:hover {
  color: inherit;

  text-decoration: none;
}

.usuarios-sort-icon {
  font-size: 1.25rem;

  line-height: 1;

  opacity: 0.9;
}

/* =========================================================
   EVENTOS DE SEGURIDAD
========================================================= */

.eventos-seguridad-table .evento-fecha {
  color: #263065;
  font-weight: 600;
  white-space: nowrap;
}

.eventos-seguridad-table .evento-fecha span {
  display: block;
}

.eventos-seguridad-table .evento-fecha small {
  display: block;
  margin-top: 3px;

  color: #777;

  font-size: 11px;
  font-weight: 400;
}

/* ---------------------------------------------------------
   EVENTO
--------------------------------------------------------- */

.evento-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 5px 9px;

  border: 1px solid transparent;

  font-size: 13px;
  font-weight: 600;

  white-space: nowrap;
}

.evento-badge i {
  font-size: 14px;
}

/* LOGIN */

.evento-login {
  color: #287a5a;
  background-color: #eef7f2;
  border-color: #cfe7da;
}

/* GOOGLE */

.evento-google {
  color: #263065;
  background-color: #f0f1f7;
  border-color: #d9dbea;
}

/* GOOGLE VINCULADO */

.evento-vinculado {
  color: #287a5a;
  background-color: #eef7f2;
  border-color: #cfe7da;
}

/* GOOGLE DESVINCULADO */

.evento-desvinculado {
  color: #b02020;
  background-color: #fff3f3;
  border-color: #e0aaaa;
}

/* CAMBIO PASSWORD */

.evento-password {
  color: #8a6414;
  background-color: #faf5e7;
  border-color: #eadcb5;
}

/* RECUPERACIÓN */

.evento-recuperacion {
  color: #8a6414;
  background-color: #faf5e7;
  border-color: #eadcb5;
}

/* EVENTO DESCONOCIDO */

.evento-generico {
  color: #555;
  background-color: #f5f5f5;
  border-color: #ddd;
}

/* ---------------------------------------------------------
   IP
--------------------------------------------------------- */

.evento-ip code {
  display: inline-block;

  padding: 4px 7px;

  background-color: #f5f5f5;

  border: 1px solid #ddd;

  color: #555;

  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;

  white-space: nowrap;
}

/* ---------------------------------------------------------
   USUARIO ELIMINADO
--------------------------------------------------------- */

.evento-usuario-eliminado {
  color: #777;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 800px) {
  .eventos-seguridad-table .evento-fecha {
    text-align: left;
  }

  .eventos-seguridad-table .evento-ip {
    text-align: right;
  }

  .evento-badge {
    white-space: normal;
    text-align: left;
  }
}

@media (max-width: 500px) {
  .eventos-seguridad-table .evento-fecha span,
  .eventos-seguridad-table .evento-fecha small {
    display: inline;
  }

  .eventos-seguridad-table .evento-fecha small::before {
    content: " · ";
  }
}
.usuarios-admin-action {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

/* ============================================================
   PESTAÑAS DE ADMINISTRACIÓN
   ============================================================ */

.admin-tabs {
  display: flex;
  width: 100%;
  margin: 0 0 30px;
  border-bottom: 2px solid #263065;
  overflow-x: auto;
}

.admin-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 13px 20px;

  color: #263065;
  background: transparent;

  border: 1px solid transparent;
  border-bottom: none;

  text-decoration: none;
  font-weight: 700;

  white-space: nowrap;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.admin-tab:hover {
  color: #e83c3d;
  background: #f7f3eb;
}

.admin-tab.active {
  color: #fff;
  background: #263065;
}

.admin-tab i {
  font-size: 1.05rem;
}

/* ============================================================
   ESTADÍSTICAS
   ============================================================ */

.estadisticas-section {
  width: 100%;
}

.estadisticas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 25px;
}

.estadisticas-header h2 {
  margin: 0 0 6px;

  color: #263065;

  font-size: 1.35rem;
  font-weight: 700;
}

.estadisticas-header h2 i {
  margin-right: 7px;
}

.estadisticas-header p {
  margin: 0;

  color: #666;

  font-size: 0.95rem;
}

/* ============================================================
   TABLA ESTADÍSTICAS
   ============================================================ */

.estadisticas-table {
  width: 100%;
}

.estadisticas-table td strong {
  color: #263065;
  font-size: 1.05rem;
}

.estadistica-archivo {
  max-width: 600px;

  word-break: break-word;
  overflow-wrap: anywhere;

  font-family: Consolas, "Courier New", monospace;

  font-size: 0.88rem;
}

.estadistica-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  color: #263065;

  font-size: 0.9rem;
  font-weight: 700;
}

.estadistica-badge i {
  font-size: 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .admin-tabs {
    margin-bottom: 25px;
  }

  .admin-tab {
    flex: 1 0 auto;

    padding: 11px 14px;

    font-size: 0.9rem;
  }

  .estadisticas-header {
    display: block;
  }

  .estadisticas-header p {
    margin-top: 8px;
  }
}

@media (max-width: 600px) {
  .admin-tabs {
    border-bottom: none;
    gap: 5px;

    overflow-x: auto;
  }

  .admin-tab {
    border: 1px solid #263065;
  }

  .admin-tab.active {
    border-color: #263065;
  }
}
/* ============================================================
   PESTAÑAS DE ADMINISTRACIÓN
   ============================================================ */

.usuarios-tabs {
  display: flex;
  width: 100%;

  margin: 0 0 30px;

  border-bottom: 2px solid #263065;

  overflow-x: auto;
}

.usuarios-tab {
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  padding: 14px 18px;

  border: none;
  border-bottom: 3px solid transparent;

  background: #f1f1f1;
  color: #555;

  font-family: inherit;
  font-size: 15px;
  font-weight: 700;

  text-decoration: none;

  white-space: nowrap;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

/* Separador entre pestañas */

.usuarios-tab + .usuarios-tab {
  border-left: 1px solid #ddd;
}

/* Hover */

.usuarios-tab:hover {
  background: #e8e8e8;
  color: #263065;

  text-decoration: none;
}

/* Pestaña activa */

.usuarios-tab.active {
  background: #263065;
  color: #fff;

  border-bottom-color: #e83c3d;
}

/* Iconos */

.usuarios-tab i {
  font-size: 1.05rem;
}

/* ------------------------------------------------------------
   MÓVIL
------------------------------------------------------------ */

@media (max-width: 600px) {
  .usuarios-tabs {
    margin-bottom: 25px;

    overflow-x: auto;
  }

  .usuarios-tab {
    flex: 0 0 auto;

    padding: 11px 14px;

    font-size: 0.9rem;
  }
}

/* ============================================================
   MAPA - EVENTOS DE SEGURIDAD
   ============================================================ */
div#eventoMapaGeneralModal h5.modal-title,
div#eventoMapaModal h5.modal-title {
  color: #555;
  text-transform: uppercase;
  font-size: 1rem;
  font-weight: bold;
}
.evento-mapa {
  text-align: center;
  vertical-align: middle;
}

.evento-mapa-btn {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  padding: 0;

  border: 1px solid #263065;
  border-radius: 4px;

  background: #263065;
  color: #fff;

  cursor: pointer;

  transition:
    background-color 0.2s ease,
    transform 0.15s ease;
}

.evento-mapa-btn:hover {
  background: #e83c3d;
  border-color: #e83c3d;

  transform: translateY(-1px);
}

.evento-mapa-btn i {
  font-size: 1.1rem;
}

.evento-mapa-pendiente {
  opacity: 0.75;
}

/* Información */

.evento-mapa-datos {
  display: flex;

  flex-direction: column;

  gap: 6px;

  margin-bottom: 15px;

  padding: 12px 15px;

  border-left: 4px solid #e83c3d;

  background: #efe6d6;
  color: #555;

  border-radius: 3px;
  line-height: 1.5rem;

  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Contenedor Leaflet */

.evento-mapa-container {
  width: 100%;

  height: 420px;

  border-radius: 4px;

  overflow: hidden;

  border: 1px solid #ccc;
}

.evento-mapa-info code {
  font-size: 0.9rem;
}
.newsletter-history-draft {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  font-weight: 600;
}

/* ============================================================
   MAPA GENERAL
============================================================ */

.eventos-mapa-general-acciones {
  margin-bottom: 15px;
}

.evento-mapa-general-container {
  width: 100%;
  height: 70vh;
  min-height: 500px;
}

.evento-mapa-popup {
  min-width: 240px;
  line-height: 1.5;
}

.evento-mapa-popup > div {
  margin-bottom: 4px;
}

.evento-mapa-popup > div:last-child {
  margin-bottom: 0;
}

.evento-mapa-popup i {
  margin-right: 5px;
}

/* =========================================================
   DATOS DE LA CUENTA + FOTO DE PERFIL
========================================================= */

.perfil-cuenta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 40px;
  align-items: start;
}

.perfil-cuenta-datos {
  min-width: 0;
}

.perfil-cuenta-foto {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.perfil-cuenta-foto h3 {
  margin: 0 0 20px;
  font-size: 1.15rem;
  color: #555;
  font-weight: bold;
}

.perfil-avatar,
.admin-avatar-preview {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: solid 1px #263065;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.perfil-avatar img,
.admin-avatar-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.perfil-avatar-estado {
  margin: 15px 0 0;
  font-size: 0.9rem;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .perfil-cuenta-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .perfil-cuenta-foto {
    order: -1;
  }
}
/* =========================================================
   GESTIÓN DE FOTO DE PERFIL
========================================================= */

.perfil-avatar-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.perfil-avatar-file-input {
  display: none;
}

.perfil-avatar-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  margin-top: 5px;
  padding: 9px 16px;

  cursor: pointer;

  border-radius: 6px;

  font-size: 0.9rem;
  font-weight: 500;

  background: #eee;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.perfil-avatar-help {
  display: block;

  margin-top: 8px;

  font-size: 0.78rem;
  text-align: center;

  color: #999;
}

.perfil-avatar-save-button {
  margin-top: 15px;
  width: auto;
}

.perfil-avatar-delete-form {
  margin-top: 10px;
  text-align: center;
}

.perfil-avatar-delete-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  padding: 7px 13px;

  border: 0;
  border-radius: 6px;

  cursor: pointer;

  color: #555;
  font-size: 0.9rem;

  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.admin-avatar-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.admin-avatar-info {
  min-width: 0;
}

.admin-avatar-estado {
  margin: 0 0 15px;
}
.admin-avatar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}

.admin-avatar-upload-form {
  margin: 0;
}

.admin-avatar-delete-form {
  margin: 0;
}

.admin-avatar-actions .perfil-avatar-file-button {
  margin-top: 0;
}

@media (max-width: 768px) {
  .admin-avatar-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .admin-avatar-info {
    width: 100%;
  }
}

.usuarios-avatar {
  width: 48px;
  height: 48px;
  margin: 0 auto;

  border-radius: 50%;
  overflow: hidden;
}

.usuarios-avatar img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  border: solid 1px #263065;
  border-radius: 50%;

  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
}
.usuarios-avatar-link {
  display: inline-block;
  border-radius: 50%;
  text-decoration: none;
}

.usuarios-avatar-link:focus-visible {
  outline: 2px solid #263065;
  outline-offset: 3px;
}
