body{
  font-family: Arial;
  background:#f5f5f5;
  text-align:center;
}

#loginBox{
  margin-top:100px;
}

.texto-login{
  margin-top: 18px;
  font-size: 14px;
  color: #555;
}

.btn-whatsapp-login{
  display: inline-block;
  margin-top: 8px;
  padding: 10px 14px;
  background: #25D366;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
}

.btn-whatsapp-login:hover{
  background: #1ebe5d;
}

input{
  display:block;
  margin:10px auto;
  padding:10px;
  width:200px;
}

#datos{
  display:block;
  margin:10px auto;
  padding:10px;
  width:260px;
  box-sizing:border-box;
}

button{
  padding:10px;
  margin:5px;
  cursor:pointer;
}

#menu{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:20px;
  margin-top:30px;
}

.card{
  background:white;
  padding:20px;
  width:150px;
  border-radius:10px;
  box-shadow:0 0 10px #ccc;
}

.card img {

    width: 110px;
    height: 110px;

    object-fit: contain;

    display: block;

    margin: 0 auto 10px;

}

/* HISTORIAL */

#historialBox{
  margin-top: 40px;
  width: 100%;
}

#historialBox h2{
  text-align: center;
  margin-bottom: 20px;
}

#barraCliente{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 20px;
}

#barraCliente input{
  display: inline-block;
  margin: 0;
}

#barraCliente #buscarCliente{
  width: 260px;
}

#barraCliente input[type="date"]{
  width: 160px;
}

#barraCliente select{
  display: inline-block;
  width: 120px;
  margin: 0;
  padding: 10px;
}

.label-filtro-cliente{
  font-size: 14px;
  font-weight: bold;
  color: #333;
  white-space: nowrap;
}

#barraCliente button{
  margin: 0;
}

#historialBox table{
  width: 100%;
  border-collapse: collapse;
  background: white;
}

#historialBox th{
  background: #1f4e79;
  color: white;
  padding: 12px;
  text-align: center;
}

#historialBox td{
  border: 1px solid #ddd;
  padding: 12px;
  vertical-align: top;
}

#historialBox td:nth-child(1){
  width: 15%;
  text-align: center;
}

#historialBox td:nth-child(2){
  width: 45%;
}

#historialBox td:nth-child(3){
  width: 10%;
  text-align: center;
}

#historialBox td:nth-child(4){
  width: 15%;
  text-align: center;
}

#historialBox td:nth-child(5){
  width: 15%;
  text-align: center;
}

.btn-descargar{
  background: #198754;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.btn-descargado{
  background: #6c757d;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

/* PANEL ADMINISTRADOR */

#adminBox{
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

#adminBox h2{
  text-align: center;
  margin-bottom: 5px;
}

#adminBox p{
  text-align: center;
  margin-bottom: 20px;
}

#adminBox table{
  width: 100%;
  border-collapse: collapse;
}

#adminBox th{
  background: #1f4e79;
  color: white;
  padding: 12px;
  text-align: center;
}

#adminBox td{
  border: 1px solid #ddd;
  padding: 12px;
  vertical-align: top;
}

#adminBox td:nth-child(1){
  width: 18%;
  text-align: center;
}

#adminBox td:nth-child(2){
  width: 18%;
  text-align: center;
}

#adminBox td:nth-child(3){
  width: 38%;
}

#adminBox td:nth-child(4){
  width: 12%;
  text-align: center;
}

#adminBox td:nth-child(5){
  width: 14%;
  text-align: center;
}

#adminBox select{
  padding: 7px;
  border-radius: 6px;
  border: 1px solid #aaa;
}

/* RESPONSIVE MOVIL */

@media screen and (max-width: 768px) {

  body {
    margin: 0;
    padding: 10px;
    overflow-x: hidden;
  }

  #menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
  }

  .card {
    width: 85%;
    max-width: 320px;
  }

  #historialBox,
  #adminBox {
    width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
  }

  #historialBox table,
  #adminBox table {
    min-width: 700px;
  }

  input,
  textarea,
  select,
  button {
    max-width: 100%;
    box-sizing: border-box;
  }

}

.btn-subir{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 10px;
    background:#1f4e79;
    color:white;
    border-radius:6px;
    cursor:pointer;
    font-size:13px;
    font-weight:bold;
    white-space:nowrap;
}

.btn-reemplazar{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:30px;
    height:30px;
    background:#f8f9fa;
    border:1px solid #ccc;
    border-radius:50%;
    cursor:pointer;
    font-size:16px;
    transition:0.2s;
}

.btn-reemplazar:hover{
    background:#e9ecef;
    transform:rotate(20deg);
}

/* MENSAJES DE VALIDACIÓN */

.mensaje-error{
  color:#dc3545;
  font-size:14px;
  font-weight:bold;
  margin-top:8px;
  margin-bottom:12px;
  min-height:20px;
}

textarea.error{
  border:2px solid #dc3545;
}

textarea.ok{
  border:2px solid #198754;
}

#formRegistroNSS input,
#formPermisoVehicular input{
  display: block;
  margin: 10px auto;
  padding: 10px;
  width: 260px;
  box-sizing: border-box;
}

.pdf-admin{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:nowrap;
    white-space:nowrap;
}

.pdf-ver{
    color:#198754;
    font-weight:bold;
    text-decoration:none;
}

.pdf-ver:hover{
    text-decoration:underline;
}

.resumen-cliente{
  background:white;
  margin:30px auto 20px;
  padding:25px;
  border-radius:12px;
  max-width:1100px;
  box-shadow:0 2px 8px rgba(0,0,0,.15);
}

.resumen-cliente h2{
  margin-bottom:20px;
  text-align:center;
}

.resumen-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:15px;
}

.resumen-card{
  background:#f8f9fa;
  padding:18px;
  border-radius:10px;
  text-align:center;
  border:1px solid #ddd;
}

.resumen-card span{
  display:block;
  font-size:14px;
  color:#555;
  margin-bottom:8px;
}

.resumen-card strong{
  font-size:22px;
  color:#1f4e79;
}

@media screen and (max-width:768px){
  .resumen-grid{
    grid-template-columns:1fr;
  }
}

/* BARRA PANEL ADMIN */

#barraAdmin{
  display:flex;
  flex-wrap:nowrap;
  gap:10px;
  align-items:center;
  margin-bottom:20px;
}

#barraAdmin input[type="text"]{

    flex:1;
    min-width:260px;

}

#barraAdmin input[type="date"]{

    width:140px;
    min-width:140px;
    flex:none;

}

#barraAdmin select{

    width:180px;

}

#barraAdmin button{

    background:#6c757d;
    color:white;
    border:none;
    padding:10px 15px;
    border-radius:6px;
    flex:none;

}

/* BARRA SUPERIOR */

#barraSuperior{

    width:100%;

    display:flex;

    justify-content:flex-end;

    padding:15px 25px;

    box-sizing:border-box;

}

#btnCerrarSesion{

    background:#dc3545;

    color:white;

    border:none;

    border-radius:6px;

    padding:10px 16px;

    cursor:pointer;

    font-weight:bold;

}

#btnCerrarSesion:hover{

    background:#bb2d3b;

}

#barraSuperior{
    display:none;
}

.estatus{
  display:inline-block;
  padding:6px 10px;
  border-radius:20px;
  font-weight:bold;
  font-size:13px;
}

.estatus-recibido{
  background:#fff3cd;
  color:#856404;
}

.estatus-error{
  background:#f8d7da;
  color:#842029;
}

.estatus-entregado{
  background:#d1e7dd;
  color:#0f5132;
}

.select-estatus{
  padding:7px;
  border-radius:6px;
  font-weight:bold;
}

.select-recibido{
  background:#fff3cd;
  color:#856404;
}

.select-error{
  background:#f8d7da;
  color:#842029;
}

.select-entregado{
  background:#d1e7dd;
  color:#0f5132;
}


/* RESUMEN ADMIN */

#resumenAdmin{
  display:grid;
  grid-template-columns:repeat(7, 1fr);
  gap:15px;
  margin:20px 0;
}

.admin-card{
  background:#f8f9fa;
  border:1px solid #ddd;
  border-radius:10px;
  padding:18px;
  text-align:center;
}

.admin-card span{
  display:block;
  color:#555;
  font-size:14px;
  margin-bottom:8px;
}

.admin-card strong{
  font-size:26px;
  color:#1f4e79;
}

@media screen and (max-width:768px){
  #resumenAdmin{
    grid-template-columns:1fr 1fr;
  }
}

/* GESTIÓN FINANCIERA */

#barraFinancieraAdmin{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  flex-wrap:nowrap;
  margin-bottom:20px;
}

#barraFinancieraAdmin input[type="date"]{
  width:160px;
  margin:0;
}

#barraFinancieraAdmin button{
  margin:0;
  white-space:nowrap;
}

/* REGISTRAR PAGO */

#registroPagoAdmin{
  margin-top:20px;
  margin-bottom:25px;
}

#registroPagoAdmin select,
#registroPagoAdmin input,
#registroPagoAdmin button{
  display:inline-block;
  margin:5px;
  vertical-align:middle;
}

#registroPagoAdmin select{
  width:220px;
}

#registroPagoAdmin input[type="number"]{
  width:160px;
}

#registroPagoAdmin input[type="text"]{
  width:260px;
}

#registroPagoAdmin button{
  white-space:nowrap;
}

/* TABLA EMPRESAS */

#tablaEmpresasAdmin{
  width:100%;
}

#tablaEmpresasAdmin td,
#tablaEmpresasAdmin th{
  text-align:center;
  vertical-align:middle;
}

#tablaEmpresasAdmin select,
#tablaEmpresasAdmin input[type="date"]{
  width:145px;
  margin:0 auto;
  padding:7px;
}

.accionesEmpresa{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  justify-content:center;
  align-items:center;
}

.accionesEmpresa button{
  width:100%;
  padding:6px;
  font-size:12px;
  white-space:nowrap;
}

.estadoCorte{
  display:inline-block;
  padding:6px 10px;
  border-radius:8px;
  font-weight:bold;
  white-space:nowrap;
}

.estadoCorte.sinConfigurar{
  background:#eeeeee;
}

.estadoCorte.vigente{
  background:#dff5e1;
}

.estadoCorte.tolerancia{
  background:#fff3cd;
}

.estadoCorte.bloqueado{
  background:#f8d7da;
}

#estadoCorteCliente{
  max-width:1200px;
  margin:15px auto;
}

.corte-vigente{
  background:#e8f7e8;
  border:1px solid #2e7d32;
  padding:12px;
  border-radius:8px;
  text-align:center;
  font-weight:bold;
}

.corte-tolerancia{
  background:#fff4d6;
  border:1px solid #f9a825;
  padding:12px;
  border-radius:8px;
  text-align:center;
  font-weight:bold;
}

.corte-bloqueado{
  background:#ffe5e5;
  border:1px solid #c62828;
  padding:12px;
  border-radius:8px;
  text-align:center;
  font-weight:bold;
}

#menu .card button:disabled,
#formBox button:disabled{
  opacity:0.5;
  cursor:not-allowed;
}

#menu .card button:disabled:hover,
#formBox button:disabled:hover{
  transform:none;
}

#comprobantePagoCliente{
  max-width:1200px;
  margin:20px auto;
  padding:18px;
  background:white;
  border-radius:10px;
  box-shadow:0 0 10px #ccc;
}

#comprobantePagoCliente input{
  display:inline-block;
  width:auto;
  min-width:210px;
  margin:6px;
}

#comprobantePagoCliente button{
  margin:6px;
}

#comprobantePagoCliente table{
  margin-top:12px;
  width:100%;
  border-collapse:collapse;
}

#comprobantePagoCliente th{
  padding:6px 8px;
}

#comprobantePagoCliente td{
  padding:4px 8px;
  line-height:1.2;
}

/* TARJETAS DE ACTAS */

.lista-actas{
  display:flex;
  justify-content:center;
  align-items:stretch;
  flex-wrap:wrap;
  gap:20px;
  margin:25px auto;
  max-width:1000px;
}

.tarjeta-acta{
  width:180px;
  padding:18px;
  background:white;
  border-radius:12px;
  box-shadow:0 2px 10px rgba(0,0,0,.15);
  text-align:center;
  box-sizing:border-box;
}

.tarjeta-acta img{
  display:block;
  width:130px;
  height:130px;
  object-fit:contain;
  margin:0 auto 12px;
}

.nombre-acta{
  width:100%;
  margin:0;
  padding:10px 6px;
  border:1px solid #1f4e79;
  border-radius:6px;
  background:white;
  color:#1f4e79;
  font-weight:bold;
  cursor:pointer;
}

@media screen and (max-width:768px){

  .lista-actas{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:12px;
    padding:0 10px;
  }

  .tarjeta-acta{
    width:100%;
    padding:12px;
  }

  .tarjeta-acta img{
    width:100px;
    height:100px;
  }

  .nombre-acta{
    font-size:12px;
  }

}

/* PAGINACIÓN COMPROBANTES */

#paginacionComprobantesCliente{
    display:none;
    justify-content:center;
    align-items:center;
    gap:15px;
    margin-top:15px;
}

#textoPaginaComprobantes{
    font-weight:bold;
    color:#333;
}

#paginacionComprobantesCliente button:disabled{
    opacity:.5;
    cursor:not-allowed;
}
