/* =========================
   BASE
========================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  color: #333;
}

.container,
.contenedor-principal {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.container {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  margin-top: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.contenedor-principal {
  padding: 0 10px;
}

h1,
h2 {
  text-align: center;
  color: #333;
}

label {
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #344054;
}

input,
textarea,
select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  margin-top: 5px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid #cfd6dd;
  background: #fff;
  font-size: 16px;
}

textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.4;
}

button {
  border: none;
  border-radius: 10px;
  min-height: 38px;
  padding: 0 14px;
  background-color: #2b7cff;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background-color: #1a5ed8;
  transform: translateY(-1px);
}

/* =========================
   HEADER
========================= */

.header-informe {
  border-bottom: 2px solid #ddd;
  padding-bottom: 15px;
  margin-bottom: 20px;
  text-align: center;
}

.logo-wrap {
  width: 100%;
  text-align: center;
  margin-bottom: 12px;
}

.logo-empresa {
  display: block;
  width: 120px;
  max-width: 100%;
  height: auto;
  margin: 0 auto 10px auto;
}

.header-texto {
  width: 100%;
  text-align: center;
}

.header-texto h1 {
  margin: 0;
  font-size: 24px;
  color: #222;
  line-height: 1.2;
}

.header-texto h2 {
  margin: 8px 0 0 0;
  font-size: 18px;
  color: #555;
  line-height: 1.2;
}

.fecha-header {
  margin: 8px 0 0 0;
  font-size: 14px;
  color: #666;
}

.usuario-barra {
  flex: 1;
  margin: 0;
  padding: 0;
  background: transparent;
}

.usuario-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* =========================
   BLOQUES / PANELES
========================= */

.bloque-acciones,
.form-bloque,
#formulario-informe,
#seccion-historial,
#panel-usuario-seleccionado {
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.bloque-acciones,
#formulario-informe,
#seccion-historial,
#panel-usuario-seleccionado {
  padding: 14px;
  margin-bottom: 14px;
}

.form-bloque {
  padding: 12px;
  margin-bottom: 12px;
}

.bloque-acciones h3,
.form-bloque h3,
#formulario-informe h3,
#seccion-historial h2,
#panel-usuario-seleccionado h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.2;
  color: #1f2a37;
}

#titulo-formulario {
  text-align: center;
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: bold;
  color: #333;
}

.modo-edicion {
  color: #c62828;
}

/* =========================
   ACCIONES / BOTONES
========================= */

.acciones-principales,
.form-botones,
.filtro-botones,
.acciones-superiores,
.modal-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acciones-principales {
  margin-bottom: 15px;
}

.acciones-principales button,
.form-botones button,
.filtro-botones button,
.acciones-superiores button {
  flex: 1;
}

.btn-cancelar {
  background: #d9dde3;
  color: #1f2a37;
}

.btn-cancelar:hover {
  background: #c9cfd7;
}

.btn-eliminar,
.btn-desactivar {
  background: #c62828;
  color: #fff;
}

.btn-eliminar:hover,
.btn-desactivar:hover {
  background: #a81f1f;
}

.btn-activar {
  background: #2e7d32;
  color: #fff;
}

.btn-activar:hover {
  background: #256729;
}

.btn-pdf,
.btn-imprimir {
  color: #fff;
  font-size: 14px;
}

.btn-pdf {
  background-color: #038943;
}

.btn-imprimir {
  background-color: #1e1d1d;
}

.btn-pdf:hover,
.btn-imprimir:hover {
  background: #1254a0;
}

.btn-pdf:hover {
  background-color: #1f6fd6;
}

.btn-imprimir:hover {
  background-color: #555;
}

#btnSalirApp {
  min-width: 100px;
}

.acciones-ot {
  margin-top: 12px;
  text-align: center;
}

.btn-descargar {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1565c0;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

/* =========================
   FORMULARIO INFORME
========================= */

#formulario-informe label {
  font-size: 14px;
}

#formulario-informe input,
#formulario-informe select,
#formulario-informe textarea {
  font-size: 16px;
}

.label-discreto {
  font-size: 16px;
  color: #666;
}

.select-discreto {
  font-size: 14px;
  padding: 4px 6px;
  max-width: 220px;
}

.info-ot {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}

.ayuda-ot {
  font-size: 13px;
  color: #777;
  margin-top: 4px;
}

.orden-trabajo-box a {
  display: block;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.3;
}

.acciones-historial {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.acciones-historial button {
  min-width: 140px;
}

.link-ot-informe {
  display: block;
  margin-top: 4px;
  font-size: 14px;
  color: #1565c0;
  text-decoration: underline;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.link-ot-inline {
  color: #065dc0;       /* azul link claro */
  text-decoration: underline;
  margin-left: 8px;
  font-weight: 500;
}

.link-ot-inline:hover {
  text-decoration: none;
}

.link-ot-inline:active {
  opacity: 0.6;
}

/* =========================
   IMÁGENES
========================= */

#lista-imagenes-seleccionadas {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.preview-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin: 5px;
}

#detalles-imagenes {
  margin-top: 10px;
}

.bloque-imagen-detalle {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
}

.bloque-imagen-detalle input[disabled] {
  background: #f3f3f3;
  color: #666;
}

.contenedor-imagenes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.img-mini {
  width: 100%;
  height: 80px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.img-mini:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.imagen-con-detalle {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detalle-img-texto {
  font-size: 13px;
  color: #444;
  margin: 0;
}

.campo-requerido-ot {
  border: 2px solid #f59e0b !important;
  background-color: #fff8e6;
}

/* =========================
   HISTORIAL
========================= */

.historial-header {
  margin-top: 20px;
  text-align: center;
}

.historial-oculto {
  display: none;
}

.historial-visible {
  display: block;
  margin-top: 20px;
}

#lista-informes {
  margin-top: 20px;
}

.informe-item {
  padding: 12px;
  border: 1px solid #dde3ea;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

.informe-item:hover {
  background: #f8fafc;
}

.informe-item p {
  margin: 0 0 6px 0;
  font-size: 16px;
  color: #555;
}

.informe-seleccionado {
  border-color: #1565c0;
  background: #eef5ff;
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.08);
}

.sin-informes {
  text-align: center;
  color: #888;
  font-style: italic;
}

.subtipo-informe,
.subtipo-informe-vista {
  font-weight: 700;
  color: #1565c0;
  font-size: 18px;
  text-decoration: underline;
  margin: 4px 0 8px 0;
}

/* =========================
   FILTROS HISTORIAL
========================= */

.filtros-historial {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
  padding: 10px 12px;
  border: 1px solid #dde3ea;
  border-radius: 12px;
  background: #f8fafc;
}

.filtro-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.filtro-item label {
  margin: 0;
  line-height: 1.2;
  font-size: 13px;
}

.grupo-inputs-fecha {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.grupo-inputs-fecha input[type="date"],
.filtro-establecimiento input {
  width: 100%;
  min-width: 0;
  height: 34px;
  font-size: 14px;
}

.filtro-establecimiento {
  width: 100%;
}

.filtro-botones {
  width: 100%;
}

.filtro-botones button {
  flex: 1;
  min-height: 36px;
  font-size: 13px;
}

.fila-filtros-fecha {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filtro-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.filtro-inline label {
  margin: 0;
  min-width: 42px;
  font-size: 13px;
  white-space: nowrap;
}

.filtro-inline input[type="date"] {
  margin: 0;
  height: 36px;
  font-size: 14px;
}

.filtro-establecimiento label {
  margin-bottom: 4px;
  font-size: 13px;
}

.filtro-establecimiento input {
  margin: 0;
  height: 36px;
  font-size: 14px;
}

.filtro-botones {
  display: flex;
  gap: 8px;
  width: 100%;
}

.filtro-botones button {
  flex: 1;
  min-height: 36px;
  font-size: 13px;
}


/* =========================
   USUARIOS
========================= */

#mensaje-usuario,
#mensaje-editar-usuario {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
}

.usuario-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.usuario-item p {
  margin: 4px 0;
}

.usuario-item-info {
  flex: 1;
  min-width: 240px;
}

.usuario-acciones {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.usuario-item-acciones {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.estado-activo {
  color: green;
  font-weight: bold;
}

.estado-inactivo {
  color: red;
  font-weight: bold;
}

.usuario-item-compacto {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid #dde3ea;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: 0.2s ease;
}

.usuario-item-compacto:hover {
  background: #f7f9fb;
}

.usuario-item-compacto.seleccionado,
.usuario-item-seleccionado {
  border-color: #1565c0;
  background: #eef5ff;
}

.usuario-item-compacto-info {
  flex: 1;
}

.usuario-item-compacto-check {
  flex-shrink: 0;
}

.usuario-item-nombre {
  margin: 0 0 4px 0;
  font-weight: 700;
}

.usuario-item-estado {
  margin: 0;
  font-size: 14px;
}

#panel-usuario-seleccionado {
  margin-top: 20px;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fafafa;
}

.acciones-usuario-seleccionado {
  margin: 12px 0 18px 0;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
}

.acciones-usuario-seleccionado-titulo {
  margin-bottom: 10px;
  font-size: 14px;
}

.acciones-usuario-seleccionado-botones {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.acciones-superiores {
  margin-bottom: 15px;
}

.resumen-usuario-seleccionado {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #d9e2ec;
  border-radius: 12px;
  background: #f8fafc;
}

.resumen-usuario-linea {
  margin-bottom: 6px;
  font-size: 13px;
}

.resumen-usuario-linea:last-child {
  margin-bottom: 0;
}

.usuario-etiqueta {
  font-size: 12px;
  color: #667085;
}

#usuario-logueado {
  font-size: 14px;
  font-weight: 600;
  color: #1f2a37;
}

/* =========================
   LOGIN
========================= */

.pantalla-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 360px;
  background: #fff;
  padding: 24px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.login-box h2 {
  margin-top: 0;
  margin-bottom: 18px;
  text-align: center;
}

.login-error {
  color: #c62828;
  margin-top: 12px;
  text-align: center;
}

.login-header {
  text-align: center;
  margin-bottom: 18px;
}

.login-logo {
  width: 90px;
  height: auto;
  margin: 0 auto 10px auto;
  display: block;
}

.login-header h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: #222;
}

.login-header h2 {
  margin: 0;
  font-size: 18px;
  color: #555;
  font-weight: normal;
}

/* =========================
   SESIÓN / VERSIÓN
========================= */

.acciones-sesion {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}

.version-app {
  text-align: center;
  font-size: 12px;
  color: #667085;
  margin: 14px 0 8px 0;
}

/* =========================
   VISOR IMAGEN
========================= */

.visor {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(0, 0, 0, 0.9);
  padding: 20px;
  justify-content: center;
  align-items: center;
}

.visor.activo {
  display: flex;
}

.visor-imagen-box {
  width: 100%;
  height: 100%;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.visor-contenido {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 10px;
  background: #fff;
}

.detalle-imagen-grande {
  color: #fff;
  font-size: 16px;
  text-align: center;
  margin: 8px auto 0 auto;
  max-width: 90vw;
}

img {
  image-orientation: from-image;
}

.cerrar {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 99999;

  color: #fff;
  font-size: 24px;
  font-weight: bold;

  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

/* =========================
   VISOR INFORME
========================= */

.visor-informe {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.75);
  padding: 20px;
  overflow-y: auto;
}

.visor-informe.activo {
  display: block;
}

#numeroOT {
  text-transform: uppercase;
}

.visor-informe-contenido {
  max-width: 850px;
  margin: 20px auto;
  background: #fff;
  border-radius: 10px;
  padding: 25px;
  position: relative;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.visor-ot-imagen-wrap {
  width: 100%;
  height: 70vh;
  overflow: auto;
  border-radius: 8px;
  background: #000;
  position: relative;
}

.visor-ot-zoom-layer {
  transform: scale(1);
  transform-origin: top center;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 100%;
  min-height: 100%;
}

#imagen-ot-zoom {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  cursor: grab;
}

.cerrar-informe {
  position: absolute;
  top: 12px;
  right: 18px;
  z-index: 1200;
  display: block;
  font-size: 30px;
  color: #444;
  cursor: pointer;
}

.informe-vista-header {
  text-align: center;
  border-bottom: 2px solid #ddd;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.informe-vista-logo {
  display: block;
  max-width: 180px;
  max-height: 90px;
  width: auto;
  height: auto;
  margin: 0 auto 12px auto;
}

.informe-vista-header h1 {
  margin: 0;
  font-size: 24px;
  color: #222;
}

.informe-vista-header h2 {
  margin: 8px 0 0 0;
  font-size: 18px;
  color: #555;
}

.informe-vista-fecha {
  margin-top: 8px;
  font-size: 14px;
  color: #666;
}

.informe-vista-bloque {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.informe-vista-bloque h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #222;
}

.informe-vista-bloque a,
.orden-trabajo-box a,
#contenido-ot a {
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: bottom;
}

.informe-vista-bloque p {
  margin: 4px 0;
  line-height: 1.5;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.galeria-informe {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  text-align: center;
}

.imagen-con-detalle {
  width: calc(50% - 6px);
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  break-inside: avoid;
  page-break-inside: avoid;
}

.imagen-con-detalle img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 6px;
  display: block;
  border: 1px solid #ddd;
  cursor: pointer;
  margin: auto;
}

.detalle-img-texto {
  margin-top: 6px;
  font-size: 12px;
}

.acciones-informe-final {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.fila-botones {
  display: flex;
  gap: 8px;
  width: 100%;
}

.fila-botones button {
  flex: 1;
  margin: 0;
  width: auto !important;
  min-width: 0;
}

.filtros-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #dde3ea;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

#icono-filtros-historial {
  font-size: 22px;
  font-weight: bold;
  color: #344054;
}

.filtros-colapsados {
  display: none !important;
}

/* =========================
   MODAL CONFIRMACIÓN
========================= */

.modal-confirmacion {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
}

.modal-box {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  max-width: 320px;
  text-align: center;
}

.modal-botones {
  margin-top: 15px;
  justify-content: center;
}

.modal-botones button {
  width: auto !important;
  min-width: 110px;
  margin: 0;
}

.oculto {
  display: none !important;
}

/* =========================
   TOASTS
========================= */

.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.toast {
  min-width: 260px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: auto;
}

.toast.mostrar {
  opacity: 1;
  transform: translateY(0);
}

.toast.exito {
  background: #2e7d32;
}

.toast.error {
  background: #c62828;
}

.toast.info {
  background: #1565c0;
}

.toast.loading {
  background: rgba(33, 33, 33, 0.95);
}

.toast-loading-contenido {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.toast-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: girar-toast 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes girar-toast {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   MÓVIL
========================= */

@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 14px;
    border-radius: 0;
  }

  .logo-empresa {
    width: 160px;
    margin: 0 auto 8px auto;
  }

  .header-texto h1 {
    font-size: 20px;
  }

  .header-texto h2 {
    font-size: 16px;
  }

  .fecha-header {
    font-size: 18px;
  }

  label {
    font-size: 16px;
  }

  input,
  textarea,
  select {
    font-size: 16px;
    padding: 12px;
  }

  button {
    font-size: 16px;
    padding: 12px;
  }

  .acciones-principales button,
  .btn-cancelar {
    width: 100%;
  }

  .contenedor-imagenes {
    grid-template-columns: repeat(2, 1fr);
  }

  .img-mini {
    height: 100px;
  }

  .visor-informe {
    padding: 10px;
  }

  .visor-informe-contenido {
    margin: 0;
    max-width: 100%;
    padding: 16px;
    border-radius: 8px;
  }

  .cerrar-informe {
    top: 8px;
    right: 12px;
    font-size: 28px;
  }

  .fila-botones button {
    font-size: 13px;
    padding: 10px 6px;
  }

  .grupo-inputs-fecha {
    flex-direction: column;
  }

  .usuario-acciones {
    align-items: flex-start;
  }

  #btnSalirApp {
    width: 140px;
  }

  .imagen-con-detalle {
    width: 100%;
    text-align: center;
  }

  .imagen-con-detalle img {
    height: 160px;
  }

  .cerrar {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .fila-filtros-fecha {
    flex-direction: column;
    gap: 8px;
  }

  .filtro-inline {
    min-width: 0;
  }

  .filtro-inline label {
    min-width: 50px;
  }

.notificacion-item {
    padding: 8px;
  }

  .notificacion-mensaje {
    font-size: 12px;
  }

  .notificacion-fecha {
    font-size: 10px;
  }

  .notificacion-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .btn-mini {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 10px;
    min-width: 62px;
  }

}

/* =========================
   DESKTOP
========================= */

@media (min-width: 768px) {
  .acciones-principales button,
  .form-botones button,
  .acciones-superiores button {
    flex: initial;
  }

  .filtros-historial {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .filtro-fechas {
    min-width: 320px;
  }

  .grupo-inputs-fecha {
    flex-direction: row;
  }

  .grupo-inputs-fecha input[type="date"] {
    flex: 1;
  }

  .filtro-establecimiento {
    flex: 1;
    min-width: 220px;
  }

  .filtro-botones {
    width: auto;
  }

  .filtro-botones button {
    flex: initial;
    min-width: 90px;
    padding: 0 12px;
  }

  .notificacion-item {
    padding: 10px 12px;
  }

  .notificacion-mensaje {
    font-size: 13px;
  }

  .notificacion-fecha {
    font-size: 11px;
  }

  .btn-mini {
    min-height: 30px;
    font-size: 11px;
  }

}

/* =========================
   IMPRESIÓN
========================= */

@media print {
  .acciones-informe-final,
  .cerrar-informe,
  button {
    display: none !important;
  }
}

.link-cambiar-clave-wrap {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.link-cambiar-clave {
  font-size: 13px;
  color: #1565c0;
  cursor: pointer;
}

.link-cambiar-clave:hover {
  text-decoration: underline;
}

.usuario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.notificacion-item {
  border: 1px solid #dde3ea;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.notificacion-mensaje {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #1f2a37;
  line-height: 1.35;
  word-break: break-word;
}

.notificacion-fecha {
  margin: 3px 0 6px 0;
  font-size: 10px;
  color: #667085;
}

.notificacion-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-mini {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 11px;
  line-height: 1.2;
  border-radius: 6px;
  width: auto !important;
  min-width: 68px;
  flex: 0 0 auto;
}

.btn-leida {
  background: #d9dde3;
  color: #1f2a37;
}

.btn-leida:hover {
  background: #c9cfd7;
}

.admin-header-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 10px;
  padding: 6px 0;
}

.admin-header-toggle h3 {
  margin: 0;
}

.admin-header-toggle:active {
  opacity: 0.7;
}

#icono-admin-toggle {
  font-size: 24px;       /* más grande */
  font-weight: bold;
  color: #344054;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 32px;
  height: 32px;

  border-radius: 6px;
  background: #eef2f6;
}

#contenido-admin-panel {
  margin-top: 12px;
}

#btnSalirApp {
  display: block;
  width: 50%;
  margin-top: 10px;
}

.sin-ot {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #667085;
}

#lista-imagenes-seleccionadas {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tarjeta-imagen-detalle {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
  padding: 10px;
  text-align: center;
}

.tarjeta-imagen-detalle label {
  display: block;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 13px;
}

.tarjeta-imagen-detalle input {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  text-align: center;
}

.tarjeta-imagen-detalle .preview-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin: 0;
}

#detalles-imagenes {
  display: none;
}

@media (min-width: 768px) {
  .tarjeta-imagen-detalle {
    width: calc(50% - 5px);
  }
}

@media (max-width: 768px) {
  .tarjeta-imagen-detalle .preview-img {
    height: 160px;
  }
}
