/* === GLOBAL === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    padding: 40px;
    margin: 0;
    color: #333;
}

h1 {
    text-align: center;
    color: #2c3e50;
}

.ocultar {
    display: none;
}

/* === FORMULÁRIO === */
form {
    background-color: #ffffff;
    max-width: 500px;
    margin: 0 auto 20px;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 15px;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f8f9fa;
    box-sizing: border-box;
    font-size: 14px;
}

input[type="submit"],
.btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

input[type="submit"] {
    background-color: #27ae60;
    color: white;
}

input[type="submit"]:hover {
    background-color: #219150;
}

.form-group {
    margin-bottom: 16px;
}

/* Botão Upload com Spinner */
.btn-upload {
    background-color: #28a745;
    color: white;
    width: 100%;
    font-size: 16px;
    padding: 10px 16px;
    position: relative;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid white;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === MENSAGEM === */
.mensagem {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    padding: 10px;
    border-radius: 5px;
    color: #0f5132;
    margin: 20px auto;
    max-width: 500px;
    text-align: center;
}

/* === CARDS DE CONSULTA === */
.cards-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 16px;
    max-width: 960px;
    margin: 20px auto 0 auto;
}

.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    padding: 16px;
    width: 260px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
    font-size: 14px;
}

.card:hover {
    transform: translateY(-4px);
}

.card h3 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 8px;
}

.card p {
    font-size: 13px;
    color: #555;
    margin-bottom: 14px;
}

.card .btn-card {
    background-color: #007bff;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.card .btn-card:hover {
    background-color: #0056b3;
}

/* Animação suave */
.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

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

/* === TABELA === */
.tabela-estudante {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tabela-estudante th, 
.tabela-estudante td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.tabela-estudante th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.linha-principal {
    transition: background-color 0.3s ease;
}

.linha-principal.nao-elegivel {
    background-color: #f8d7da;
}

.linha-principal:hover {
    background-color: #f5f5f5;
}

.linha-detalhamento {
    display: none;
    background-color: #f9f9f9;
}

.linha-detalhamento.expandida {
    display: table-row;
}

.linha-detalhamento td {
    padding: 0;
}

.detalhamento-content {
    padding: 10px;
    /*border-left: 4px solid #4CAF50;*/
    background-color: white;
    margin: 5px 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detalhamento-item.status-pago {
    border-left: 4px solid #28a745; /* verde */
    padding: 15px;
}

.detalhamento-item.status-enviada-para-pagamento {
    border-left: 4px solid #ffc107; /* amarelo */
    padding: 15px;
}

.detalhamento-item.status-bloqueado {
    border-left: 4px solid #dc3545; /* vermelho */
    padding: 15px;
}

.detalhamento-btn {
    background: none;
    border: none;
    color: #2196F3;
    cursor: pointer;
    padding: 5px 5px;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
}

.detalhamento-btn::after {
    content: " ▼";
    font-size: 12px;
}

.detalhamento-btn.expandido::after {
    content: " ▲";
}

.detalhamento-item {
    margin-bottom: 10px;
}

.detalhamento-item hr {
    margin: 10px 0;
    border: 0;
    height: 1px;
    background-color: #eee;
}

.sem-detalhamento {
    color: #999;
    font-style: italic;
}

.descricao {
    font-size: 14px;
    color: #555;
    margin: 4px 0 12px 0;
}

/* Título menor após upload */
.titulo-menor {
    margin-top: 10px;
    font-size: 20px;
    transition: all 0.3s ease;
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
    }

    .card {
        width: 90%;
    }

    .tabela-estudante th, 
    .tabela-estudante td {
        padding: 8px 10px;
        font-size: 14px;
    }

    .detalhamento-content {
        padding: 10px;
    }
}

.form-desaparece {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

/* Estilos para detalhamento de pagamentos */
.pagamento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pagamento-detalhes {
    display: flex;
    gap: 20px;
}

.pagamento-detalhes > div {
    flex: 1;
}

.status-pendente {
    color: #f39c12;
    font-weight: bold;
}

.status-cancelado {
    color: #e74c3c;
    font-weight: bold;   
}

/* === RODAPÉ === */
.site-footer {
    text-align: center;
    margin-top: 13  0px;
    padding: 25px 0;
    border-top: 1px solid #e0e0e0;
    font-size: 14px;
    color: #6c757d;
}

.site-footer p {
    margin: 6px 0;
}

.site-footer a {
    color: #007bff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* Filtro de moeda (se estiver usando Jinja2) */
table {
    border-collapse: collapse;
    width: 100%;
}