/* TABLE.CSS  —  SIG */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    .table-responsive {
        border: none !important;
    }
}

.table-sig {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;           /* recorta thead en Safari */
    border: 1px solid var(--border-gray);
}

.table-sig-light {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--white);
    border-radius: none;
    overflow: hidden;           /* recorta thead en Safari */
    border: 1px solid var(--border-gray) !important;
}

.table-sig-light thead {
    background: var(--white) !important;
    color: var(--primary) !important;
    border: 1px solid var(--border-gray) !important;
}

.table-sig-light thead {
    background: var(--white);
    color: var(--primary);
    box-shadow: inset 0 -1px 0 var(--border-gray);
}

.certificate-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.certificate-action {
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-sig thead {
    background: var(--primary);
    color: var(--white);
}

.table-sig thead th {
    padding: 14px;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    border-bottom: none;
}

.table-sig thead th:first-child {
    border-top-left-radius: var(--radius-md);
}

.table-sig thead th:last-child {
    border-top-right-radius: var(--radius-md);
}

.table-sig tbody td {
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-gray);
    vertical-align: middle;
}

.table-sig tbody tr:last-child td {
    border-bottom: none;
}

.table-sig tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-md);
}

.table-sig tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-md);
}

.table-sig tbody tr:hover {
    background: rgba(2, 82, 166, 0.04);
}

.table-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.table-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    flex-shrink: 0;
}

.table-action-btn.disabled-btn {
    pointer-events: none; 
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: none;
}

.table-action-btn.disabled-btn:hover {
    pointer-events: none; 
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: none;
}

.table-action-btn.view {
    background: #22c55e;
    color: #ffffff;
}

.table-action-btn.view:hover {
    background: #16a34a;
    color: #ffffff;
    text-decoration: none;
}

.table-action-btn.edit {
    background: var(--primary);
    color: #ffffff;
}

.table-action-btn.edit:hover {
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
}

.table-action-btn.delete {
    background: #ef4444;
    color: #ffffff;
}

.table-action-btn.delete:hover {
    background: #dc2626;
    color: #ffffff;
    text-decoration: none;
}

.table-action-btn.key {
    background: var(--orange);
    color: #ffffff;
}

.table-action-btn.key:hover {
    background: var(--orange);
    color: #ffffff;
    text-decoration: none;
}

.pagination-sig {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination-sig button,
.pagination-sig a {
    border: 1px solid var(--border-gray);
    background: var(--white);
    color: var(--primary);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
}

.pagination-sig button.active,
.pagination-sig a.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pagination-sig button:hover:not(.active),
.pagination-sig a:hover:not(.active) {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.table-empty {
    padding: 48px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

@media (max-width: 768px) {
    .table-responsive {
        border: none !important;
    }

    .table-sig {
        min-width: 800px;
    }

    .table-sig thead th,
    .table-sig tbody td {
        padding: 10px 10px;
    }

    .table-action-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .certificate-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {

    .table-responsive {
        border: none !important;
    }

    .table-sig thead th {
        font-size: 11px;
        padding: 9px 8px;
    }

    .table-sig tbody td {
        font-size: 12px;
        padding: 9px 8px;
    }

    .pagination-sig button,
    .pagination-sig a {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 0 8px;
    }
}