/* Todos los pesos de Inter registrados con font-display: swap para evitar el
   parpadeo de tipografía (texto pinta con la fuente de respaldo del sistema y
   salta a Inter una vez descargada) y para que los textos en negrita usen el
   peso real en vez de una negrita sintética del navegador. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Light.otf") format("opentype");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.otf") format("opentype");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Black.otf") format("opentype");
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Black.otf") format("opentype");
  font-weight: 900;
  font-display: swap;
}

body {
  font-family: "Inter", sans-serif;
}

h1 {
  font-family: "Inter", sans-serif;
  font-weight: bold;
}

h4 {
  font-family: "Inter", sans-serif;
  font-weight: bold;
}

p {
  font-family: "Inter", sans-serif;
  color: #2b2b2b;
}

.subt {
  font-family: "Inter b", sans-serif;
  font-weight: bold;
  color: #2b2b2b;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 48px 0;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  background-color: #f8f9fa;
}

.sidebar-logo {
  text-align: center;
  margin-bottom: 20px;
}

.sidebar-nav {
  list-style: none;
  padding-left: 0;
}

.sidebar-nav-item {
  margin-bottom: 8px;
}

.sidebar-nav-link {
  display: block;
  padding: 6px 90px;
  color: #343a40;
  text-decoration: none;
}

.sidebar-nav-link:hover {
  background-color: #e9ecef;
}

.center-card {
  display: flex;
  justify-content: center;
  min-height: 50vh;
}

.center-card-login {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.circle-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  background-color: red;
  color: white;
  border-radius: 50%;
  font-weight: bold;
}

/* Badge Circular de Alerta (Estilo Moderno con Gradiente y Sombra) */
.circle-badge-nofix {
  /* Gradiente moderno de Rojo Vivo a Borgoña */
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);

  color: white;
  font-weight: 700; /* Un poco más de peso */

  border-radius: 50%;
  width: 45px; /* Ligeramente más grande para más impacto */
  height: 45px;

  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem; /* Tamaño de fuente ligeramente mayor */

  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);

  /* Sombra más profunda y cálida para un efecto "flotante" */
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);

  /* Transición para efectos de hover si se llegaran a aplicar */
  transition: all 0.3s ease;
}

/* OPCIONAL: Efecto al pasar el ratón (Hover) */
.circle-badge-nofix:hover {
  /* Oscurece el gradiente al interactuar */
  background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
  box-shadow: 0 6px 16px rgba(220, 53, 69, 0.5);
  cursor: default; /* Indica que no es clickeable si solo es un indicador */
}
.mg-nav {
  margin-top: 100px;
}

.center-form {
  margin-top: 100px;
  margin-bottom: 30px;
}

@media (max-height: 900px) {
  /* Aplica estilos cuando la resolución sea de una tablet */
  .center-form {
    margin-top: 100px;
  }

  .center-card {
    margin-top: 70px;
  }

  .mg-nav {
    margin-top: 100px;
  }
}

@media (max-height: 700px) {
  /* Aplica estilos cuando la resolución sea de una tablet */
  .center-card {
    margin-top: 100px;
  }

  .mg-nav {
    margin-top: 120px;
  }
}

@media (max-width: 768px) {
  /* Aplica estilos cuando la resolución sea de una tablet */
  .center-card {
    margin-top: 100px;
  }
}

.cmain {
  background-image: url("../src/login_background.png");
  background-size: cover;
  background-position: center;
}

.logo-img {
  max-width: 200px;
  margin-bottom: 20px;
}

.carousel-container {
  position: relative;
}

.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.carousel-control-prev {
  left: -40px;
}

.carousel-control-next {
  right: -40px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s linear 0.3s, opacity 0.3s;
}

.loading-overlay.show {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

.floating-alert {
  position: fixed;
  top: 100px;
  /* Puedes ajustar la posición vertical del mensaje */
  right: 30px;
  /* Puedes ajustar la posición horizontal del mensaje */
  z-index: 9999;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.label-container {
  margin-bottom: 5px;
}

.select-container {
  width: 100%;
  /* Ajusta el ancho según sea necesario */
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.icon-container {
  position: relative;
  width: 200px;
  height: 200px;
}

.icon {
  width: 100%;
  height: 100%;
}

.button-text {
  margin-top: 10px;
  font-weight: bold;
}

.animated {
  animation-duration: 1s;
  animation-fill-mode: both;
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-button {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  padding: 0;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0px 8px rgba(0, 0, 0, 0.5);
}

.custom-button:hover {
  transform: translateY(-15px);
}

.icon-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.button-text {
  margin-top: 10px;
  font-size: 18px;
  text-align: center;
}

.custom-card {
  overflow: hidden;
  border-radius: 40px;
  padding: 20px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  display: flex;
  text-align: center;
  box-shadow: 0 0px 8px rgba(0, 0, 0, 0.2);
}

.custom-caja {
  overflow: hidden;
  border-radius: 40px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0px 8px rgba(0, 0, 0, 0.5);
}

.marginHeader {
  margin-top: 54px;
}

.navbar {
  background-color: #0d0f14 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  padding: 0.28rem clamp(0.7rem, 2.5vw, 1.75rem);
  min-height: 50px;
  transition: padding 0.2s ease, box-shadow 0.2s ease;
  z-index: 1030;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
}

.navbar-brand img,
.navbar-brand .valiant-nav-logo {
  height: clamp(26px, 2.8vw, 32px);
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.navbar-brand:hover img,
.navbar-brand:hover .valiant-nav-logo {
  transform: scale(1.02);
}

.navbar-nav .nav-link {
  font-size: clamp(0.82rem, 0.4vw + 0.7rem, 0.9rem);
  padding: 0.25rem clamp(0.5rem, 1vw, 0.8rem);
  color: #e2e8f0 !important;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: #ffffff !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-right: 0.75rem;
}

.back-button:hover {
  background-color: #b50c0c;
  color: #ffffff !important;
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(181, 12, 12, 0.4);
}

.custom-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0 !important;
  font-weight: 500;
  font-size: clamp(0.82rem, 0.4vw + 0.7rem, 0.88rem);
  padding: 4px 12px !important;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.custom-dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
}

.custom-dropdown-menu {
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background-color: #14161c;
  padding: 8px;
  min-width: 220px;
  margin-top: 6px;
}

.custom-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 500;
  color: #cbd5e1;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.custom-dropdown-menu .dropdown-item i {
  width: 18px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.custom-dropdown-menu .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.custom-dropdown-menu .dropdown-item:hover i {
  color: #b50c0c;
}

.custom-dropdown-menu .dropdown-divider {
  margin: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-dropdown-menu .logout-link {
  color: #ffffff !important;
  background-color: #b50c0c !important;
  font-weight: 600;
}

.custom-dropdown-menu .logout-link i {
  color: #ffffff !important;
}

.custom-dropdown-menu .logout-link:hover {
  background-color: #940a0a !important;
  color: #ffffff !important;
}

.styled-table {
  border-collapse: collapse;
  margin: 25px 0;
  font-size: 1em;
  font-family: sans-serif;
  width: 100%; /* Establece el ancho al 100% */
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.styled-table thead tr {
  background-color: #7c0000;
  color: #ffffff;
  text-align: left;
}

.styled-table th,
.styled-table td {
  padding: 12px 15px;
}

.styled-table tbody tr {
  border-bottom: 1px solid #dddddd;
}

.styled-table tbody tr:nth-of-type(even) {
  background-color: #f3f3f3;
}

.styled-table tbody tr:last-of-type {
  border-bottom: 2px solid #7c0000;
}

.styled-table tbody tr.active-row {
  font-weight: bold;
  color: #009879;
}

.sticky-top tr th {
  position: sticky;
  top: 90px;
  text-align: center;
  z-index: 10;
  background-color: #ffffff;
}

.sticky-top-no-nav tr th {
  position: sticky;
  top: 0;
  text-align: center;
  z-index: 10;
  background-color: #ffffff;
}

.columna-grande {
  width: 1100px !important;
}

.semaforo-verde {
  color: green; /* Cambiar al color verde */
}

.semaforo-amarillo {
  color: yellow; /* Cambiar al color amarillo */
}

.semaforo-rojo {
  color: red; /* Cambiar al color rojo */
}

.fondo-rojo {
  background-color: #ffcccc; /* Cambia esto al color rojo deseado */
}

.fondo-amarillo {
  background-color: #ffffcc; /* Cambia esto al color amarillo deseado */
}

.table2 {
  border-collapse: collapse;
  border: 2px solid #000; /* Borde sólido de 2 píxeles de ancho de color negro */
}

.table3 {
  border-collapse: collapse;
  border: 2px solid #000; /* Borde sólido de 2 píxeles de ancho de color negro */
  font-size: 10px;
}

.table3 td {
  border: 1px solid #000; /* Borde de las celdas de datos */
  padding: 2px; /* Espacio interno de las celdas */
}

/* Estilo para las celdas de datos */
.table2 td {
  border: 1px solid #000; /* Borde de las celdas de datos */
  padding: 8px; /* Espacio interno de las celdas */
}

.reporte-letra {
  font-size: 10px;
}

.w-5 {
  width: 5%;
}
.w-10 {
  width: 10%;
}
.w-15 {
  width: 15%;
}
.w-25 {
  width: 25%;
}

.width-50 {
  width: 50px;
  min-width: 50px;
}

.width-100 {
  width: 100px;
  min-width: 100px;
}

.width-150 {
  width: 150px;
  min-width: 150px;
}

.width-200 {
  width: 200px;
  min-width: 200px;
}
.width-300 {
  width: 300px;
  min-width: 300px;
}

.width-500 {
  width: 500px;
  min-width: 500px;
}
.width-700 {
  width: 700px;
  min-width: 700px;
}

.matriz-div {
  width: 200px; /* Ajusta este valor según tus necesidades */
}

.custom-div > div {
  margin-bottom: 10px; /* Espacio entre elementos internos */
}

.custom-div .btn {
  align-self: stretch; /* Botones con mismo ancho */
}

.nombre-matriz {
  height: 50px;
}
.semaforo-matriz {
  height: 30px;
}

.fecha-matriz {
  height: 30px;
}

.archivo-link {
  height: 30px;
}

@media print {
  .bg-danger {
    background-color: red;
  }
  .bg-warning {
    background-color: yellow;
  }
  .bg-success {
    background-color: green;
  }
}

/* Cambiar el color de fondo cuando el botón está activo */
.toggle-btn.active {
  background-color: #30a8ee; /* Cambia este color según desees */
  color: white;
}

.indicadorPendientesMatriz {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 50px;
  height: 50px;
  display: none;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: red;
  color: white;
  border-radius: 50%;
  font-weight: bold;
  text-align: center;
}

.spinner-container {
  display: none;
  justify-content: center; /* Centra horizontalmente */
  align-items: center; /* Centra verticalmente, si es necesario */
}

.big-checkbox {
  width: 30px;
  height: 30px;
}

.select2-selection__rendered {
  line-height: 31px !important;
}
.select2-container .select2-selection--single {
  height: 35px !important;
}
.select2-selection__arrow {
  height: 34px !important;
}

.select2-container--default .select2-results > .select2-results__options {
  max-height: 800px;
}

.eoc {
  --ink: #0b1220;
  --muted: #6b7280;
  --border: #e6e9f0;
  --brand: #1a56db;
  --brand-2: #163fa3;
  --soft: #f7f8fc;
  --accent: #eef3ff;
  color: var(--ink);
}
.eoc .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1b2a4a 52%, #0f172a 100%);
  color: #fff;
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}
.eoc .meta {
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  letter-spacing: 0.2px;
}
.eoc .kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  min-width: 210px;
}
.eoc .kpi .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.eoc .kpi .value {
  font-weight: 700;
  font-size: 18px;
}
.eoc .chip {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.24);
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.2px;
  background: rgba(255, 255, 255, 0.08);
}
.eoc .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.eoc .btn-brand {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
  border-radius: 10px;
}
.eoc .btn-brand:hover {
  background: var(--brand-2);
  border-color: var(--brand-2);
}
.eoc .btn-plain {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #111827;
}
.eoc .btn-plain:hover {
  background: #fafbff;
  border-color: #d9e1f2;
}
.eoc .fxbar {
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 12px 0 18px;
  font-size: 13px;
}
.eoc .delta-up,
.delta-up {
  color: #0f7b2d;
  font-weight: 600;
}
.eoc .delta-down,
.delta-down {
  color: #b60e0e;
  font-weight: 600;
}
.eoc .delta-zero,
.delta-zero {
  color: #6b7280;
  font-weight: 600;
}
.eoc .delta-pill,
.delta-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f8f4;
  margin-left: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}
.eoc .delta-up .delta-pill,
.delta-up .delta-pill {
  background: #eaf7ef;
}
.eoc .delta-down .delta-pill,
.delta-down .delta-pill {
  background: #fdecec;
}
.eoc .table thead th {
  white-space: nowrap;
}
.eoc .thead-dark th {
  position: sticky;
  top: 90;
  z-index: 2;
}
.eoc .card {
  border-radius: 14px;
  border: 1px solid var(--border);
}
.eoc .toolbar {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
}
.eoc .form-control {
  border-radius: 10px;
}
.eoc .pill-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
}
.eoc .row-over {
  background: #fff7f7 !important;
}
.eoc .row-ok {
  background: #f7fbf7 !important;
}
.eoc .tfoot-sticky {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 2px solid var(--border);
}
/* Cards de estado (manteniendo tu lógica) pulidas */
.eoc .status-card {
  border-radius: 14px;
  color: #fff;
  min-width: 220px;
}
.eoc .status-card .card-body {
  padding: 14px;
}
.eoc .status-green {
  background: linear-gradient(135deg, #0e7a3e, #139a54);
}
.eoc .status-amber {
  background: linear-gradient(135deg, #b78900, #e6b400);
}
.eoc .status-red {
  background: linear-gradient(135deg, #8e1b1b, #c22525);
}

/* -- COLORES DE BOTÓN BASADOS EN TU ESTILO .EOC -- */

/* Botón Verde (Conceptos y Aditivas) */
.eoc .btn-success-theme {
  background: linear-gradient(135deg, #0e7a3e, #139a54); /* Gradiente Verde */
  border: none;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(19, 154, 84, 0.3);
  transition: all 0.3s ease; /* Añadido para consistencia */
}
.eoc .btn-success-theme:hover {
  background: linear-gradient(135deg, #09592c, #0d7541);
  color: white;
  transform: translateY(-2px); /* Ajustado a -2px para igualar el warning */
  box-shadow: 0 6px 16px rgba(19, 154, 84, 0.4);
}

/* Botón Amarillo/Naranja (Advertencia) */
.eoc .btn-warning-theme {
  background: linear-gradient(135deg, #f7c948, #f5a623);
  border: none;
  color: #333; /* ¡CORREGIDO! Mejor contraste que el blanco */
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(245, 166, 35, 0.4);
  transition: all 0.3s ease;
}

.eoc .btn-warning-theme:hover {
  /* Sugerencia: Invertir el orden de los colores para el hover o oscurecer ligeramente */
  background: linear-gradient(135deg, #f5a623, #f7c948);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(245, 166, 35, 0.5);
  color: #000; /* Asegura el negro en hover si el gradiente se aclara */
}

/* Botón Rojo (Extraordinarios) */
.eoc .btn-danger-theme {
  background: linear-gradient(135deg, #8e1b1b, #c22525); /* Gradiente Rojo */
  border: none;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(142, 27, 27, 0.3);
}
.eoc .btn-danger-theme:hover {
  background: linear-gradient(135deg, #711616, #a11f1f);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(142, 27, 27, 0.4);
}

/* Botón Azul (Insumos) - Usamos tu color principal .brand */
.eoc .btn-info-theme {
  background: var(--brand); /* Usando el azul definido en tu variable */
  border: none;
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3); /* Sombra basada en azul */
}
.eoc .btn-info-theme:hover {
  background: var(--brand-2); /* Usando el azul hover definido en tu variable */
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26, 86, 219, 0.4);
}

/* Botón Primario - Negro Oscuro */
.btn-dark-theme {
  /* Gradiente sutil de Negro a Gris Oscuro */
  background: linear-gradient(135deg, #1f1f1f, #333333);
  border: none;
  color: white;
  font-weight: 600;
  /* Sombra oscura para un efecto elevado */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.btn-dark-theme:hover {
  /* Gradiente invertido/más oscuro al pasar el ratón */
  background: linear-gradient(135deg, #333333, #1f1f1f);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
}
/* Botón Secundario - Blanco Claro */
.btn-light-theme {
  /* Gradiente sutil de Blanco a Gris Muy Claro */
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  /* Borde negro o gris oscuro para definir el contorno */

  color: #1f1f1f; /* Texto negro para alto contraste */
  font-weight: 600;
  /* Sombra ligera para no opacar el botón oscuro */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.btn-light-theme:hover {
  /* Fondo se vuelve ligeramente más oscuro para el feedback visual */
  background: linear-gradient(135deg, #e0e0e0, #ffffff);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Estilo para los botones dentro del contenedor horizontal */
.eoc .btn-group-horizontal-spacing .btn {
  /* Ocupa el ancho completo dentro de su columna para la alineación */
  width: 100%;
  white-space: nowrap; /* Evita que el texto se corte */
  transition: all 0.3s ease;
}

.eoc .btn-group-horizontal-spacing .fa-search {
  margin-right: 0.5rem;
}

/* -- NUEVOS ESTILOS PARA TARJETAS DE SÓLO BORDE -- */

/* Estilo base, fondo blanco, texto oscuro */
.eoc .border-kpi-card {
  background: #fff;
  color: var(--ink); /* color de texto oscuro */
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Sombra sutil */
  transition: all 0.3s ease;
}

/* 1. Tarjeta Verde */
.eoc .border-kpi-green {
  /* Mismo color verde usado en .status-green */
  border-left: 5px solid #139a54;
}
.eoc .border-kpi-blue {
  /* Mismo color verde usado en .status-green */
  border-left: 5px solid #13499a;
}
.eoc .border-kpi-green:hover {
  border-left: 5px solid #0e7a3e; /* Efecto sutil al pasar el mouse */
}

/* 2. Tarjeta Ámbar */
.eoc .border-kpi-amber {
  /* Mismo color ámbar usado en .status-amber */
  border-left: 5px solid #e6b400;
}
.eoc .border-kpi-amber:hover {
  border-left: 5px solid #b78900;
}

/* 3. Tarjeta Roja */
.eoc .border-kpi-red {
  /* Mismo color rojo usado en .status-red */
  border-left: 5px solid #c22525;
}
.eoc .border-kpi-red:hover {
  border-left: 5px solid #8e1b1b;
}

/* Para los números, aseguramos un tamaño adecuado */
.eoc .border-kpi-card strong {
  font-size: 1.5rem; /* Hace que el número se vea más grande y destacado */
  font-weight: 700;
}

/* 1. Base para la tabla: table-layout: fixed */
/* Esto asegura que los anchos definidos por width se respeten estrictamente. */
.fixed-columns {
  table-layout: fixed;
  width: 100%; /* Asegura que la tabla ocupe todo el ancho del modal */
}

.fixed-columns thead th {
  white-space: nowrap;
}

/* 2. Descripción: Ancho grande y fijo (350px) */
.fixed-columns th:nth-child(2), /* Encabezado 'Descripción' */
.fixed-columns td:nth-child(2) {
  /* Celdas de Descripción */
  width: 350px;
  min-width: 350px;
  max-width: 350px;
  word-wrap: break-word;
  /* El word-wrap es vital para que las descripciones largas no se salgan del modal */
}

/* 3. Cantidades: Ancho para 6 decimales (140px) */
.fixed-columns th:nth-child(4), /* Cantidad OT */
.fixed-columns td:nth-child(4),
.fixed-columns th:nth-child(5), /* Cantidad aditiva */
.fixed-columns td:nth-child(5),
.fixed-columns th:nth-child(6), /* Cantidad Real */
.fixed-columns td:nth-child(6) {
  width: 140px;
  min-width: 140px;
  text-align: right;
}

/* 4. Clave y Unidad: Ancho más corto (80px) */
.fixed-columns th:nth-child(1), /* Clave */
.fixed-columns td:nth-child(1),
.fixed-columns th:nth-child(3), /* Unidad */
.fixed-columns td:nth-child(3) {
  width: 80px;
  min-width: 80px;
}

.encontrado-card {
  display: none;
}

.gradient-header {
  /* Un degradado sutil de púrpura a azul, puedes cambiar los colores */
  background: linear-gradient(90deg, #0a0a0a 0%, #0c023a 60%);
  border: none; /* Eliminar borde si lo hubiera */
}

/* Efecto de sombra al pasar el ratón (Reutilizado) */
.hover-shadow {
  transition: transform 0.2s, box-shadow 0.2s;
}

.hover-shadow:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Para el truncamiento de texto */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Estilos para las píldoras de estado */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pill.success {
  background-color: #eaf7ef; /* Verde pálido */
  color: #0f7b2d; /* Verde oscuro */
}

.status-pill.warning {
  background-color: #fff8e1; /* Amarillo pálido */
  color: #b78900; /* Amarillo oscuro */
}

.status-pill.danger {
  background-color: #fdecec; /* Rojo pálido */
  color: #b60e0e; /* Rojo oscuro */
}

.btn-pro-blue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  gap: 6px;
  box-shadow: 0 5px 15px rgba(37, 99, 235, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
  white-space: nowrap;
}

.btn-pro-gray {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  gap: 6px;
  box-shadow: 0 5px 15px rgba(180, 194, 224, 0.35);
  transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.12s ease;
  white-space: nowrap;
}

/* ==========================================================================
   SISTEMA GLOBAL DE RESPONSIVIDAD (MODALES, TABLAS Y VISTAS PARA MÓVILES)
   Aplica a toda la plataforma para soporte en celulares (360px - 768px).
   ========================================================================== */

/* ---------- 1. Modales globales responsivos ---------- */
@media (max-width: 767.98px) {
  .modal-dialog {
    margin: 8px auto !important;
    max-width: calc(100% - 16px) !important;
    width: calc(100% - 16px) !important;
  }

  .modal-dialog.modal-sm,
  .modal-dialog.modal-md,
  .modal-dialog.modal-lg,
  .modal-dialog.modal-xl {
    max-width: calc(100% - 16px) !important;
    width: calc(100% - 16px) !important;
    margin: 8px auto !important;
  }

  .modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 16px);
  }

  .modal-content {
    max-height: calc(100dvh - 20px) !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  .modal-header {
    padding: 12px 16px !important;
    flex-shrink: 0 !important;
    align-items: center;
  }

  .modal-header .modal-title,
  .modal-header h5 {
    font-size: 0.95rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0;
  }

  .modal-header .close,
  .modal-header .btn-close {
    padding: 8px 12px !important;
    margin: -8px -8px -8px auto !important;
    font-size: 1.4rem !important;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .modal-body {
    padding: 14px 16px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 1 auto !important;
    max-height: calc(100dvh - 130px) !important;
  }

  .modal-footer {
    padding: 10px 16px !important;
    flex-shrink: 0 !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .modal-footer > * {
    margin: 0 !important;
  }

  @media (max-width: 575.98px) {
    .modal-footer {
      flex-direction: column-reverse !important;
    }
    .modal-footer > .btn,
    .modal-footer > button,
    .modal-footer > a {
      width: 100% !important;
      justify-content: center !important;
      text-align: center !important;
    }
  }
}

/* ---------- 2. Tablas globales responsivas ---------- */
.table-responsive,
.ep-table-wrap,
.nx-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar,
.ep-table-wrap::-webkit-scrollbar,
.nx-table-wrap::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-thumb,
.ep-table-wrap::-webkit-scrollbar-thumb,
.nx-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.3);
  border-radius: 4px;
}

@media (max-width: 767.98px) {
  /* Contenedores que tienen tablas directas */
  .modal-body:has(> table),
  .modal-body:has(> .table),
  .card-body:has(> table),
  .card-body:has(> .table) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ajustes de celdas para pantallas móviles */
  .table th,
  .table td,
  .ep-table th,
  .ep-table td,
  .table-clean th,
  .table-clean td,
  .table-modern th,
  .table-modern td {
    padding: 8px 10px !important;
    font-size: 0.8rem;
    white-space: normal;
  }

  /* Asegurar ancho mínimo de tablas con múltiples columnas para no colapsar datos */
  .table-responsive > table,
  .table-responsive > .table,
  .ep-table-wrap > table,
  .ep-table-wrap > .table {
    min-width: 580px;
  }

  /* DataTables en celulares */
  .dataTables_wrapper {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none !important;
    text-align: left !important;
    margin-bottom: 8px;
    width: 100%;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100% !important;
    margin-left: 0 !important;
    height: 38px;
    border-radius: 8px;
  }

  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    float: none !important;
    text-align: center !important;
    margin-top: 10px;
    width: 100%;
  }

  .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 4px 8px !important;
    font-size: 0.78rem;
  }
}

/* ---------- 3. Vistas globales en celulares ---------- */
@media (max-width: 767.98px) {
  /* Evitar márgenes excesivos que comprimen la pantalla en teléfonos */
  .marginHeader > .m-5,
  .obra-ops > .m-5,
  .obra-ops--photos > .m-5,
  .obra-ops--planning > .m-5,
  .container-fluid.m-5,
  div.m-5 {
    margin: 8px !important;
    padding: 0 !important;
  }

  /* Prevenir desbordamiento horizontal en el documento */
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Campos de formulario */
  .form-row > [class*="col-"] {
    margin-bottom: 8px;
  }
}
