@import url('variables.css');

body {
  background-color: var(--color-fondo);
  color: var(--color-texto);
}

/* MENU LATERAL */

.sidebar {
  width: 250px;
  background-color: var(--color-primario);
  color: var(--color-blanco);
  padding: 20px;
  height: 100vh;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
}

.sidebar img {
  width: 200px;
  height: auto;
  margin-bottom: 20px;
}

.sidebar ul {
  list-style: none;
  width: 100%;
  padding: 0;
}

.sidebar ul li {
  padding: 15px 20px;
  cursor: pointer;
}

.sidebar ul li a {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
}

.sidebar ul li:hover {
  background-color: var(--color-secundario);
}

/*USUARIOS*/
.user-role-info {
  color: var(--color-blanco);
  background-color: var(--color-secundario);
  padding: 15px 20px;
  font-size: 0.9rem;
  margin-bottom: 30px;
  border-radius: 10px;
}

.user-role-info i {
  margin-right: 5px;
}

/* ÁREA PRINCIPAL */

.main {
  margin-left: 250px;
  /* Deja espacio al lado del menú fijo */
  flex-grow: 1;
  padding: 20px;
}

/* ENCABEZADO */

.header {
  background-color: var(--color-blanco);
  padding: 15px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* CONTENIDO EN TARJETAS */

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
}

.tarjeta {
  background-color: var(--color-blanco);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.subtarjetas {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.subtarjeta {
  flex: 1 1 45%;
  background: var(--color-fondo);
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-texto);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.subform {
  display: flex;
  justify-content: space-between;
  background: var(--color-fondo);
  padding: 10px;
  padding-inline: 30px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--color-texto);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.subtarjeta strong {
  font-size: 1.4rem;
  display: block;
  margin-top: 5px;
}

.tarjeta h2 {
  margin-bottom: 30px;
  font-size: 1rem;
  color: var(--color-primario);
}

.tarjeta h3 {
  margin-bottom: 10px;
}

.valor {
  font-size: 2rem;
  font-weight: bold;
  margin-top: 10px;
}

.blue {
  background-color: #86cdda39;
  color: #22a2a6;
}

.green {
  background-color: #94cda139;
  color: #28a745;
}

.red {
  background-color: #f4727f34;
  color: #dc3545;
}

.verde {
  color: #28a745;
}

.rojo {
  color: #dc3545;
}

.azul {
  color: #22a2a6;
}

.grafico .circulo {
  width: 100px;
  height: 100px;
  border: 10px solid var(--color-acento);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto;
  font-size: 1.5rem;
  font-weight: bold;
}

.barra-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.barra {
  background-color: #e0e0e0;
  border-radius: 25px;
  padding: 6px;
  position: relative;
  font-size: 14px;
  color: var(--color-texto2);
}

.barra .etiqueta {
  position: absolute;
  left: 20px;
  top: 10px;
  z-index: 2;
  font-weight: lighter;
  color: var(--color-blanco);
}

.barra-progreso {
  background-color: var(--color-acento);
  height: 24px;
  border-radius: 20px;
  line-height: 24px;
  padding-left: 80px;
  color: var(--color-blanco);
  font-weight: bold;
  transition: width 0.3s ease;
}

/* MÓDULOS Y FORMULARIOS */

.modulo-container {
  background-color: var(--color-blanco);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin: 40px auto;
  max-width: 1300px;
}

.formulario-reportes {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.grupo-formulario {
  flex: 1 1 calc(50% - 20px);
  /* Dos columnas con espacio */
  min-width: 300px;
}

.grupo-formulario label {
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.grupo-formulario select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background-color: #f9f9f9;
}

input[type="date"] {
  width: 50%;
  padding: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.9rem;
  color: var(--color-texto2);
  box-sizing: border-box;
  font-family: inherit;
}

input[type="email"],
input[type="file"],
select {
  width: 100%;
  padding: .5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  color: var(--color-texto);
  box-sizing: border-box;
  font-family: inherit;
}

input[type="text"],
input[type="number"],
select {
  width: 50%;
  padding: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  color: var(--color-texto);
  box-sizing: border-box;
  font-family: inherit;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.5);
  /* opcional para mejor contraste */
}

h2 {
  margin-bottom: 20px;
  color: var(--color-primario);
}

/* BOTONES */

.btn-reporte {
  display: inline-block;
  background-color: var(--color-primario);
  color: var(--color-blanco);
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 5px;
  margin-right: 10px;
}

.btn-reporte:hover {
  background-color: var(--color-hover);
}

.boton {
  display: inline-block;
  width: 100%;
  padding: 10px;
  background-color: var(--color-primario);
  color: var(--color-blanco);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  margin-top: 20px;
}

.boton:hover {
  background-color: var(--color-hover);
}

/* TABLAS */

.tabla-container {
  margin-top: 20px;
}

.tabla-scroll {
  overflow-x: auto;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

table {
  border-collapse: collapse;
  width: 1200px;
  min-width: 100%;
  background-color: var(--color-blanco);
  color: var(--color-texto);
}

/* Encabezado */
table thead {
  background-color: var(--color-secundario);
  color: var(--color-blanco);
}

table th,

table td {
  border: 1px solid #ddd;
  padding: 10px 12px;
  text-align: center;
  max-height: 30px;
}


table tbody tr:nth-child(even) {
  background-color: var(--color-fondo);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  margin-right: 0.5rem;
  color: var(--color-primario);
}

.btn-icon:hover {
  color: var(--color-acento);
}

/* DataTable */
.dataTables_wrapper .dataTables_length {
  width: 180px;
}

.dataTables_wrapper {
  width: auto;
  margin: 10px;
  font-size: 0.8rem;
  vertical-align: middle;  
}

.dataTables_wrapper .dataTables_filter {
  float: left;
  margin-left: 50px;
  /*buscador*/
}