/* ─────────────────────────────────────────────────────────────
   Tablas modernas estilizadas (Stripe / Linear / Tailwind UI)
   Aplica a: .pres-table .mod-table .sub-table .gap-table
             .source-table .action-table .task-table
   ───────────────────────────────────────────────────────────── */

.pres-table,
.mod-table,
.sub-table,
.gap-table,
.source-table,
.action-table,
.task-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow:
    0 4px 14px rgba(0,108,125,.10),
    0 1px 3px rgba(0,0,0,.05),
    0 0 0 1px #e2e5ea !important;
}

/* Header con gradient teal corporativo INFOUNSA + acento azul */
.pres-table thead,
.mod-table thead,
.sub-table thead,
.gap-table thead,
.source-table thead,
.action-table thead,
.task-table thead {
  background: linear-gradient(135deg, #006C7D 0%, #00525E 100%) !important;
}

.pres-table th,
.mod-table th,
.sub-table th,
.gap-table th,
.source-table th,
.action-table th,
.task-table th {
  background: transparent !important;
  color: #fff !important;
  padding: 13px 15px !important;
  text-align: left !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .09em !important;
  position: relative !important;
  border-bottom: 2px solid #14387F !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.18) !important;
}

/* Separadores verticales sutiles entre celdas del header */
.pres-table th + th::before,
.mod-table th + th::before,
.sub-table th + th::before,
.gap-table th + th::before,
.source-table th + th::before,
.action-table th + th::before,
.task-table th + th::before {
  content: '';
  position: absolute;
  left: 0; top: 28%; bottom: 28%;
  width: 1px;
  background: rgba(255,255,255,.18);
}

/* Celdas con padding generoso y transición */
.pres-table td,
.mod-table td,
.sub-table td,
.gap-table td,
.source-table td,
.action-table td,
.task-table td {
  padding: 11px 15px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #eef1f4 !important;
  color: #2e3742 !important;
  line-height: 1.55 !important;
  font-size: 13px !important;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

/* Primera columna con énfasis */
.pres-table td:first-child,
.mod-table td:first-child,
.sub-table td:first-child,
.gap-table td:first-child,
.source-table td:first-child,
.action-table td:first-child,
.task-table td:first-child {
  font-weight: 600 !important;
  color: #172033 !important;
  position: relative;
}

.pres-table td:first-child strong,
.mod-table td:first-child strong,
.sub-table td:first-child strong,
.gap-table td:first-child strong,
.source-table td:first-child strong,
.action-table td:first-child strong,
.task-table td:first-child strong {
  color: #14387F !important;
}

/* Zebra striping muy sutil */
.pres-table tbody tr:nth-child(even) td,
.mod-table tbody tr:nth-child(even) td,
.sub-table tbody tr:nth-child(even) td,
.gap-table tbody tr:nth-child(even) td,
.source-table tbody tr:nth-child(even) td,
.action-table tbody tr:nth-child(even) td,
.task-table tbody tr:nth-child(even) td {
  background: #FAFBFC;
}

/* Hover con fondo teal-paper + indicador lateral en primera columna */
.pres-table tbody tr:hover td,
.mod-table tbody tr:hover td,
.sub-table tbody tr:hover td,
.gap-table tbody tr:hover td,
.source-table tbody tr:hover td,
.action-table tbody tr:hover td,
.task-table tbody tr:hover td {
  background: #E0EDEF !important;
  color: #172033 !important;
}

.pres-table tbody tr:hover td:first-child,
.mod-table tbody tr:hover td:first-child,
.sub-table tbody tr:hover td:first-child,
.gap-table tbody tr:hover td:first-child,
.source-table tbody tr:hover td:first-child,
.action-table tbody tr:hover td:first-child,
.task-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 #006C7D !important;
}

/* Última fila redondeada (sin línea inferior) */
.pres-table tbody tr:last-child td,
.mod-table tbody tr:last-child td,
.sub-table tbody tr:last-child td,
.gap-table tbody tr:last-child td,
.source-table tbody tr:last-child td,
.action-table tbody tr:last-child td,
.task-table tbody tr:last-child td {
  border-bottom: none !important;
}
.pres-table tbody tr:last-child td:first-child,
.mod-table tbody tr:last-child td:first-child,
.sub-table tbody tr:last-child td:first-child,
.gap-table tbody tr:last-child td:first-child,
.source-table tbody tr:last-child td:first-child,
.action-table tbody tr:last-child td:first-child,
.task-table tbody tr:last-child td:first-child { border-bottom-left-radius: 10px; }

.pres-table tbody tr:last-child td:last-child,
.mod-table tbody tr:last-child td:last-child,
.sub-table tbody tr:last-child td:last-child,
.gap-table tbody tr:last-child td:last-child,
.source-table tbody tr:last-child td:last-child,
.action-table tbody tr:last-child td:last-child,
.task-table tbody tr:last-child td:last-child { border-bottom-right-radius: 10px; }

/* Filas con background inline (destacadas) reciben acento azul lateral */
.pres-table tbody tr[style*="background"] td,
.mod-table tbody tr[style*="background"] td,
.sub-table tbody tr[style*="background"] td,
.gap-table tbody tr[style*="background"] td,
.source-table tbody tr[style*="background"] td,
.action-table tbody tr[style*="background"] td,
.task-table tbody tr[style*="background"] td { background: inherit !important; }

.pres-table tbody tr[style*="background"] td:first-child,
.mod-table tbody tr[style*="background"] td:first-child,
.sub-table tbody tr[style*="background"] td:first-child,
.gap-table tbody tr[style*="background"] td:first-child,
.source-table tbody tr[style*="background"] td:first-child,
.action-table tbody tr[style*="background"] td:first-child,
.task-table tbody tr[style*="background"] td:first-child {
  box-shadow: inset 4px 0 0 #14387F !important;
}

.pres-table tbody tr[style*="background"]:hover td,
.mod-table tbody tr[style*="background"]:hover td,
.sub-table tbody tr[style*="background"]:hover td,
.gap-table tbody tr[style*="background"]:hover td,
.source-table tbody tr[style*="background"]:hover td,
.action-table tbody tr[style*="background"]:hover td,
.task-table tbody tr[style*="background"]:hover td { filter: brightness(.97); }
