@import url("https://fonts.googleapis.com/css?family=Montserrat|Open+Sans");

* {
  box-sizing: border-box;
}
body {
  font-family: "Open Sans", sans-serif;
  margin: 0;
  background: rgb(235, 229, 229);
}
h1,
h2,
h3,
h4 {
  font-family: "Montserrat", sans-serif;
}
img {
  display: block;
  max-width: 100%;
}
.badge {
  position: absolute;
  top: 5px;
  right: 10px;
  background: red;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 1.5em !important;
}
/*********ESTILOS PARA LAS TABLE RESPONSIVAS*******/
/* Estilos para pantallas grandes */
/* Estilos generales para todas las tablas responsive */
.table-container {
  margin: 20px 0;
  overflow-x: auto;
}

.responsive-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
  font-family: sans-serif;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.responsive-table thead tr {
  background-color: #2c3e50;
  color: #ffffff;
  text-align: left;
}

.responsive-table th,
.responsive-table td {
  padding: 12px 15px;
}

.responsive-table tbody tr {
  border-bottom: 1px solid #dddddd;
}

.responsive-table tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

.responsive-table tbody tr:last-of-type {
  border-bottom: 2px solid #2c3e50;
}

.responsive-table tbody tr:hover {
  background-color: #f1f1f1;
}

/* Estilos para los botones */
.btn-action {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  transition: all 0.3s;
  margin: 2px;
}

/* Estilos para pantallas pequeñas (menos de 768px) */
@media screen and (max-width: 768px) {
  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .responsive-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    text-align: right;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: bold;
    margin-right: 15px;
    color: #2c3e50;
    text-align: left;
  }

  .responsive-table td:last-child {
    border-bottom: none;
  }

  /* Ajustes para los botones en móvil */
  .responsive-table td[data-label="Acción"],
  .responsive-table td[data-label="Acciones"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .btn-action {
    width: 100%;
    padding: 8px;
  }
}

/* Estilos para los botones */
.responsive-table button {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  transition: all 0.3s;
}

.responsive-table button[type="submit"] {
  background-color: #e8521c;
  color: white;
}

.responsive-table button[type="submit"]:hover {
  background-color: #333;
}

.responsive-table button[style*="background-color:#333"] {
  background-color: #333 !important;
}

.responsive-table button[style*="background-color:#333"]:hover {
  background-color: #555 !important;
}

/*****************************************************/

/*------------------------------Estilos del Header------------------------------*/

.header {
  width: 100%;
  background: #00255c;
  z-index: 2000;
  padding: 1em 5em;
  display: flex;

  align-items: center;
  position: static;
}
.logo {
  width: 180px; /* O el valor que prefieras */
}
.contenedorlogo {
  display: flex;
  align-items: center;
}

.usuario-logueado {
  color: white;
  font-weight: bold;
  font-size: 16px;
}
.tarjeta-cerrar-sesion {
  width: 2em;
  height: 2em;
  background-color: #e8521c;
  border-radius: 10px 10px 10px 10px;
  -moz-border-radius: 10px 10px 10px 10px;
  -webkit-border-radius: 10px 10px 10px 10px;
  border: 0px solid #000000;
  text-align: center;
}
.tarjeta-cerrar-sesion:hover {
  background-color: #ccc;
  color: #e8521c;
}
.cerrarSesion {
  text-decoration: none;
  color: #fff;
  font-size: 25px;
}
/* Agrupar usuario y cerrar sesión a la derecha */
.usuario-container {
  display: flex;
  align-items: center;
  gap: 1.5em;
  margin-left: auto; /* Esto empuja el contenedor a la derecha */
}

/* (Opcional) Centrar ícono dentro del botón cerrar */
.tarjeta-cerrar-sesion {
  display: flex;
  justify-content: center;
  align-items: center;
}

/***********Estilos para el contenido de detalle******************/
.detalle {
  background-color: #222;
  color: #ffff;
  padding: 3em;
  margin: 2em 5em;
  border-radius: 30px 30px 30px 30px;
  -moz-border-radius: 30px 30px 30px 30px;
  -webkit-border-radius: 30px 30px 30px 30px;
  border: 0px solid #000000;
}
.detalle h3 {
  color: #fff;
}
.detalle:hover {
  -webkit-box-shadow: 9px 12px 12px 0px rgba(168, 168, 168, 1);
  -moz-box-shadow: 9px 12px 12px 0px rgba(168, 168, 168, 1);
  box-shadow: 9px 12px 12px 0px rgba(168, 168, 168, 1);
}

.detalle p {
  color: #fff;
}
.detalle-label {
  color: #e8521c;
}

/*********ESTILOS PARA LA PAGINA DE VENTAS********/
.ventaref {
  margin: 2em 2em 0em 2em;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12em, 1fr));
  gap: 1em;
  justify-items: center;
}

.tarjeta {
  margin: 0; /* Elimina el margin individual */
  padding: 2em 1em 1em; /* Optimización del padding */
  width: 12em;
  height: 10em;
  background-color: #e8521c;
  border-radius: 10px;
  text-align: center;
  /* Elimina el float: left (no es necesario con Flexbox) */
  flex: 0 0 auto; /* Evita que las tarjetas se estiren */
}
.tarjeta:hover {
  background-color: #333;
}
.ventaref a {
  text-decoration: none;
  color: #fff;
}
.tarjeta span {
  font-size: 2.5em;
}

/*----------FORMULARIO PARA FACTURA---------------*/
#factura {
  margin: 0 auto;
  margin-top: -20% !important;
  width: 100%;
  height: 60em;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.75);
  padding: 5em;
  position: fixed;
  display: none;
  transition: 0.3s;
}
.formfactura {
  background: #e8521c;
  width: 600px;
  padding-top: 3em !important;
  padding: 10px 20px;
  box-sizing: border-box;
  border-radius: 25px;
  margin: 2em auto;
  margin-top: 8em !important;
}
.formfactura h2 {
  color: #fff;
  margin: 10px 0;
}

.formfactura input {
  width: 100%;
  margin-bottom: 20px;
  padding: 8px;
  box-sizing: border-box;
  font-size: 17px;
  border: none;
}
#btncerrar {
  width: 43%;
  background: #333;
  color: #ffff;
  font-size: 20px;
  margin-left: 5%;
  margin-top: 1em;
}
#btncerrar:hover {
  cursor: pointer;
  background: #00255c;
  transition: 0.5s;
  color: #ffff;
}
#btnfactura {
  width: 43%;
  background: #333;
  color: #ffff;
  font-size: 20px;
  margin-left: 5%;
  margin-top: 1em;
}
#btnfactura:hover {
  cursor: pointer;
  background: #00255c;
  transition: 0.5s;
  color: #ffff;
}
#generarFactura {
  padding: 2em;
  margin-top: 1em;
  background-color: #e8521c;
  color: #f0f0f0;
  border: none;
  justify-content: center; /* Centra horizontalmente */
  border-radius: 5px;
}
#generarFactura:hover {
  background-color: #00255c;
  border: 1px solid white;
  transition: 0.3s;
}
/*----------FORMULARIO DE CONTRATO DE ALTA-------------------*/
input[readonly] {
  background-color: #555!important;
  border: 2px #333 solid!important;
  color: #cacaca; /* Opcional: Cambia el color del texto */
  cursor: not-allowed; /* Opcional: Cambia el cursor */
}
#contrato {
  margin: 0 auto;
  margin-top: -20% !important;
  width: 100%;
  height: 60em;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.75);
  padding: 5em;
  position: fixed;
  display: none;
  transition: 0.3s;
}
.formalta {
  background: #e8521c;
  width: 600px;
  padding-top: 3em !important;
  padding: 10px 20px;
  box-sizing: border-box;
  border-radius: 25px;
  margin: 2em auto;
}
.formalta h2 {
  color: #fff;
  margin: 10px 0;
}

.formalta input {
  width: 100%;
  margin-bottom: 20px;
  padding: 8px;
  box-sizing: border-box;
  font-size: 17px;
  border: none;
}

/*----------FORMULARIO DE BONIFICACION---------------*/
#bonificacion {
  margin-top: -20% !important;
  margin: 0 auto;
  width: 100%;
  height: 60em;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.75);
  padding: 5em;
  position: fixed;
  display: none;
  transition: 0.3s;
}

.btn-nota {
  padding: 10px 20px;
  margin: 5px;
  font-weight: bold;
  transition: background-color 0.5s, color 0.5s;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #333;
  color: #fff;
}

.btn-nota.inactivo {
  background-color: gray;
  color: white;
  transition: background-color 0.5s;
}

.formnota {
  margin-top: 2em !important;

  transition: opacity 0.5s ease;
}

/*ESTILOS PARA VER EL ENVIO MASIVO DE FACTURAS*/

.btnenvfactura {
  padding: 20px;
  margin-top: 1em;
  margin-left: 5em;
  width: 10em;
  height: 20px;
  background-color: #e8521c;
  color: #f0f0f0;
  border: none;
  display: inline-flex; /* Cambiado a flex */
  justify-content: center; /* Centra horizontalmente */
  align-items: center; /* Centra verticalmente */
  cursor: pointer; /* Cambia el cursor al pasar */
  border-radius: 5px;
}
.btnenvfactura:hover {
  background-color: #333;
  transition: 0.3s;
}

/*----------------------VISUALIZACION DE CONTRATOS----------------------------*/
.visualizacionContratos {
  margin-top: 2em;
}
.visualizacionContratos table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 20px;
}

.visualizacionContratos th,
td {
  padding: 10px 15px; /* Espaciado interno */
  text-align: left;
  border: 1px solid #ccc;
}
.anularContrato {
  background-color: #e8521c;
  color: white;
  padding: 1em;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.3s ease;
}
.anularContrato:hover {
  background-color: #333; /* Rojo más oscuro al pasar el mouse */
}

/*ESTILOS PARA LAS PAGINAS QUE VENGAN DE GOOGLE SHEETS*/
.table-containersheets {
  margin: 20px 6em;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: auto;
  max-height: 500px;
}
.table-containersheets th {
  background: #333;
  color: white;
  position: sticky;
  top: 0;
  padding: 12px;
  text-align: left;
}
.table-containersheets td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}
#table-container {
  height: 80vh;
  overflow: auto;
  margin: 20px;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
#table-container table {
  width: 100%;
  border-collapse: collapse;
}
#table-container th {
  background: #333;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px;
  text-align: left;
}
#table-container td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}
/* Colores para filas según "Detalle" */
.enviado {
  background: #4caf50;
  color: white;
}
.no-enviado {
  background: #f44336;
  color: white;
}
.pendiente {
  background: #ffeb3b;
}
#last-update {
  padding: 10px 20px;
  font-size: 12px;
  color: #666;
}
#refresh-button {
  margin: 0 20px;
  padding: 8px 15px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
