/* ===================================
   ANASPS CERTIFICADOS - ESTILO PÚBLICO
   Versão melhorada mantendo estrutura original
   =================================== */

.anasps-certificados-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===================================
   CABEÇALHO
   =================================== */

.anasps-certificados-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
    background: linear-gradient(135deg, #1565C0 0%, #0C326F 100%);
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(12, 50, 111, 0.25);
}

.anasps-certificados-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

/* ===================================
   BUSCA
   =================================== */

.anasps-certificados-search {
    display: flex;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.anasps-certificados-search input[type="search"] {
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 6px;
    width: 300px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

.anasps-certificados-search input[type="search"]:focus {
    outline: none;
    border-color: #0C326F;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(12, 50, 111, 0.1);
}

.anasps-certificados-search button {
    padding: 12px 32px;
    background: #0C326F;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(12, 50, 111, 0.4);
}

.anasps-certificados-search button:hover {
    transform: translateY(-2px);
    background: #0a2855;
    box-shadow: 0 6px 20px rgba(12, 50, 111, 0.6);
}

/* ===================================
   TABELA
   =================================== */

.anasps-certificados-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.anasps-certificados-table {
    width: 100%;
    border-collapse: collapse;
}

.anasps-certificados-table thead {
    background: linear-gradient(135deg, #1565C0 0%, #0C326F 100%);
}

.anasps-certificados-table th {
    padding: 18px 24px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
}

.anasps-certificados-table td {
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    font-size: 15px;
}

.anasps-certificados-table tbody tr {
    transition: all 0.2s ease;
}

.anasps-certificados-table tbody tr:hover {
    background-color: #f8f9fa;
}

.anasps-certificados-table tbody tr:last-child td {
    border-bottom: none;
}

.anasps-certificados-table tbody tr.expirado {
    background-color: #fff5f5;
}

.anasps-certificados-table tbody tr.expirado:hover {
    background-color: #fee;
}

/* ===================================
   STATUS E BADGES
   =================================== */

.validade-valido {
    color: #10b981;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.validade-valido::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
}

.validade-expirado {
    color: #ef4444;
    font-weight: 600;
}

.badge-expirado {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    background: #ef4444;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-aviso {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    background: #f59e0b;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.proximo-vencimento {
    background: #fffbeb;
}

.proximo-vencimento:hover {
    background: #fef3c7;
}

/* ===================================
   SEM RESULTADOS
   =================================== */

.anasps-no-results {
    text-align: center;
    padding: 60px 40px;
    color: #9ca3af;
    font-size: 16px;
}

.anasps-no-results::before {
    content: "🔍";
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
}

/* ===================================
   PAGINAÇÃO
   =================================== */

.anasps-certificados-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.anasps-certificados-pagination .page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.anasps-certificados-pagination .page-number:hover {
    background: #0C326F;
    color: white;
    border-color: #0C326F;
    transform: translateY(-1px);
}

.anasps-certificados-pagination .page-number.active {
    background: #0C326F;
    color: white;
    border-color: #0C326F;
}

/* ===================================
   ANIMAÇÕES SUAVES
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anasps-certificados-table tbody tr {
    animation: fadeIn 0.4s ease;
}

/* ===================================
   RESPONSIVO
   =================================== */

@media (max-width: 768px) {
    .anasps-certificados-wrapper {
        padding: 16px;
    }

    .anasps-certificados-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }

    .anasps-certificados-header h2 {
        font-size: 24px;
    }

    .anasps-certificados-search {
        width: 100%;
        flex-direction: column;
        border-radius: 8px;
        gap: 8px;
    }

    .anasps-certificados-search input[type="search"] {
        width: 100%;
        border-radius: 6px;
    }

    .anasps-certificados-search button {
        width: 100%;
        border-radius: 6px;
    }

    .anasps-certificados-table-wrapper {
        box-shadow: none;
        background: transparent;
    }

    .anasps-certificados-table {
        display: block;
    }

    .anasps-certificados-table thead {
        display: none;
    }

    .anasps-certificados-table tbody,
    .anasps-certificados-table tr,
    .anasps-certificados-table td {
        display: block;
        width: 100%;
    }

    .anasps-certificados-table tr {
        margin-bottom: 20px;
        background: #ffffff;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .anasps-certificados-table tr.expirado {
        border-left: 4px solid #ef4444;
    }

    .anasps-certificados-table tr.proximo-vencimento {
        border-left: 4px solid #f59e0b;
    }

    .anasps-certificados-table tr.valido {
        border-left: 4px solid #10b981;
    }

    .anasps-certificados-table td {
        text-align: right;
        padding: 16px 20px;
        position: relative;
        border-bottom: 1px solid #f0f0f0;
    }

    .anasps-certificados-table td:last-child {
        border-bottom: none;
    }

    .anasps-certificados-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 20px;
        font-weight: 700;
        color: #0C326F;
        text-transform: uppercase;
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    .anasps-certificados-pagination .page-number {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}