.fecha-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--border-radius-badge, 8px);
  background: rgba(4, 165, 229, 0.08);
  /* azul suave */
  backdrop-filter: blur(12px);
  border: 1px solid rgba(4, 165, 229, 0.2);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text, #222);
  cursor: default;
}

.tiempo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--border-radius-badge, 8px);
  background: rgba(16, 185, 129, 0.08);
  /* verde suave */
  backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text, #222);
  cursor: default;
}

.home-container {
  margin: 0;
  padding: 0;
  background: #F3F4F6;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
}

.home-content {
  flex: 1;
  width: 95dvw;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brigadas-container {
  display: grid;
  grid-template-columns: min-content 1fr;
  gap: 0.5rem;
  margin-left: 10px;
  margin-top: 0.1rem;
  margin-bottom: 1rem;
  width: 100%;
}

.brigadas-title {
  background-color: #EF4444;
  color: white;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 12px;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 35px;
}

.brigadas-panel {
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  width: 90dvw;
  display: flex;
  flex-direction: column;
}

.brigadas-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  width: 100%;
}

.brigadas-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--ctp-latte-crust);
  border-radius: 8px;
  min-height: fit-content;
}

.brigadas-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brigadas-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: white;
}

.brigadas-info {
  flex-grow: 1;
}

.brigadas-info .brigadas-title {
  writing-mode: horizontal-tb;
  transform: none;
  background: none;
  font-weight: 500;
  color: #4B5563;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  letter-spacing: normal;
  text-align: left;
  display: block;
}

.brigadas-value {
  font-size: 1.875rem;
  line-height: 2.25rem;
  font-weight: 700;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.brigadas-value .current {
  color: #1E40AF;
}

.brigadas-value .total {
  color: #4B5563;
}

.tag-container {
  display: flex;
  gap: 8px;
  font-size: 0.75rem;
}

.tag {
  padding: 2px 6px;
  border-radius: 4px;
  color: white;
  display: flex;
  align-items: center;
}

.tag-morning {
  background-color: #FCD34D;
}

.tag-afternoon {
  background-color: #FB923C;
}

.tag-night {
  background-color: #4B5563;
}

.tag-value {
  font-weight: 700;
  margin-left: 4px;
  font-size: 1rem;
}

.detalles-container {
  display: grid;
  grid-template-columns: min-content 1fr;
  gap: 0.5rem;
  margin-left: 10px;
  margin-top: 0.1rem;
  margin-bottom: 1rem;
  max-height: 80dvh;
  overflow: hidden;
  height: 79dvh;
}

.detalles-title {
  background-color: #EF4444;
  color: white;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 12px;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 35px;
}

.detalles-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.table-container {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.table-scroll-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
}

.detalles-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.detalles-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.detalles-table thead th {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid rgba(156, 163, 175, 0.3);
}

.detalles-table th {
  text-align: left;
  padding: 0.5rem;
  color: #7c7f93;
  font-weight: 500;
  white-space: nowrap;
}



.detalles-table tr:nth-child(even) {
  background-color: #f6f6f9;
}



.afectacion-barra {
  padding: 4px 10px;
  border-radius: var(--border-radius-badge);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid transparent;
  min-width: 85px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.afectacion-si {
  background: rgba(var(--red-rgb), 0.15);
  color: var(--red);
  border: 1px solid rgba(var(--red-rgb), 0.3);
  box-shadow: 0 2px 6px rgba(var(--red-rgb), 0.12);
}

.afectacion-si:hover {
  background: rgba(var(--red-rgb), 0.25);
  border: 1px solid rgba(var(--red-rgb), 0.4);
  box-shadow: 0 4px 12px rgba(var(--red-rgb), 0.2);
  transform: translateY(-1px);
}

.afectacion-no {
  background: rgba(var(--green-rgb), 0.15);
  color: var(--green);
  border: 1px solid rgba(var(--green-rgb), 0.3);
  box-shadow: 0 2px 6px rgba(var(--green-rgb), 0.12);
}

.afectacion-no:hover {
  background: rgba(var(--green-rgb), 0.25);
  border: 1px solid rgba(var(--green-rgb), 0.4);
  box-shadow: 0 4px 12px rgba(var(--green-rgb), 0.2);
  transform: translateY(-1px);
}

.incidents-grid {
  display: grid;
  grid-template-columns: min-content 1fr;
  gap: 0.5rem;
  margin-left: 10px;
  margin-top: 0.1rem;
  margin-bottom: 1rem;
}

.incidents-container {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  gap: 1rem;
  height: 200px;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  box-sizing: content-box;
  border: none;
}

.panel-title {
  font-size: 14px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 15px;
  position: relative;
  z-index: 20;
}



.chart-container {
  position: absolute;
  inset: 0;
  padding: 20px 20px 25px 30px;
}

.opacity-25 {
  position: absolute;
  inset: 0;
  opacity: 0.25;
}

.incidents-counter {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.counter-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
}

.counter-value {
  font-size: 56px;
  font-weight: bold;
  color: #1f2937;
}

.trend-arrow {
  font-size: 32px;
  color: #10b981;
  line-height: 1;
  position: relative;
  top: -4px;
}

.trend-arrow.down {
  color: #ef4444;
}

.counter-label {
  font-size: 13px;
  color: #6b7280;
  margin-top: 8px;
  line-height: 1;
}

.vertical-title {
  background-color: #EF4444;
  color: white;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 12px;
  writing-mode: vertical-lr;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 35px;
}




.btn-cerrar {
  padding: 0.5rem 1rem;
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  align-self: flex-end;
}

.btn-cerrar:hover {
  background-color: #dc2626;
}

.time-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  background-color: #dc2626;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  z-index: 10;
}

.incidencias-item {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

@media (min-width: 640px) {
  .brigadas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (min-width: 1024px) {
  .brigadas-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}




.no-incidencias {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  margin: 1rem;
  position: relative;
  overflow: hidden;
}

.no-incidencias::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 51, 234, 0.05) 100%);
  z-index: -1;
}

.no-incidencias-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--slate-700);
}

.no-incidencias-content svg {
  color: var(--slate-400);
  opacity: 0.8;
}

.no-incidencias-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--slate-700);
  margin: 0;
}

.no-incidencias-subtitle {
  font-size: 0.875rem;
  color: var(--slate-500);
  margin: 0;
  line-height: 1.4;
}



body {
  scrollbar-color: var(--maroon) var(--crust);
  scrollbar-width: 10px;
  scrollbar-gutter: 10px;
}


.cargando {
  height: 100%;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.etapa-ingreso-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100vh;
  overflow: hidden;
}

.formulario {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}


.label-pregunta {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 0.9rem;
  font-weight: 500;
  gap: 0.5rem;
}


.label-pregunta.obligatorio::before {
  content: '';
  display: block;
  width: 4px;
  height: 1rem;
  background: var(--red);
  border-radius: var(--border-radius);
}

.contenedor-sugerencia {
  align-items: center;
  color: var(--sky);
  display: flex;
  font-size: 0.8rem;
  gap: 0.2rem;
  padding: 0.3rem;
}


.contenedor-elementos {
  border-top: 0.1rem solid var(--surface0);
  color: var(--subtext1);
  display: flex;
  flex-direction: column;
  padding: min(1.5rem, 15%);
  position: relative;
}







.input-number {
  text-align: center;
  width: 35dvw;
}

.input-text {
  width: 50dvw;
}


/* .btn {
  align-items: center;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  display: flex;
  font-weight: 500;
  justify-content: center;
  padding: 0.5rem 1rem;
  transition: background 0.2s ease;
  gap: 0.4rem;
  min-width: min(10rem, 12%);
} */

.btn-corregir {
  background: var(--peach);
  color: var(--base);
}

.btn-guardar {
  background: var(--sapphire);
  color: var(--base);
}

.btn-cancelar {
  background: var(--maroon);
  color: var(--base);
}

.btn-cancelar:hover {
  background: var(--red);
  color: var(--base);
}

.btn-guardar:hover {
  background: var(--sky);
}

.btn-corregir:hover {
  background: var(--yellow);
}

.date-picker-container {
  padding-top: 0.8rem;
  max-width: 35dvw;
}


.contenedor-busqueda {
  position: relative;
  width: 100%;
}

.busqueda-input {
  position: relative;
}

.cargando-input {
  pointer-events: none;
  position: absolute;
  right: 1rem;
  top: 20%;
}

.mensaje-error {
  color: var(--red);
  display: block;
  font-size: 0.75rem;
  margin-left: 4px;
  margin-top: 4px;
  min-height: 1rem;
  transition: opacity 0.2s ease-in-out;
  white-space: normal;
}

.error {
  color: var(--red);
  font-size: 0.8em;
  margin-top: 0.1rem;
}



.contenedor-opciones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
  padding: 0.5rem 2rem 0.5rem;
  width: 100%;
}

.contenedor-input-intermedio {
  grid-column: 1 / -1;
  margin-top: 1rem;
}

.btn-opcion {
  padding: 0.625rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.btn-opcion::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.btn-opcion:active::before {
  opacity: 0.1;
}

.btn-opcion-multiple {
  border: 1.5px solid var(--surface1);
  background: var(--white);
  color: var(--text);
}

.btn-opcion-unica {
  border: 1.5px solid var(--surface1);
  background: var(--white);
  color: var(--text);
}

.btn-opcion-unica:hover:not(:disabled):not(.seleccionado) {
  border-color: var(--sapphire);
  background: rgba(32, 159, 181, 0.06);
  color: var(--sapphire);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(32, 159, 181, 0.12);
}

.btn-opcion-multiple:hover:not(:disabled):not(.seleccionado) {
  border-color: var(--maroon);
  background: rgba(230, 69, 83, 0.06);
  color: var(--maroon);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 69, 83, 0.12);
}

.btn-opcion-unica.seleccionado {
  background: linear-gradient(135deg, var(--sapphire) 0%, var(--teal) 100%);
  color: var(--white);
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(32, 159, 181, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-opcion-unica.seleccionado:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(32, 159, 181, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-opcion-multiple.seleccionado {
  background: linear-gradient(135deg, var(--maroon) 0%, var(--flamingo) 100%);
  color: var(--white);
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(230, 69, 83, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-opcion-multiple.seleccionado:hover:not(:disabled) {
  box-shadow: 0 6px 20px rgba(230, 69, 83, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-opcion:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-opcion:disabled::before {
  display: none;
}

.contenedor-busqueda {
  position: relative;
  width: 100%;
}

.input-busqueda-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  width: 100%;
  align-items: center;
}


.btn-seleccionar {
  background: var(--blue);
  color: var(--base);
}

.btn-seleccionar:hover {
  background: var(--sky);
}


.textarea {
  line-height: 1.5;
  resize: none;
  width: 100%;
}





.contenedor-erroneo {
  border: 1px solid var(--red);
  border-radius: var(--border-radius);
  padding: 0.5rem 2rem 0.5rem;
  background-color: color-mix(in srgb, var(--red) 5%, transparent);
}

.contenedor-seleccionar {
  align-items: center;
  display: flex;
  font-size: 0.8em;
  gap: 0.2rem;
  justify-content: center;
  padding: 0.5rem;
  color: var(--red);
}

@media (max-width: 768px) {
  .input-busqueda-wrapper {
    flex-direction: column;
    max-width: none;

    width: 100%;
  }

  .input.input-text {
    width: 100%;
    max-width: none;
  }

  .input-number {
    width: auto;
  }

  .btn,
  .btn-seleccionar {
    width: 100%;
    max-width: none;
  }


  .contenedor-botones {
    flex-direction: column-reverse;
  }
}

.btn-reporte {
  position: relative;
  padding: var(--padding-05);
  border-radius: var(--border-radius-circle);
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-avances {
  background: rgba(var(--teal-rgb), 0.15);
  border: 1px solid rgba(var(--teal-rgb), 0.35);
  color: var(--teal);
  backdrop-filter: var(--glass-backdrop);
  box-shadow: 0 2px 6px rgba(var(--teal-rgb), 0.12);
}

.btn-reporte:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-avances.activo {
  background: rgba(var(--teal-rgb), 0.55);
  border: 2px solid var(--teal);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(var(--teal-rgb), 0.3);
  backdrop-filter: var(--glass-backdrop);
  font-weight: 700;
}

.btn-avances:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(var(--teal-rgb), 0.25);
  border: 1px solid rgba(var(--teal-rgb), 0.55);
  box-shadow: 0 4px 12px rgba(var(--teal-rgb), 0.2);
  color: var(--teal);
}

.btn-avances.activo:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(var(--teal-rgb), 0.65);
  border: 2px solid var(--teal);
  box-shadow: 0 6px 16px rgba(var(--teal-rgb), 0.4);
  color: var(--white);
}

.btn-avances.notificacion::after {
  content: '';
  position: absolute;
  top: -3px;
  right: -3px;
  width: 12px;
  height: 12px;
  background: var(--maroon);
  border-radius: var(--border-radius-circle);
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(var(--maroon-rgb), 0.4);
  animation: pulse-notification 2s infinite;
}

@keyframes pulse-notification {

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

  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.btn-stopwork {
  position: relative;
  padding: var(--padding-05);
  background: rgba(var(--flamingo-rgb), 0.12);
  border: 1px solid rgba(var(--peach-rgb), 0.35);
  color: var(--flamingo);
  border-radius: var(--border-radius-circle);
  backdrop-filter: var(--glass-backdrop);
  box-shadow: 0 2px 6px rgba(var(--flamingo-rgb), 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-stopwork.activo {
  background: rgba(var(--flamingo-rgb), 0.75);
  border: 2px solid var(--flamingo);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(var(--flamingo-rgb), 0.4);
  backdrop-filter: var(--glass-backdrop);
  font-weight: 700;
  animation: pulse-stopwork 2s infinite ease-in-out;
}

.btn-stopwork:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(var(--flamingo-rgb), 0.2);
  border: 1px solid rgba(var(--peach-rgb), 0.55);
  box-shadow: 0 4px 12px rgba(var(--flamingo-rgb), 0.2);
  color: var(--flamingo);
}

.btn-stopwork.activo:hover {
  transform: translateY(-3px) scale(1.05);
  background: rgba(var(--flamingo-rgb), 0.85);
  border: 2px solid var(--flamingo);
  box-shadow: 0 6px 16px rgba(var(--flamingo-rgb), 0.5);
  color: var(--white);
}

@keyframes pulse-stopwork {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(var(--flamingo-rgb), 0.4);
  }

  50% {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(var(--flamingo-rgb), 0.5);
  }
}

.contenedor-tabla {
  display: flex;
  flex-direction: column;
  gap: var(--gap-05);
  height: 100%;
  overflow: hidden;
}


.filters-container {
  display: flex;
  flex-direction: row;
  gap: var(--gap-1);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: var(--padding-05);
  align-items: center;
}

.filters-container input,
.filters-container select {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  height: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #374151;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filters-container input:focus,
.filters-container select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filters-container input::placeholder {
  color: rgba(107, 114, 128, 0.7);
}

.filters-container select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.filters-container select:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
}

.search-container {
  display: flex;
  align-items: center;
}

.search-container input {
  width: 100%;
}

.filter-container {
  max-width: 20rem;
  min-width: 10rem;
  width: 14rem;
  display: flex;
  align-items: center;
}

.filter-container select {
  width: 100%;
}


.pagination-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--padding-05);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  width: 100%;
  margin-top: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.pagination-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-right {
  display: flex;
  align-items: center;
}

.symbology-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #666;
  padding: 4px 8px;
  background-color: #fff;
  border-radius: 4px;
}

.symbology-color.error {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background-color: rgba(255, 235, 235, 0.5);
}

.pagination-button {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
  color: #374151;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagination-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagination-info {
  margin: 0 1rem;
  font-size: 0.9rem;
}

.detalles-panel {
  overflow-y: auto;
  position: relative;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.btn-export {
  margin-left: auto;
  padding: 8px 16px;
  font-size: 0.9rem;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(15, 118, 110, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-export:hover {
  background: rgba(15, 118, 110, 0.9);
  border-color: rgba(15, 118, 110, 0.5);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 118, 110, 0.2);
}

.btn-export:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(15, 118, 110, 0.2);
}

.detalles-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.detalles-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
}

.detalles-table th {
  padding: 1rem 0.5rem;
  color: #7c7f93;
  font-weight: 500;
  white-space: nowrap;
  background: white;
  border-bottom: 2px solid #f1f1f4;
  position: relative;
}

.detalles-table tbody {
  padding: 1.5rem;
}

.detalles-table td {
  padding: 0.75rem 0.5rem;
  white-space: nowrap;
  color: black;
  background: white;
}

.detalles-table td:nth-child(2),
.detalles-table th:nth-child(2) {
  text-align: center;
}


.detalles-table tr.error-row td {
  background: rgba(231, 171, 171, 0.5) !important;
}

.detalles-table tr.error-row .btn-acciones {
  color: #000 !important;
}

.detalles-table thead::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 5px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
  z-index: 9;
}

/* Mantenemos las filas alternadas */
.detalles-table tr:nth-child(even) td {
  background-color: #f6f6f9;
}


.table-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.98));
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  gap: var(--gap-1);
  backdrop-filter: blur(4px);
  animation: loadingFadeIn 0.3s ease-out;
}

.table-loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(210, 15, 57, 0.2);
  border-top: 2px solid var(--red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 8px rgba(210, 15, 57, 0.2);
}

.table-loading-text {
  color: var(--red);
  font-weight: 500;
  font-size: 0.875rem;
  opacity: 0.8;
}

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

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

@keyframes loadingFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }
}

.dropdown-container {
  position: relative;
  display: inline-block;
}

.btn-acciones {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  color: #666;
  transition: all 0.2s;
}

.btn-acciones:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.dropdown-menu {
  background: white;
  border-radius: 0.375rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  padding: 0.5rem 0;
  min-width: 160px;
  display: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: #333;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.dropdown-icon {
  opacity: 0.7;
}


.contenedor-indicador {
  width: 94dvw;
}

.filter-container {
  max-width: 20rem;
  min-width: 10rem;
  width: 14rem;
  display: flex;
  align-items: center;
}

.filter-container select {
  width: 100%;
}


.tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.tabs-left {
  display: flex;
  gap: 0.25rem;
}

.btn-nueva-incidencia {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--sapphire);
  border: none;
  border-radius: 6px;
  color: var(--base);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-nueva-incidencia:hover {
  background: var(--sky);
}

.btn-asignar-zona {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--teal);
  border: none;
  border-radius: 6px;
  color: var(--base);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-asignar-zona:hover {
  background: var(--green);
}

.botones-acciones-container {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.tab-button {
  padding: 0.5rem 1rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  gap: 0.375rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.3);
}



.tab-button.active::after {
  display: none;
}

.tab-button.gris {

  border-color: rgba(0, 0, 0, 0.05);
  color: #374151;
}

.tab-button.gris:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.tab-button.gris.active {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
  color: #111827;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



.tab-button.secundario {
  color: #0369a1;
  border-color: rgba(4, 165, 229, 0.15);
}

.tab-button.secundario:hover {
  border-color: rgba(4, 165, 229, 0.25);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.tab-button.secundario.active {
  background: rgba(4, 165, 229, 0.08);
  border-color: rgba(4, 165, 229, 0.3);
  color: #0369a1;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(4, 165, 229, 0.1);
}

.tab-button.alertas {

  border-color: rgba(255, 68, 68, 0.2);
  color: #b91c1c;
}

.tab-button.alertas:hover {
  background: rgba(255, 68, 68, 0.08);
  border-color: rgba(255, 68, 68, 0.3);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.tab-button.alertas.active {
  background: rgba(255, 68, 68, 0.08);
  border-color: rgba(255, 68, 68, 0.3);
  color: #b91c1c;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(255, 68, 68, 0.1);
}


.total-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  backdrop-filter: blur(6px);
  font-size: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid;
}

.tab-button.gris .total-badge {
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #374151;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.tab-button.secundario .total-badge {
  background: rgba(4, 165, 229, 0.05);
  border: 1px solid rgba(4, 165, 229, 0.02);
  color: #0369a1;
  box-shadow: 0 1px 2px rgba(4, 165, 229, 0.08);
}

.tab-button.alertas .total-badge {
  background: rgba(255, 68, 68, 0.15);
  border: 1px solid rgba(255, 68, 68, 0.3);
  color: #b91c1c;
  box-shadow: 0 1px 2px rgba(255, 68, 68, 0.1);
}

.tab-button.alertas.active .total-badge {
  background: rgba(255, 68, 68, 0.25);
  border: 1px solid rgba(255, 68, 68, 0.5);
  color: #dc2626;
  box-shadow: 0 1px 2px rgba(255, 68, 68, 0.2);
}

/* Pestaña Gestión de Planos */
.tab-button.planos {
  border-color: rgba(114, 135, 253, 0.2);
  color: #5c5f77;
}

.tab-button.planos:hover {
  background: rgba(114, 135, 253, 0.08);
  border-color: rgba(114, 135, 253, 0.3);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.tab-button.planos.active {
  background: rgba(114, 135, 253, 0.12);
  border-color: rgba(114, 135, 253, 0.4);
  color: #7287fd;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(114, 135, 253, 0.15);
}

/* Botón Gestionar Plano */
.btn-gestionar-plano {
  padding: 6px 12px;
  background: #7287fd;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gestionar-plano:hover {
  background: #5c6bc0;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(114, 135, 253, 0.3);
}

/* Contenedor acciones en Gestión de Planos */
.acciones-gestion-planos {
  display: flex;
  align-items: center;
  gap: 6px;
}

.incidencia-creada-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #e5f6f0;
  color: #0d9488;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid #99f6e4;

  width: 100%;
  justify-content: center;
}

.incidencia-creada-badge svg {
  color: #0d9488;
}

.btn-ver {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.btn-ver:hover {
  background-color: #e0e0e0;
}

.precarga-details {
  padding: 16px;
}

.detail-row {
  display: flex;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.detail-row strong {
  width: 200px;
  color: #666;
}

.detail-row span {
  flex: 1;
}



.popup-noc {
  position: fixed;
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  width: 58dvw;
  height: 90dvh;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.popup-precarga {
  position: fixed;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 40%;
  height: 90dvh;
  overflow-y: auto;
  z-index: 1001;
}


.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

.refresh-message {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.pulse-icon {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.6;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}


.btn-ayuda {
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  min-width: 36px;
}

.btn-ayuda:hover {
  color: #3498db;
  background: rgba(52, 152, 219, 0.1);
}

.titulo {
  align-items: center;
  display: flex;
  text-align: center;
  width: 100%;
  justify-content: center;
  gap: 1rem;
}

.etapa-tag.disabled {
  opacity: 0.5;
  cursor: not-allowed !important;
  pointer-events: none;
}


.symbology-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #fff;
  border-radius: 4px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.symbology-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #666;
}

.symbology-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.symbology-color.error {
  background: rgba(175, 89, 89, 0.5);
}


.symbology-color.warning {
  background-color: rgba(158, 71, 71, 0.5);
}

/* Estilo para las filas sin ID Tarea */
.detalles-table tr.warning-row td {
  background-color: rgba(175, 89, 89, 0.5) !important;
}

.row-sin-id-tarea td {
  background-color: rgba(231, 171, 171, 0.5) !important;
}

.btn-asociadas {
  background: transparent;
  border: 1px solid #bcc0cc;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
  display: inline-flex;
  align-items: center;
  position: relative;
  font-size: 13px;
  font-weight: 600;
  color: #4c4f69;
  letter-spacing: 0.01em;
}

.btn-asociadas:hover {
  background: color-mix(in srgb, var(--sapphire) 10%, transparent);
  border-color: var(--sapphire);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sapphire) 15%, transparent);
  transform: translateY(-1px);
  color: var(--sapphire);
}

.btn-asociadas:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-texto {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-asociadas {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  background: var(--sapphire);
  color: #fff;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 1px 4px color-mix(in srgb, var(--sapphire) 40%, transparent);
  pointer-events: none;
  z-index: 1;
  letter-spacing: 0;
}

.contenedor-identificador {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

/* fila superior: ícono P + número principal */
.principal-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.badge-superior-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--sapphire);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.identificador-principal {
  font-size: 13px;
  font-weight: 600;
  color: #4c4f69;
  white-space: nowrap;
}

/* fila inferior: curva tipo árbol + número secundario */
.identificador-secundario-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
}

/* curva en L redondeada usando border */
.identificador-tree-curve {
  display: block;
  width: 12px;
  height: 10px;
  border-left: 2px solid #acb0be;
  border-bottom: 2px solid #acb0be;
  border-bottom-left-radius: 6px;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 3px;
}

.identificador {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
  white-space: nowrap;
}

.indicadores-details {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.indicadores-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  user-select: none;
  position: relative;
}

.indicadores-summary:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.indicadores-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.indicadores-arrow {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.indicadores-details[open] .indicadores-arrow {
  transform: rotate(180deg);
}

.indicadores-content {
  padding: 1rem;
  background: #f9fafb;
  animation: slideDown 0.3s ease-out;
}

.indicadores-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: rgba(107, 114, 128, 0.8);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(210, 15, 57, 0.2);
  border-top: 2px solid var(--red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.indicadores-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: rgba(239, 68, 68, 0.9);
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.indicadores-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  color: rgba(156, 163, 175, 0.8);
  font-size: 0.9rem;
  font-style: italic;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.indicadores-placeholder::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(156, 163, 175, 0.3);
  border-top: 2px solid rgba(156, 163, 175, 0.7);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.load-indicators-btn,
.reload-indicators-btn {
  background: rgba(220, 38, 38, 0.9);
  backdrop-filter: blur(10px);
  color: white;
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.load-indicators-btn:hover,
.reload-indicators-btn:hover {
  background: rgba(185, 28, 28, 0.95);
  border-color: rgba(185, 28, 28, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3);
}


.indicadores-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Badge principal compacto */

.indicadores-summary {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  font-weight: 600;
  user-select: none;
}

.indicadores-summary .info-icon {
  position: absolute;
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.indicadores-badge-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #991b1b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  text-align: center;
  min-width: max-content;
}

.indicadores-badge-compact {
  background: white;
  border: 1px solid #fecaca;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #991b1b;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  min-width: fit-content;
}

.atencion-principal {
  font-weight: 600;
  color: #b91c1c;
}

.atencion-sub {
  font-size: 0.65rem;
  color: #991b1b;
  font-weight: 400;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.atencion-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
}

.atencion-fen {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.atencion-im {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.atencion-indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

.atencion-fen .atencion-indicator {
  background: #dc2626;
}

.atencion-im .atencion-indicator {
  background: #2563eb;
}

/* Estilos existentes (asegura centrado) */
.indicadores-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  font-weight: 600;
  user-select: none;
}



.info-icon {
  margin-left: 6px;
  cursor: help;
  opacity: 0.7;
  color: #6b7280;
  transition: opacity 0.2s ease;
}

.info-icon:hover {
  opacity: 1;
}

.atencion-principal {
  font-weight: 600;
  color: #b91c1c;
}

.atencion-sub {
  font-size: 0.65rem;
  color: #991b1b;
  font-weight: 400;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.atencion-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.6rem;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
}

.atencion-fen {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.atencion-im {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.atencion-indicator {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

.atencion-fen .atencion-indicator {
  background: #dc2626;
}

.atencion-im .atencion-indicator {
  background: #2563eb;
}

/* Estilos existentes (asegura centrado) */
.indicadores-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  color: white;
  font-weight: 600;
  user-select: none;
}



/* Estilo para el ícono del tooltip */
.tooltip-help-icon {
  opacity: 0.8;
  transition: all 0.2s ease;
  cursor: help;
}

.tooltip-help-icon:hover {
  opacity: 1;
  transform: scale(1.1);
  color: #4f46e5 !important;
}


.tiempo-header-container,
.aliado-header-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tooltip-clock-icon {
  color: #10b981;
}

.tooltip-help-icon {
  opacity: 0.8;
  transition: all 0.2s ease;
  cursor: help;
  color: #6366f1;
}

.tooltip-help-icon:hover {
  opacity: 1;
  transform: scale(1.1);
  color: #4f46e5;
}

.tooltip-content-aliado {
  display: flex;
  flex-direction: column;
}

.tooltip-header-aliado {
  margin-bottom: 8px;
  font-weight: 500;
}

.tooltip-body-aliado {
  line-height: 1.4;
}

.tooltip-content-coordinador {
  display: flex;
  flex-direction: column;
}

.tooltip-header-coordinador {
  margin-bottom: 8px;
  font-weight: 500;
}

.tooltip-body-coordinador {
  line-height: 1.4;
}


.fecha-icon-sky {
  color: var(--sky);
  flex-shrink: 0;
}

.tiempo-icon-green {
  color: #10b981;
  flex-shrink: 0;
}


.search-flex-full {
  flex: 1;
}

.precarga-actions-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-row-enter[data-animation-delay] {
  animation-delay: calc(var(--animation-delay, 0) * 1s);
}

/* Botón Crear Incidencia - Estilo minimalista coherente con badges */
.btn-crear-incidencia {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(59, 130, 246, 0.08);
  /* azul suave como las otras badges */
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  width: 100%;
  justify-content: center;
  backdrop-filter: blur(12px);
}

.btn-crear-incidencia:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.btn-crear-incidencia:active {
  transform: translateY(0);
  background: rgba(59, 130, 246, 0.12);
}

.btn-crear-incidencia svg {
  color: #3b82f6;
  flex-shrink: 0;
}

.detalles-panel.loading {
  position: relative;
  overflow: hidden;
}

.detalles-panel.loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--red) 25%,
      var(--maroon) 50%,
      var(--red) 75%,
      transparent 100%);
  animation: loadingBar 2s ease-in-out infinite;
  z-index: 10;
  opacity: 0.8;
}

@keyframes loadingBar {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.detalles-table.loading {
  opacity: 0.6;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.filters-container.loading {
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.filters-container.loading input,
.filters-container.loading select {
  cursor: not-allowed;
}

.filters-container.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.filters-container.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
      rgba(59, 130, 246, 0.1) 0%,
      rgba(59, 130, 246, 0.2) 50%,
      rgba(59, 130, 246, 0.1) 100%);
  animation: shimmerFilter 2s ease-in-out infinite;
  border-radius: 8px;
}

@keyframes shimmerFilter {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .detalles-panel.loading::before {
    animation: none;
    background: var(--sky);
  }

  .table-loading-spinner {
    animation: none;
  }

  .loading-spinner {
    animation: none;
  }
}

.bulk-actions-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  margin-left: 8px;
}

.selected-count {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1e40af;
}

.btn-ignorar-multiples {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #dc2626;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-ignorar-multiples:hover:not(:disabled) {
  background: #b91c1c;
  transform: translateY(-1px);
}

.btn-ignorar-multiples:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.checkbox-select-all {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--surface2, #ccc);
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  position: relative;
}

.checkbox-select-all:hover {
  border-color: var(--surface3, #999);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

.checkbox-select-all:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.checkbox-select-all:checked {
  background-color: var(--blue, #2563eb);
  border-color: var(--blue, #2563eb);
}

.checkbox-select-all:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  display: block;
}

.checkbox-row-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--surface2, #ccc);
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  vertical-align: middle;
  position: relative;
}

.checkbox-row-select:hover {
  border-color: var(--surface3, #999);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

.checkbox-row-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.checkbox-row-select:checked {
  background-color: var(--blue, #2563eb);
  border-color: var(--blue, #2563eb);
}

.checkbox-row-select:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  display: block;
}

.checkbox-row-select:disabled,
.checkbox-select-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.checkbox-row-select:disabled:hover,
.checkbox-select-all:disabled:hover {
  border-color: var(--surface2, #ccc);
  box-shadow: none;
}

.checkbox-placeholder {
  width: 16px;
  height: 16px;
}

/* Responsive para bulk actions */
@media (max-width: 768px) {
  .bulk-actions-container {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .selected-count {
    text-align: center;
  }

  .btn-ignorar-multiples {
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════
   SLA Badge y Popover
   ═══════════════════════════════════════════════════════ */

.tiempo-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Cumple SLA - verde */
.tiempo-badge-pill.sla-cumple {
  background: rgba(64, 160, 43, 0.1);
  border: 1px solid rgba(64, 160, 43, 0.2);
  color: var(--green, #40a02b);
}

/* Incumple SLA - colores por tramo */
.tiempo-badge-pill.sla-incumple {
  gap: 8px;
}

.sla-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sla-badge-btn:hover {
  filter: brightness(0.9);
}

.sla-badge-btn .sla-chevron {
  font-size: 0.55rem;
}

/* Tramo 1 - Amarillo */
.sla-tramo-1 {
  background: rgba(223, 142, 29, 0.1);
  border: 1px solid rgba(223, 142, 29, 0.2);
  color: var(--yellow, #df8e1d);
}

.sla-tramo-1 .sla-badge-btn {
  background: var(--yellow, #df8e1d);
  color: white;
}

/* Tramo 2 - Naranja */
.sla-tramo-2 {
  background: rgba(254, 100, 11, 0.1);
  border: 1px solid rgba(254, 100, 11, 0.2);
  color: var(--peach, #fe640b);
}

.sla-tramo-2 .sla-badge-btn {
  background: var(--peach, #fe640b);
  color: white;
}

/* Tramo 3 - Rojo/Maroon */
.sla-tramo-3 {
  background: rgba(230, 69, 83, 0.1);
  border: 1px solid rgba(230, 69, 83, 0.2);
  color: var(--maroon, #e64553);
}

.sla-tramo-3 .sla-badge-btn {
  background: var(--maroon, #e64553);
  color: white;
}

/* Tramo 4 - Morado */
.sla-tramo-4 {
  background: rgba(136, 57, 239, 0.1);
  border: 1px solid rgba(136, 57, 239, 0.2);
  color: var(--mauve, #8839ef);
}

.sla-tramo-4 .sla-badge-btn {
  background: var(--mauve, #8839ef);
  color: white;
}

/* Popover SLA */
.sla-popover-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
}

.sla-popover {
  position: fixed;
  z-index: 9999;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  min-width: 220px;
  animation: slaPopoverIn 0.15s ease-out;
}

@keyframes slaPopoverIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sla-popover-loading,
.sla-popover-error {
  padding: 1rem;
  text-align: center;
  color: var(--subtext0, #6c6f85);
  font-size: 0.875rem;
}

.sla-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.sla-popover-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text, #4c4f69);
}

.sla-popover-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--subtext0, #6c6f85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sla-popover-close:hover {
  background: #f3f4f6;
  color: var(--text, #4c4f69);
}

.sla-popover-body {
  padding: 0.75rem 1rem;
}

.sla-popover-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
}

.sla-popover-label {
  font-size: 0.8rem;
  color: var(--subtext0, #6c6f85);
}

.sla-popover-value {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text, #4c4f69);
}

.sla-popover-multa {
  color: var(--red, #d20f39);
  font-weight: 600;
}