/* Fondo general y tipografía */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Tahoma', Arial, Helvetica, sans-serif;
  color: #fff;
}

.header-logo,
.img-logo-lista {
  max-width: 180px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 18px auto;
}

@media (max-width: 600px) {
  .header-logo,
  .img-logo-lista {
    max-width: 120px;
    margin-bottom: 12px;
  }
}

.tabla-reportes-contenedor {
  display: table;
  table-layout: auto;
  margin: 0 auto 24px auto;
  padding: 8px 0;
  box-sizing: border-box;
  max-width: 1200px;
  width: auto;
  overflow-x: visible;
}

@media (max-width: 900px) {
  .tabla-reportes-contenedor {
    display: block;
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
  }
}

.tabla-reportes {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  background: transparent;
  margin-bottom: 0;
  color: #fff;
  table-layout: auto;
}

@media (max-width: 800px) {
  .tabla-reportes {
    min-width: 520px;
    font-size: 0.97em;
  }
}
body {
  min-height: 100vh;
  background: url('png/fondo.png') no-repeat center center fixed, linear-gradient(135deg, #06359e 0%, #137a13 100%);
  background-size: cover;
}

/* Contenedores principales */
.container {
  background: #182951;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(24,41,81,0.10);
  margin: 48px auto;
  display: table;
  table-layout: auto;
  max-width: 1200px;
  min-width: 320px;
  width: auto;
  padding: 28px 18px 24px 18px;
  text-align: center;
}

@media (max-width: 900px) {
  .container {
    display: block;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    padding: 10px 2px;
    box-sizing: border-box;
  }
}
.login-box, .success-card, .tabla-container {
  background: #182951;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(24,41,81,0.10);
  margin: 48px auto;
}
.success-card { max-width: 600px; padding: 36px 32px 32px 32px; text-align: center; }
.login-box { max-width: 420px; padding: 48px 36px 36px 36px; text-align: center; }

/* Mejor separación entre label e input en login */
.login-box label {
  display: block;
  margin-bottom: 7px;
  font-weight: 500;
  color: #fff;
}
.login-box input[type="text"],
.login-box input[type="password"] {
  margin-top: 0;
  margin-bottom: 18px;
}
.success-card { border-radius: 12px; padding: 36px 28px 28px 28px; max-width: 370px; position: relative; }
.tabla-container { max-width: 1000px; padding: 24px 12px 24px 12px; overflow-x: auto; }

.text-center { text-align: center; }
.mb-2 { margin-bottom: 2px; }
.mb-8 { margin-bottom: 8px; }
.mb-18 { margin-bottom: 18px; }
.logo-img { width: 138px; height: 132px; display: block; margin: 0 auto 0 auto; }
.video-icon img { width: 25px; height: 30px; vertical-align: middle; margin-left: 4px; margin-right: 2px; }
.video-icon { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.video-label { font-size: 0.95em; color: #06359e; font-weight: 500; margin-left: 2px; }
.logo-login { width: 110px; margin-bottom: 22px; }

h1, h2 {
  color: #fff;
  margin-top: 0;
}
h1 { font-size: 1.7em; }
h2 { font-size: 1.2em; margin-bottom: 18px; }

.campo-lesco { margin-bottom: 18px; text-align: left; }
.campo-lesco-label-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.label-no-margin { margin-bottom: 0; font-weight: 500; color: #06359e; }

input[type="text"], input[type="password"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1.5px solid #137a13;
  font-size: 1em;
  background: #f7faff;
  margin-bottom: 8px;
  box-sizing: border-box;
  transition: border 0.2s;
  color: #222;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus, select:focus {
  border: 2px solid #06359e;
  outline: 2.5px solid #137a13;
  background: #e6f7ff;
}
textarea { min-height: 60px; resize: vertical; }
label, .label-no-margin { color: #fff; font-weight: 500; }

button, .btn-descargar, .btn-custom-file, .btn-guardar-edicion, .btn-cancelar-edicion, .btn-buscar, .btn-descargar-pdf {
  background: #137a13;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: bold;
  transition: background 0.2s;
  padding: 10px 22px;
  cursor: pointer;
}
button:hover, .btn-descargar:hover, .btn-custom-file:hover, .btn-guardar-edicion:hover, .btn-buscar:hover, .btn-descargar-pdf:hover {
  background: #06359e;
}
.btn-ubicacion { background: #054213; margin-top: 10px; }

input[type="file"].input-imagenes { display: none; }
.label-imagenes { color: #fff; font-weight: 500; }

.sr-only { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.estrellas {
  font-size: 2.2em;
  cursor: pointer;
  /*display: inline-flex;*/
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 2px;
  margin-top: 2px;
  margin-bottom: 8px;
}
.radio-oculto { position: absolute; left: -9999px; }
.label-estrella {
  margin: 0 2px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6em;
  height: 1.6em;
  position: relative;
  vertical-align: middle;
}

.label-estrella.selected::before,
.label-estrella .estrella.selected::before,
.label-estrella .estrella-activa::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1em;
  height: 1em;
  background: #ffd600;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 3px 0.5px #ffe06699;
}

.label-estrella .estrella {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font-size: 1.1em;
  position: relative;
  z-index: 2;
  margin: 0 auto;
}
.estrella {
  color: #bbb;
  transition: color 0.2s;
  font-size: 1.2em;
  position: relative;
  z-index: 2;
}
.estrella.selected, .estrella-activa {
  color: #137a13 !important;
  text-shadow: 0 1px 2px #e6ffe6;
  z-index: 2;
}
.estrella-inactiva { color: #bbb !important; }
.span-califica { font-size: 1em; color: #fff; font-weight: 500; }

#calificacionTextoSR { position: relative; min-height: 1.5em; font-size: 1em; color: #fff; margin-top: 2px; }
#screenReaderInstructions { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.footer { margin-top: 32px; color: #fff !important; font-size: 1em; font-weight: 500; }
.copyright-footer { margin-top: 18px; color: #fff; font-size: 0.95em; }

/* Mensajes y modales */
#mensajeEnviado, #mensajeError {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 28px 14px 54px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  font-size: 1.1em;
  min-width: 260px;
  max-width: 90vw;
  outline: 3px solid #fff;
  outline-offset: -4px;
  z-index: 3000;
}
#mensajeEnviado { top: 30px; background: #007a3d; color: #fff; }
#mensajeError { top: 80px; background: #d32f2f; color: #fff; z-index: 3001; }
#iconoMensaje, .icono-error { position: absolute; left: 18px; top: 14px; font-size: 1.5em; }

/* Modal video */
#videoModal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); align-items: center; justify-content: center; }
.video-modal-content { background: #fff; border-radius: 8px; max-width: 90vw; max-height: 80vh; padding: 0; position: relative; box-shadow: 0 4px 24px rgba(0,0,0,0.2); display: flex; flex-direction: column; align-items: center; }
.btn-close-modal { position: absolute; top: 8px; right: 12px; background: transparent; border: none; font-size: 2em; color: #07ea53; cursor: pointer; }
#videoModalTitle { position: absolute; left: -9999px; }
#videoFrame { border: none; border-radius: 8px; margin: 32px 16px 16px 16px; max-width: 80vw; max-height: 60vh; }

/* Tabla de administración y reportes */
.tabla-container {
  background: #182951;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(24,41,81,0.10);
  padding: 24px 12px 24px 12px;
  width: auto;
  min-width: 320px;
  margin: 48px auto 32px auto;
  overflow-x: auto;
  color: #fff;
  display: block;
  max-width: 98vw;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  margin-bottom: 18px;
  color: #fff;
  table-layout: auto;
}
th, td {
  border: 1px solid #e0e3ef;
  padding: 10px 8px;
  text-align: left;
  font-size: 1em;
  color: #fff;
  background: transparent;
}
th {
  background: #06359e;
  color: #fff;
  font-weight: 600;
}
tr:nth-child(even) td { background: #22336a; }
tr:hover td { background: #27407e; }
.logout, .btn-descargar-pdf, .btn-buscar, .btn-paginacion, .btn-paginacion-anterior, .btn-paginacion-siguiente, .pagina-actual {
  color: #fff !important;
  background: #06359e !important;
  border: none;
}

/* Botón cerrar sesión profesional */
.logout {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 1.1em;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  background: #d32f2f !important;
  color: #fff !important;
  border: none;
  margin-bottom: 18px;
  margin-top: 8px;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(24,41,81,0.10);
  cursor: pointer;
}
.logout:hover, .logout:focus {
  background: #b71c1c !important;
  color: #fff !important;
  outline: 3px solid #ffd600;
  outline-offset: 2px;
}
.btn-paginacion { background: #137a13 !important; color: #fff !important; }
.pagina-actual { background: #137a13 !important; color: #fff !important; }

/* Ajuste para lista: los enlaces y textos de la tabla deben ser oscuros */
.tabla-container a, .tabla-container span, .tabla-container td, .tabla-container th {
  color: #222 !important;
  background: transparent;
}
.tabla-container th { color: #fff !important; background: #06359e !important; }

@media (max-width: 900px) {
  .tabla-container { max-width: 99vw; padding: 8px 2px; }
  th, td { font-size: 0.95em; padding: 6px; }
  table { font-size: 0.97em; }
  .tabla-container { overflow-x: auto; }
}

.adjunto-preview { max-width: 120px; max-height: 90px; display: block; margin-top: 4px; border-radius: 6px; box-shadow: 0 1px 4px rgba(24,41,81,0.10); }

/* Botones de paginación y acciones */
.paginacion { margin: 18px 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.btn-paginacion-anterior, .btn-paginacion-siguiente, .btn-paginacion {
  padding: 6px 14px;
  background: #06359e;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-size: 1em;
  font-weight: 500;
  border: none;
  transition: background 0.2s;
}
.btn-paginacion-anterior:hover, .btn-paginacion-siguiente:hover, .btn-paginacion:hover {
  background: #137a13;
}
.pagina-actual {
  padding: 6px 14px;
  background: #137a13;
  color: #fff;
  border-radius: 5px;
  font-weight: bold;
}
.btn-paginacion { background: #e0e7ef; color: #06359e; }

/* Otros */

.form-buscar-reportes {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.input-busqueda {
  max-width: 260px;
  min-width: 120px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid #137a13;
  font-size: 1em;
  margin-right: 10px;
  box-sizing: border-box;
}
.btn-descargar-pdf {
  margin-bottom: 10px;
  margin-right: 16px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 10px;
  background: #fff;
  color: #06359e;
  padding: 8px 18px;
  z-index: 1000;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(24,41,81,0.10);
  outline: none;
  transition: left 0.2s;
}
.skip-link:focus {
  left: 10px;
  outline: 3px solid #137a13;
}

/* Mensajes de éxito y error */
.msg-editado { background:#e6ffe6; color:#137a13; border:1.5px solid #137a13; border-radius:6px; padding:10px 18px; margin-bottom:18px; font-weight:bold; }
.msg-eliminado { background:#ffeaea; color:#e53935; border:1.5px solid #e53935; border-radius:6px; padding:10px 18px; margin-bottom:18px; font-weight:bold; }
.msg-error-edicion { color:#e53935; font-weight:bold; margin-bottom:12px; }

/* Responsive */
@media (max-width: 900px) {
  .tabla-container { max-width: 99vw; padding: 8px 2px; }
  th, td { font-size: 0.95em; padding: 6px; }
  table { font-size: 0.97em; }
}
@media (max-width: 700px) {
  .container { padding: 10px 2px; max-width: 99vw; }
  .login-box { padding: 8vw 2vw 8vw 2vw; max-width: 100vw; width: 100vw; border-radius: 0; min-height: 92vh; box-sizing: border-box; }
  .logo-login { width: 130px; margin-bottom: 32px; }
  input[type="text"], input[type="password"], textarea, select {
    width: 90vw;
    max-width: 380px;
    min-width: 140px;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
  button, .btn-descargar, .btn-custom-file, .btn-guardar-edicion, .btn-cancelar-edicion, .btn-buscar, .btn-descargar-pdf {
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}

/* CSP Fix: Classes for inline styles moved from JS/HTML */
.ios-install-msg {
  background: #fffbe6;
  color: #182951;
  border: 2px solid #ffd600;
  padding: 14px 18px;
  border-radius: 10px;
  text-align: center;
  font-size: 1.08em;
  max-width: 380px;
  margin: 18px auto 0 auto;
  box-shadow: 0 2px 8px rgba(24,41,81,0.10);
}
.bold {
  font-weight: bold;
}
.icon-inline {
  height: 1.2em;
  vertical-align: middle;
}
.link-white-bold {
  color: #ffffff !important;
  font-weight: bold;
}

.link-ver-mapa,
.download-btn {
  color: #fff !important;
  font-weight: bold;
  text-decoration: underline;
  transition: color 0.2s;
}
.link-ver-mapa:hover,
.download-btn:hover {
  color: #ffd600 !important;
}

/* Accesibilidad: focus visible para iconos de Lesco */
.video-icon:focus, .video-icon:focus-visible {
  outline: 3px solid #ffd600;
  outline-offset: 2px;
  background: #fffbe6;
  border-radius: 6px;
}

/* Ajuste para nombres largos de archivos en el formulario */
#fileNameText {
  display: block;
  max-width: 100%;
  word-break: break-all;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  margin-top: 6px;
  font-size: 0.98em;
}
