.certificates-list-container {
    margin: 20px 0;
    font-family: inherit;
    padding: 0 15px; /* Añade espacio lateral para que el contenido no toque los bordes */
}

.certificates-search-container {
    margin-bottom: 30px;
}

#certificates-filter-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e1e5e9 !important;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.filter-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.certificates-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #2f4486 !important;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: white !important;
}

.certificates-search-input:focus {
    outline: none;
    border-color: #2f4486;
    box-shadow: 0 0 0 2px rgba(47, 68, 134, 0.2);
}

.filter-actions .button-primary,
.filter-actions .button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.certificates-search-input::placeholder {
    color: #999;
}

.certificates-grid {
    display: grid;
    gap: 20px;
}

/* Botones del formulario de filtro */
.filter-actions .button-primary,
.filter-actions .button-secondary {
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 15px;
}

.filter-actions .button-primary {
    background: #2f4486;
    color: white;
}

.filter-actions .button-primary:hover {
    background: #1e2c5a;
}

.filter-actions .button-secondary {
    background: #e1e5e9;
    color: #333;
}

/* Vista de tabla para escritorio */
@media (min-width: 768px) {
    .certificates-table {
        width: 100%;
        border-collapse: collapse;
        background: white;
        box-shadow: 0 4px 6px rgba(0,0,0,0.07);
        border-radius: 12px;
        overflow: hidden;
    }
    
    .certificates-table th {
        background: #2f4486;
        color: white;
        padding: 18px 15px;
        text-align: left;
        font-weight: 600;
        font-size: 15px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .certificates-table td {
        padding: 18px 15px;
        border-bottom: 1px solid #f0f0f1;
        vertical-align: middle;
        font-size: 15px;
    }
    
    .certificates-table tr:nth-child(even) {
        background: #f8f9fa;
    }
    
    .certificates-table tr:hover {
        background: #e8f4fd;
        transform: translateY(-1px);
        transition: all 0.3s ease;
    }

  
}

/* Vista de tarjetas para móvil */
@media (max-width: 767px) {
    .certificates-grid {
        grid-template-columns: 1fr;
    }
    
    .certificate-card {
        background: white;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border: 1px solid #e1e5e9;
        transition: all 0.3s ease;
    }
    
    .certificate-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.15);
    }
    
    .certificate-field {
        margin-bottom: 12px;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }
    
    .certificate-label {
        font-weight: 600;
        color: #444;
        margin-right: 10px;
        min-width: 80px;
    }
    
    .certificate-value {
        color: #666;
        text-align: right;
        flex: 1;
    }

    .certificate-field .status-badge {
        font-size: 12px;
        padding: 4px 10px;
    }
    .certificate-action {
        margin-top: 15px;
    }
}

.certificates-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 18px;
}

.certificates-no-results::before {
    content: "🔍";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.certificates-initial-prompt {
    text-align: center;
    padding: 60px 20px;
    color: #555;
    font-size: 18px;
    background-color: #fdfdfd;
    border: 2px dashed #e1e5e9;
    border-radius: 12px;
}

.certificates-initial-prompt::before {
    content: "👆";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.certificates-initial-prompt.error-prompt {
    border-color: #dc3545;
    color: #721c24;
    background-color: #f8d7da;
}

.certificates-initial-prompt.error-prompt::before {
    content: "⚠️";
    font-size: 40px;
    opacity: 1;
}

.certificates-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.certificates-loading::before {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2f4486;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* Estilos para fechas */
.certificate-date {
    color: #888;
    font-size: 13px;
    font-style: italic;
}

/* Animación de entrada */
.certificate-card,
.certificates-table tr {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    line-height: 1.2;
}

.status-badge.status-vigente {
    background-color: #28a745;
}

.status-badge.status-suspendido {
    background-color: #ffc107;
    color: #212529;
}

.status-badge.status-cancelado {
    background-color: #dc3545;
}

/* Responsive enhancements */
@media (max-width: 480px) {
    .certificates-search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .certificate-card {
        margin: 0 10px;
        padding: 15px;
    }
    
    .certificate-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .certificate-value {
        text-align: left;
    }

    .filter-fields {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }
}

/* Estilos de Paginación */
.certificates-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 5px;
}

.pagination-link {
    display: block;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #ddd;
    color: #2f4486;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pagination-link:hover {
    background: #e8f4fd;
    border-color: #2f4486;
}

.pagination-link.current {
    background: #2f4486;
    color: white;
    border-color: #2f4486;
    cursor: default;
}