/* ========== RESET E BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

/* ========== PÁGINA INICIAL (index) ========== */
.pagina-inicial {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5e2689 0%, #3b1554 100%);
}

.container-central {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    text-align: center;
}

.cartao-bemvindo {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.8s ease;
}

.icone-formatura {
    font-size: 4rem;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.subtitulo {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ========== BOTÕES ========== */
.botao-primario {
    display: inline-block;
    background: #5e2689;
    color: white;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(94, 38, 137, 0.4);
}

.botao-primario:hover {
    background: #4a1e6d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(94, 38, 137, 0.5);
}

/* ========== RODAPÉ ========== */
.rodape {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ========== ANIMAÇÕES ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== PAINEL ADMIN - LAYOUT ========== */
.painel-admin {
    background: #f5f7fa;
    display: block;
}

.layout-admin {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1e293b;
    color: white;
    display: flex;
    flex-direction: column;
    padding-top: 1.5rem;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-logo {
    text-align: center;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.sidebar-logo .icone-formatura {
    font-size: 2.5rem;
    color: #a78bfa;
}

.sidebar-logo h2 {
    font-size: 1.3rem;
    margin-top: 0.3rem;
    font-weight: 500;
    color: white;
}

.sidebar-nav {
    flex: 1;
    padding: 0 1rem;
}

.nav-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 0.3rem;
    transition: background 0.3s, color 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover,
.nav-item.ativo {
    background: rgba(94, 38, 137, 0.2);
    color: #a78bfa;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.botao-sair {
    display: block;
    text-align: center;
    color: #f87171;
    text-decoration: none;
    padding: 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
    font-weight: 500;
}

.botao-sair:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Conteúdo principal */
.conteudo-principal {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h1 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.usuario-logado {
    color: #666;
    font-size: 0.9rem;
}

.area-conteudo {
    padding: 2rem;
}

/* Cartões */
.cartao {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s, transform 0.3s;
}

.cartao:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.cartao h2 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    color: #2d3748;
    font-weight: 600;
}

/* Formulários */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.largura-total {
    grid-column: span 2;
}

.campo-form label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #4a5568;
    font-size: 0.95rem;
}

.campo-form input[type="text"],
.campo-form input[type="number"],
.campo-form input[type="email"],
.campo-form input[type="date"],
.campo-form input[type="month"],
.campo-form input[type="password"],
.campo-form select,
.campo-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.campo-form input:focus,
.campo-form select:focus,
.campo-form textarea:focus {
    border-color: #5e2689;
    outline: none;
    box-shadow: 0 0 0 3px rgba(94, 38, 137, 0.15);
}

.checkbox-campo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.checkbox-campo label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    color: #4a5568;
}

/* Botões */
.botao-salvar,
.botao-filtrar,
.botao-novo,
.botao-cancelar {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: background 0.3s, transform 0.2s;
    text-decoration: none;
    line-height: 1.4;
}

.botao-salvar {
    background: #5e2689;
    color: white;
}

.botao-salvar:hover {
    background: #4a1e6d;
}

.botao-filtrar {
    background: #5e2689;
    color: white;
}

.botao-filtrar:hover {
    background: #4a1e6d;
}

.botao-novo {
    background: #f59e0b;
    color: white;
}

.botao-novo:hover {
    background: #d97706;
}

.botao-cancelar {
    background: #e2e8f0;
    color: #333;
}

.botao-cancelar:hover {
    background: #cbd5e1;
}

/* Tabelas */
.tabela-responsiva {
    overflow-x: auto;
}

.tabela-estilo {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.tabela-estilo th {
    background: #f8fafc;
    text-align: left;
    padding: 0.9rem;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.9rem;
}

.tabela-estilo td {
    padding: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    color: #2d3748;
    font-size: 0.9rem;
}

.tabela-estilo tr:hover {
    background: #f8fafc;
}

.botao-acao {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    margin-right: 0.3rem;
    transition: background 0.3s, color 0.3s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
}

.botao-acao.editar {
    background: #ede9fe;
    color: #5e2689;
}

.botao-acao.editar:hover {
    background: #ddd6fe;
}

.botao-acao.excluir {
    background: #fee2e2;
    color: #b91c1c;
}

.botao-acao.excluir:hover {
    background: #fecaca;
}

.botao-acao.visualizar {
    background: #dbeafe;
    color: #1e40af;
}

.botao-acao.visualizar:hover {
    background: #bfdbfe;
}

/* Mensagens */
.mensagem-sucesso {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    padding: 0.8rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.mensagem-erro {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 0.8rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.mensagem-aviso {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 0.8rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Filtros */
.filtros-alunos {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
}

.filtros-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filtro-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

/* Status */
.status-ativo {
    color: #166534;
    font-weight: 500;
    background: #dcfce7;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.8rem;
}

.status-cancelado {
    color: #b91c1c;
    font-weight: 500;
    background: #fee2e2;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.8rem;
}

/* Responsivo */
@media (max-width: 768px) {
    .layout-admin {
        flex-direction: column;
    }
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }
    .conteudo-principal {
        margin-left: 0;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .largura-total {
        grid-column: 1;
    }
}