/* =========================================
   --- RESPONSIVE SCROLL ---
   ========================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* =========================================
   --- LA TABLA PRINCIPAL ---
   ========================================= */
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}

/* Cabecera Verde */
.data-table thead th {
    background-color: var(--color-green-primary);
    color: var(--color-white);
    font-weight: 600;
    font-size: var(--font-pequeno);
    padding: 10px 10px;
    text-transform: capitalize;
    border: none;
    /* Asegura que no haya bordes en cabecera */
}

/* Filas del Cuerpo - SOLO LÍNEAS HORIZONTALES */
.data-table tbody td {
    padding: 10px 10px;
    border-bottom: 1px solid #E5E7EB;
    /* Línea horizontal sutil */
    border-left: none !important;
    /* Forzamos cero líneas verticales */
    border-right: none !important;
    /* Forzamos cero líneas verticales */
    font-size: var(--font-pequeno);
    vertical-align: middle;
}

/* Quitamos la línea horizontal a la última fila para que cierre limpio */
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* EFECTO HOVER: Resalta la fila entera al pasar el mouse */
.data-table tbody tr:hover {
    background-color: #F9FAFB;
}

/* =========================================
   --- ESTILOS DE ESTADOS UNIFICADOS (BADGES) ---
   ========================================= */
.td-estado {
    min-width: 220px;
}

.estado-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.badge-estado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.badge-estado svg {
    color: currentColor;
    /* El icono toma el color del texto automáticamente */
}

.estado-fecha {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* =========================================
   --- UTILIDADES DE TEXTO Y DIRECCIÓN ---
   ========================================= */
.font-bold {
    font-weight: 600;
}

.text-dark {
    color: #111827;
}

.text-gray {
    color: #6B7280;
}

.text-right {
    text-align: right;
}

.col-direccion {
    max-width: 250px;
    white-space: normal !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* =========================================
   --- BOTONES DE ACCIÓN (ICONOS) ---
   ========================================= */
.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-icon {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    color: var(--color-green-primary);
    background-color: rgba(0, 168, 150, 0.1);
}

/* =========================================
   --- LA PAGINACIÓN ---
   ========================================= */
.pagination-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #E5E7EB;
    margin-top: 2px;
}

.pagination-totales {
    font-size: 12px;
    color: #6B7280;
    margin-right: auto;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-btn {
    background-color: var(--color-white);
    border: 1px solid #D1D5DB;
    color: #6B7280;
    padding: 5px 10px;
    /* Ajusté el padding para que no se vean tan cuadrados */
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-nav {
    color: var(--color-green-primary);
    border-color: rgba(0, 168, 150, 0.3);
}

.page-btn:not(:disabled):hover {
    border-color: var(--color-green-primary);
    color: var(--color-green-primary);
}

.page-btn.active {
    background-color: var(--color-green-primary);
    color: var(--color-white);
    border-color: var(--color-green-primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #F3F4F6;
}

.page-dots {
    color: #9CA3AF;
    padding: 0 5px;
}

/* =========================================
   ESTILOS PARA FECHA Y HORA EN DOS LÍNEAS
   ========================================= */
.estado-fecha {
    display: flex;
    flex-direction: column;
    /* Apila los elementos uno sobre otro */
    justify-content: center;
}

.estado-fecha .fecha-txt {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    color: #4B5563;
    /* Gris oscuro para la fecha */
}

.estado-fecha .hora-txt {
    font-size: 11px;
    color: #9CA3AF;
    /* Un gris más claro para que la hora sea sutil */
    align-self: flex-end;
    /* 🌟 Empuja solo la hora hacia la derecha */
    margin-top: 2px;
}