/* =========================================================================================== */
/* ===================================== ESTILOS GLOBALES ==================================== */
/* =========================================================================================== */

/* Estilos para el cuerpo y el contenedor principal */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../img/fondo.svg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
}

/* =========================================== LOGIN ========================================= */

/* Contenedor */
.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Encabezado */
.login-header {
  background: #013b8c00;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Logo */
.logo {
  width: 140px;
  margin-bottom: 20px;
  display: block;
  max-width: 70%;
  height: auto;
  margin: 0;
}

/* Caja */
.login-box {
  background: rgba(0,0,0,0.7);
  border-radius: 15px;
  box-shadow: 0px 4px 15px rgba(0,0,0,0.5);
  text-align: center;
  width: 100%;
  max-width: 360px;
  padding: 22px;
  overflow: hidden;
}

/* Encabezado */
.login-box .login-header {
  width: 300px;
  height: 130px;
  display: flex;
  flex-shrink: 2;
  justify-content: center;
  align-items: center;
}

/* Imagen del Encabezado */
.login-box .login-header img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Mantiene proporciones sin deformar */
}

/* Texto de Encabezado */
.login-box h2 {
  margin-bottom: 20px;
}

/* Bloque de Autenticacion*/
.input-group {
  position: relative;
  margin-bottom: 15px;
}

/* Input del Elemento */
.input-group input {
  width: 100%;
  display: block;
  padding: 12px 44px 12px 15px;
  border: none;
  border-radius: 10px;
  outline: none;
  box-sizing: border-box;
}

/* Boton Mostrar Password */
.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 6px;
  transition: background 0.2s, transform 0.05s;
  padding: 0;
  cursor: pointer;
  color: #000;
  z-index: 1;
}

/* Evento Hover */
.toggle-password:hover {
  background: rgba(255,255,255,0.18);
}

/* Evento Active */
.toggle-password:active {
  transform: translateY(-50%) scale(0.98);
}

/* Evento Focus */
.toggle-password:focus-visible {
  outline: 2px solid rgba(2,80,191,0.5);
  border-radius: 6px;
}

/* Boton de ingreso */
.btn-login {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #0250BF;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
  font-weight: bold;
}

/* Evento Hover */
.btn-login:hover {
  background: #013a8c;
}

.btn-login.loading {
  background: #013a8c;
  cursor: not-allowed;
  position: relative;
  opacity: 0.8;
}

.btn-login.loading::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px; /* centra verticalmente */
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Texto de Error */
.error {
  color: #ff6565;
  margin-top: 10px;
}

/* Eventos Before y After */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Eventos de Focus */
.input-group input:focus,
.btn-login:focus,
.toggle-password:focus {
  outline: 2px solid rgba(2, 80, 191, 0.5);
  outline-offset: 2px;
}

/* ========================================== FIN LOGIN ====================================== */

/* ===================== BOTON CAMBIO DE CONTRASEÑA EN ESTADO DE CARGA ======================= */
#change-password-btn.loading {
  background: #013a8c;
  cursor: not-allowed;
  position: relative;
  opacity: 0.8;
}

#change-password-btn.loading::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px; /* centra verticalmente */
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.requirements {
  text-align: left;
  margin-top: 10px;
  font-size: 12px;
  color: #ccc;
}
.requirements p {
  margin: 3px 0;
}
.requirements .valid {
  color: #4CAF50; /* verde */
}
.requirements .invalid {
  color: #ff6565; /* rojo */
}

/* =========================================================================================== */
/* ====================================== VISTA DASHBOARD ==================================== */
/* =========================================================================================== */

/* Modificaciones al body */
body.dashboard {
  display: flex;
  height: 100vh;
  color: #111;
  margin: 0;
  background: url('../img/fondo1.svg') no-repeat center center fixed;
}

/* ======================================= BARRA LATERAL ===================================== */

/* Barra Lateral */
.sidebar {
  background: #002C44;
  transition: width 0.3s;
  overflow: hidden;
  box-shadow: 2px 0 10px rgba(0,0,0,0.5);
  position: relative;
  width: 60px;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 1000;
}

/* Eventos Hover */
.sidebar:hover {
  width: 180px;
}

/* Estilo Lista */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Estilo Items Lista */
.sidebar li {
  display: flex;
  align-items: center;
  padding: 14px;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}

/* Evento Hover */
.sidebar li:hover {
  background: #0250BF;
}

/* Iconos */
.sidebar .icon {
  width: 24px;
  margin-right: 12px;
  fill: #fff;
  filter: invert(1);
}

/* Contenedor */
.sidebar span {
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s;
}

/* Evento Hover */
.sidebar:hover span {
  opacity: 1;
}
/* ====================================== FIN BARRA LATERAL ================================== */

/* =================================== INFORMACION DE USUARIO ================================ */

/* Contenedor */
.user-info-container {
  position: fixed;
  top: 10px;
  right: 15px;
  display: flex;
  align-items: flex-end;
  background: #002C44;
  padding: 5px 10px 5px 10px;
  border-radius: 4px;
  flex-direction: column;
  z-index: 10;
}
/* Texto Usuario */
.user-info-container .user-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

/* Texto Rol */
.user-info-container .user-role {
  display: flex;
  flex-direction: row;
  align-items: row;
  gap: 2px;
  line-height: 1.22;
}

/* Header Usuario */
.user-info-container .user-text #header-username {
  font-weight: bold;
  color: #FFF;
}

/* Header Rol */
.user-info-container .user-role #header-user-role {
  font-size: 14px;
  font-weight: bold;
  color: #b8b8b8;
}

/* Imagen Rol */
.user-info-container .user-role img {
  width: 16px;
  height: 16px;
}

/* ================================ FIN INFORMACION DE USUARIO =============================== */

/* Contenedor principal del dashboard */
.main-content {
  flex: 1;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Seccion de Contenido */
.dashboard-content {
  background: #002c44;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 2 0px 10px rgba(0,0,0,0.5);
  width: auto;
  height: auto;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family:'Arimo', Sans-serif;
}

/* Header del dashboard */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

/* Titulo */
.page-title {
  color: #ffffff;
  margin: 0;
  font-size: 1.8rem;
}

/* =========================================================================================== */
/* ======================= ESTILOS PARA LA PAGINA INICIO (dashboard.html) ==================== */
/* =========================================================================================== */

/* Contenedor Principal */
.main-content.inicio {
  align-items: center;
  padding-top: 20px;
}

/* Seccion de Contenido */
.dashboard-content.inicio {
  width: auto;
  height: auto;
}

/* ====================================== ESTILO DE CARDS ==================================== */

/* Contenedor Tarjetas */
.cards {
  display: flex;
  gap: 20px;
}

/* Tarjetas */
.card {
  width: 150px;
  height: 150px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  border-radius: 12px;
}

/* Slides */
.card .slide {
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease-in-out;
  position: absolute;
  top: 0;
  left: 0;
}

/* Slide 1 */
.card .slide.slide1 {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
  background: #0250BF;
  transform: translateY(0);
}

/* Evento Hover */
.card:hover .slide.slide1 {
  transform: translateY(-100%);
}

/* Texto Slide 1 */
.card .slide.slide1 .content h3 {
  text-align: center;
  color: #ffffff;
  margin: 0 0 10px 0;
}

/* Slide 2 */
.card .slide.slide2 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 1;
  background: #fff;
  transform: translateY(100%);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  font-size: 12px;
}

/* Evento Hover */
.card:hover .slide.slide2 {
  transform: translateY(0);
}

/* Texto Slide 2 */
.card .slide.slide2 .content p,
.card .slide.slide2 .content h3 {
  text-align: center;
  color: #414141;
  margin: 0 0 10px 0;
}

/* Iconos */
.card .icon {
  width: 120px;
  height: auto;
  display: flex;
  flex-shrink: 2;
  justify-content: center;
  align-items: center;
}

/* Icono Slide 1 */
.card .slide.slide1 .icon {
  filter: invert(1);
}

/* Icono Slide 2 */
.card .slide.slide2 .icon {
  width: 80%;
  filter: drop-shadow(0px 0px 3px rgba(0, 0, 0, 0.9));
}

/* Imagen Icono */
.card .icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Boton Ingreso */
.pulse-effect {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #0250BF;
  color: white;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

/* Evento Hover */
.pulse-effect:hover {
  background: #013a8c;
}

/* Evento Active */
.pulse-effect:active {
  transform: scale(0.90);
}

/* ====================================== FIN ESTILO DE CARDS ================================ */

/* =========================================================================================== */
/*==================== ESTILOS PARA LA PAGINA INDICADORES (indicadores.html) ================= */
/* =========================================================================================== */

/* Contenedor Principal */
.dashboard .main-content.indicadores{
  flex-direction: column;
  align-items: center;
}

/* ================================== MENU NAVEGACION INDICADORES ============================ */

/* Barra de Menu */
.indicator-nav {
  display: flex;
  width: 75vw;
  gap: 0px;
  padding: 0px 0px 8px 0px;
}

/* Secciones de Menu */
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Botones de Menu */
.menu-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: #002c44;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  font-size: 16px;
}

/* Estilo para el boton activo */
.menu-item.active .menu-button {
  background: #0250BF;
  font-weight: bold;
}

/* Estilo para Evendo Hover*/
.menu-button:hover {
  background: #0250BF;
}

/* Submenu */
.submenu-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 0;
  overflow: hidden;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Seccion activa del submenu */
.menu-item.active .submenu-wrapper {
  width: 500px; /* ajusta segun el ancho de botones */
}

/* Botones del Submenu */
.submenu-button {
  background-color: #4CAF50;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

/* Boton de submenu activo*/
.submenu-button.active {
  background-color: #007a4d;
}

/* ================================ FIN MENU NAVEGACION INDICADORES ========================== */

/* Estilos de la página de indicadores */
.dashboard-content.indicadores {
  width: 75vw;
  height: 80vh;
  max-width: 75vw !important;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
}

.indicator-content-container{
  width: 100%;
  height: 100%;
}

.indicator-section.active-section {
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  height: 100%;
}

.indicator-section {
  display: none;
}

/* Contenedores de slides */
.slides-container {
  display: flex;
  overflow: hidden;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: 100%;
}

.slide-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* Estilos de las filas */
.row {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  gap: 10px;
}

.row.botones {
  display: flex;
  height: 55px;
  flex-direction: row;
  justify-content: space-between;
  gap: 10px;
}

.row.figures {
  justify-content: center;
  margin-bottom: 10px;
}

/* ================================== ESTILO FILTROS DE MES ================================== */

/* Estilo moderno para selects tipo filtro */
.filtro-container {
  flex-direction: column !important;
  gap: 2px !important;
}

.filtro-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  border-radius: 10px;
  padding: 5px 8px 5px 8px;
  font-size: 12px;
  font-weight: bold;
  color: #333;
  transition: all 0.25s ease;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.filtro-select option {
  padding: 8px;
  transition: background 0.2s ease;
}

.filtro-select option:hover {
  background: #fff;
  border-color: #002c44;
  border: 2px;
  color: #000;
}
/* =============================== ESTILO DE DONUTS DE RESUMEN =============================== */

.row.botones .tituloResumen {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  color: #FFF;
  width: 100%;
  justify-content: center;
}

.row.resume-donuts {
  flex-wrap: wrap;
  width: 100%;
  height: calc(100% - 55px - 10px);
  margin-top: 10px;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.graph-resumen {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

.donut-card {
  position: relative;
  width: 17vw;
  height: 43vh;
  background: #FFF;
  border-radius: 10px;
  text-align: center;
  padding: 10px 10px 10px 10px;
}

.donut-chart{
  width: 100%;
  height: 85%;
}

.donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  z-index: 1;
  font-size: 30px;
  font-weight: bold;
}

.donut-title {
  font-weight: bold;
  font-size: 16px;
}

.donut-date {
  font-weight: bold;
  font-size: 14px;
}

/* Botones Carga de Excel */
#uploadExcel {
  width: 50px;
  height: 50px;
  border-radius: 100%;
  position: absolute;
  right: 16px;
  bottom: 16px;
  border: none;
  outline: none;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  transition: .3s;
  background: #002c44
}

.botones-sueltos .btn.pulse-effect .figure-icon {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 35px;
  height: 35px;
}

.botones-sueltos .btn.pulse-effect .figure-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: invert(1);
}

.botones-sueltos .btn.pulse-effect:hover {
  background: #0250BF !important;
}

/* =============================== ESTILO ELEMENTOS TIPO CARDS =============================== */

.figure-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: auto;
  height: 55px;
  padding: 10px 10px 10px 10px;
  background: #0250BF;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: #fff;
  gap: 10px;
}

.figure-card.filtro {
  flex-direction: column;
  gap: 3px;
}

.figure-card .figure-icon {
  width: 32px;
  height: 32px;
  justify-content: center;
  align-items: center;
}

.figure-card .figure-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: invert(1);
}

.figure-card .figure-text {
  display: flex;
  flex-direction: column;
}

.figure-card .figure-text h3 {
  margin: 0;
  font-size: 14px;
}

.figure-card .figure-text p {
  margin: 0;
  font-size: 12px;
  font-weight: bold;
  color: #ccc;
}

.figure-card .figure-text .valor-ind {
  display: flex;
  flex-direction: row;
  justify-content: center;
}


/* ============================= FIN ESTILO ELEMENTOS TIPO CARDS ============================= */

/* ================================= ESTILO ELEMENTOS GRAFICO ================================ */

/* Fila Grafico Productividad */
.row.graph.productividad {
  flex-direction: row;
  justify-content: stretch;
  align-items: stretch;
  gap: 10px;
}

/* Grafico Productividad */
.graph-reitero {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Fila Grafico Reitero */
.row.graph {
  height: calc(100% - 55px - 10px);
  justify-content: stretch;
}

/* Grafico Reitero */
.graph-reitero {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Fila Grafico Reitero */
.row.graph.infancia {
  height: calc(100% - 55px - 10px);
  justify-content: stretch;
}

/* Grafico Reitero */
.graph-infancia {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Contenedor de las dos tablas en fila */
.row.graph.plazo {
  flex-direction: row;
  justify-content: stretch;
  align-items: stretch;
  gap: 10px;
}

.graph-plazo {
  width: 40%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 10px;
  box-sizing: border-box;
  overflow: hidden;
}

/* =============================== FIN ESTILO ELEMENTOS GRAFICO ============================== */

/* ================================= ESTILO ELEMENTOS TABLAS ================================= */
.row.header {
  display: flex;
  height: 40px;
  flex-direction: row;
  justify-content: space-between;
  gap: 10px;
}

.row.header h3 {
  height: 30px;
  padding: 0px;
  text-align: center;
  margin-bottom: 10px;
}

#downloadBase {
  height: 30px;
  width: 130px;
  padding: 0px;
  margin-bottom: 10px;
  align-self: flex-start;
  text-align: center;
  border-radius: 6px;
}

/* Buscador */
.global-search {
  height: 30px;
  margin-bottom: 10px;
  text-align: center;
  align-self: flex-end;
  width: 180px
}

.global-search input {
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  width: 100%
}

/* Contenedor de las dos tablas en fila */
.row.tables {
  display: flex;
  height: calc(100% - 40px);
  flex-direction: row;
  justify-content: stretch;
  align-items: stretch;
  gap: 10px;
}

/* Ajustar alto con scroll */
.table-wrapper.reitero{
  height: 100%;   /* aprovecha el alto del contenedor padre */
  width: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  border-radius: 10px;
  position: relative;
}

/* Scroll moderno y oculto hasta que haces hover */
.table-wrapper::-webkit-scrollbar {
  width: 0;   /* invisible */
}

/* Evendo de Scroll al hacer hover */
.table-wrapper:hover::-webkit-scrollbar {
  width: 0; /* invisible */
}

/* Estilo general de las tablas */
table.dataTable {
  border-collapse: separate !important;
  border-spacing: 0;
  width: 100% !important;
  font-size: 13px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Encabezados */
table.dataTable thead th {
  position: sticky;
  top: 0;
  background: #0250BF;
  color: white;
  padding: 5px;
  text-align: center;
  font-weight: bold;
  z-index: 2; /* para que quede sobre las filas */
}

/* Estilo de filas */
table.dataTable tbody tr:nth-child(even) {
  background: #fafafa;
}

table.dataTable tbody tr:nth-child(odd) {
  background: #fff;
}

table.dataTable tbody tr:hover {
  background: #d4e7fd;
  transition: background-color 0.2s;
}

/* Celdas */
table.dataTable td {
  border-bottom: 1px solid #eee;
  font-size: 12px;
  text-align: center;
}

/* Columna 1 (Causa) → más ancha */
#causalesPadres th:nth-child(1),
#causalesPadres td:nth-child(1),
#causalesHijos th:nth-child(1),
#causalesHijos td:nth-child(1) {
  text-align: left;
  text-indent: 1em;
}

/* Columna 2 (Cantidad) → fija estrecha */
#causalesPadres th:nth-child(2),
#causalesPadres td:nth-child(2),
#causalesHijos th:nth-child(2),
#causalesHijos td:nth-child(2) {
  width: 60px;
  text-align: center;
  z-index: 3;
}

/* Columna 3 (%) → fija estrecha */
#causalesPadres th:nth-child(3),
#causalesPadres td:nth-child(3),
#causalesHijos th:nth-child(3),
#causalesHijos td:nth-child(3) {
  width: 60px;
  text-align: center;
  z-index: 3;
}

/* === Footer fijo === */
table.dataTable tfoot th {
  position: sticky;
  bottom: 0;
  background: #dadada;
  font-weight: bold;
  font-size: 13px;
  padding: 5px;
  z-index: 2;
}

/* Bordes redondeados arriba y abajo */
.table-wrapper table.dataTable thead th:first-child {
  border-top-left-radius: 10px;
}
.table-wrapper table.dataTable thead th:last-child {
  border-top-right-radius: 10px;
}
.table-wrapper table.dataTable tfoot th:first-child {
  border-bottom-left-radius: 10px;
}
.table-wrapper table.dataTable tfoot th:last-child {
  border-bottom-right-radius: 10px;
}

/* Links de detalle */
table.dataTable tbody td a.detalle-link {
  color: #007bff;
  font-weight: bold;
  text-decoration: none;
}
table.dataTable tbody td a.detalle-link:hover {
  text-decoration: underline;
}

/* =========================================================================================== */
/* ================================= DISEÑO DE TABLA RANKING ================================= */
/* =========================================================================================== */

#downloadBaseRank {
  height: 30px;
  width: 130px;
  padding: 0px;
  margin-bottom: 10px;
  align-self: flex-start;
  text-align: center;
  border-radius: 6px;
}

/* Columna 1 (Nombre) → más ancha */
#reiteroIndividual th:nth-child(1),
#reiteroIndividual td:nth-child(1),
#ventanaServicio th:nth-child(1),
#ventanaServicio td:nth-child(1) {
  text-align: left;
  text-indent: 1em;
}

/* Columna 2 (Cantidad Cierres) → fija estrecha */
#reiteroIndividual th:nth-child(2),
#reiteroIndividual td:nth-child(2),
#ventanaServicio th:nth-child(2),
#ventanaServicio td:nth-child(2) {
  width: 60px;
  text-align: center;
  font-weight: bold;
  z-index: 3;
}

/* Columna 3 (Cantidad Reiteros) → fija estrecha */
#reiteroIndividual th:nth-child(2),
#reiteroIndividual td:nth-child(2),
#ventanaServicio th:nth-child(2),
#ventanaServicio td:nth-child(2) {
  width: 60px;
  text-align: center;
  z-index: 3;
}

/* Columna 4 (% Reitero) → fija estrecha */
#reiteroIndividual th:nth-child(3),
#reiteroIndividual td:nth-child(3),
#ventanaServicio th:nth-child(3),
#ventanaServicio td:nth-child(3) {
  width: 60px;
  text-align: center;
  z-index: 3;
}

.porc-rojo {
  background-color: #ff9999;
  font-weight: bold;
  color: #550101;
}

.porc-amarillo {
  background-color: #e7e5ab;
  font-weight: bold;
  color: #47451a;
}

.porc-verde {
  background-color: #a1cf92;
  font-weight: bold;
  color: #182b12;
}

/* =========================================================================================== */
/* ================================== DISEÑO DE TABLA PLAZO ================================== */
/* =========================================================================================== */

/* Ajustar alto con scroll */
.table-wrapper.plazo{
  height: 100%;
  width: 60%;
  overflow-y: scroll;
  overflow-x: hidden;
  border-radius: 10px;
  position: relative;
}

/* Columna 1 (Fecha) */
#plazoSummaryTable th:nth-child(1),
#plazoSummaryTable td:nth-child(1),
#plazoSummaryTable2 th:nth-child(1),
#plazoSummaryTable2 td:nth-child(1),
#plazoSummaryTable3 th:nth-child(1),
#plazoSummaryTable3 td:nth-child(1) {
  width: 80px;
  text-align: center;
  z-index: 3;
}

/* Columna 2 (Cierres Dentro) */
#plazoSummaryTable th:nth-child(2),
#plazoSummaryTable td:nth-child(2),
#plazoSummaryTable2 th:nth-child(2),
#plazoSummaryTable2 td:nth-child(2),
#plazoSummaryTable3 th:nth-child(2),
#plazoSummaryTable3 td:nth-child(2) {
  width: 63px;
  text-align: center;
  z-index: 3;
}

/* Columna 3 (Cierres Fuera) */
#plazoSummaryTable th:nth-child(3),
#plazoSummaryTable td:nth-child(3),
#plazoSummaryTable2 th:nth-child(3),
#plazoSummaryTable2 td:nth-child(3),
#plazoSummaryTable3 th:nth-child(3),
#plazoSummaryTable3 td:nth-child(3) {
  width: 63px;
  text-align: center;
  z-index: 3;
}

/* Columna 4 (Cierres Totales) */
#plazoSummaryTable th:nth-child(4),
#plazoSummaryTable td:nth-child(4),
#plazoSummaryTable2 th:nth-child(4),
#plazoSummaryTable2 td:nth-child(4),
#plazoSummaryTable3 th:nth-child(4),
#plazoSummaryTable3 td:nth-child(4) {
  width: 63px;
  text-align: center;
  z-index: 3;
}

/* Columna 5 (Plazo Diario) */
#plazoSummaryTable th:nth-child(5),
#plazoSummaryTable td:nth-child(5),
#plazoSummaryTable2 th:nth-child(5),
#plazoSummaryTable2 td:nth-child(5),
#plazoSummaryTable3 th:nth-child(5),
#plazoSummaryTable3 td:nth-child(5) {
  width: 63px;
  text-align: center;
  z-index: 3;
}

/* Columna 6 (Cierres Dentro Acumulados) */
#plazoSummaryTable th:nth-child(6),
#plazoSummaryTable td:nth-child(6),
#plazoSummaryTable2 th:nth-child(6),
#plazoSummaryTable2 td:nth-child(6),
#plazoSummaryTable3 th:nth-child(6),
#plazoSummaryTable3 td:nth-child(6) {
  width: 63px;
  text-align: center;
  z-index: 3;
}

/* Columna 7 (Cierres Fuera Acumulados) */
#plazoSummaryTable th:nth-child(7),
#plazoSummaryTable td:nth-child(7),
#plazoSummaryTable2 th:nth-child(7),
#plazoSummaryTable2 td:nth-child(7),
#plazoSummaryTable3 th:nth-child(7),
#plazoSummaryTable3 td:nth-child(7) {
  width: 63px;
  text-align: center;
  z-index: 3;
}

/* Columna 8 (Cierres Totales Acumulados) */
#plazoSummaryTable th:nth-child(8),
#plazoSummaryTable td:nth-child(8),
#plazoSummaryTable2 th:nth-child(8),
#plazoSummaryTable2 td:nth-child(8),
#plazoSummaryTable3 th:nth-child(8),
#plazoSummaryTable3 td:nth-child(8) {
  width: 63px;
  text-align: center;
  z-index: 3;
}

/* Columna 9 (Plazo Acumulado) */
#plazoSummaryTable th:nth-child(9),
#plazoSummaryTable td:nth-child(9),
#plazoSummaryTable2 th:nth-child(9),
#plazoSummaryTable2 td:nth-child(9),
#plazoSummaryTable3 th:nth-child(9),
#plazoSummaryTable3 td:nth-child(9) {
  width: 63px;
  text-align: center;
  z-index: 3;
}

/* Links de detalle */
table.dataTable tbody td a.detalle-link {
  color: #007bff;
  font-weight: bold;
  text-decoration: none;
}
table.dataTable tbody td a.detalle-link:hover {
  text-decoration: underline;
}

/* =========================================================================================== */
/* ================================== DISEÑO DE TABLA MODAL ================================== */
/* =========================================================================================== */

/* Modal centrado */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  align-items: center;
}

/* Contenedor interno */
.modal-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 85vw;
  height: 85vh;
  background-color: #fff;
  border-radius: 10px;
  padding: 20px;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
}

/* Ajustar alto con scroll */
#detailTable_wrapper {
  height: 100%;   /* aprovecha el alto del contenedor padre */
  width: 100%;
  overflow-y: scroll;
  overflow-x: scroll;
  border-radius: 10px;
  position: relative;
}

/* Estilo de tabla en modal */
#detailTable {
  border-collapse: separate !important;
  border-spacing: 0;
  width: 100% !important;
  font-size: 14px;
  font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Encabezados */
#detailTable thead th {
  position: sticky;
  top: 0;
  background: #0250BF;
  color: white;
  padding: 8px;
  text-align: center;
  font-weight: bold;
  z-index: 2; /* para que quede sobre las filas */
}

/* Estilo de filas */
#detailTable tbody tr:nth-child(even) {
  background: #fafafa;
}

#detailTable tbody tr:nth-child(odd) {
  background: #fff;
}

#detailTable tbody tr:hover {
  background: #d4e7fd;
  transition: background-color 0.2s;
}

#detailTable td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 12px;
}

#detailTable td:nth-child(16), 
#detailTable th:nth-child(16),
#detailTable td:nth-child(31), 
#detailTable th:nth-child(31) {
  max-width: 250px;   /* ancho máximo */
  max-height: 30px;   /* alto máximo por celda */
  overflow: hidden;   /* oculta el exceso */
  text-overflow: ellipsis; /* agrega "..." */
  white-space: nowrap; /* evita saltos de línea */
  text-align: left;
  text-indent: 1em;
}

#tituloModal{
  margin: 0px 0px 10px 0px;
  width: calc(100% - 140px - 190px - 40px - 10px);
}

#downloadDetail {
  height: 30px;
  width: 130px;
  padding: 0px;
  margin-bottom: 10px;
  align-self: flex-start;
  text-align: center;
  border-radius: 6px;
}

#closeButton {
  height: 24px;
  width: 24px;
  padding: 0px;
  text-align: center;
  border-radius: 6px;
  background: #bf0202;
  color: #FFF;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

/* Evento Hover */
#closeButton:hover {
  background: #970202;
}

/* Evento Active */
#closeButton:active {
  transform: scale(0.90);
}

/* =========================================================================================== */
/* ================================== DISEÑO MODAL DE CARGA ================================== */
/* =========================================================================================== */

/* Estructura Overlay */
#uploadExcelModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

/* Estructura Modal */
#uploadExcelModal .modal-content.modal-selector {
  background: #ffffff;
  border-radius: 10px;
  padding: 20px;
  width: 360px;
  height: auto;
  max-width: 90%;
  color: #222;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Estructura Fila 1 */
#uploadExcelModal .row.contenido {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

/* Titulo Modal */
#tituloModalSelector {
  margin: 0px 0px 10px 0px;
  width: calc(100% - 20px - 10px);
}

/* Estructura Fila 2 */
#contenedorFiltro {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-evenly;
}

/* Card del Filtro */
#cardFiltro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  width: 35%;
}

/* Titulo Filtro */
#cardFiltro .figure-text{
  display: flex;
  align-items: center;
  font-size: 12px;
  height: 20px;
}

/* Filtro */
#tablaSelect{
  width: 100% !important;
  text-align: center;
}

/* Opciones Filtro */
#tablaSelect option{
  width: 100% !important;
  text-align: center;
}

/* Boton de Seleccion */
#selectExcelFile {
  display: flex;
  align-items: center;
  width: 90px;
  height: 45px;
}

/* Contenedor Archivo */
#selectedFileContainer {
  display: none;
}

/* Archivo Cargado */
#selectedFileContainer .file-preview {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Icono de Archivo */
#selectedFileContainer .file-preview img {
  width: 32px;
  height: 32px;
}

/* Texto de Archivo */
#uploadExcelModal .file-preview span {
  font-weight: bold;
  color: #111;
}

/* Fila Botones */
#uploadExcelModal .row.footer {
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}