/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 300;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Main content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 400;
}

h3 {
    color: #555;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

/* Mensagens */
.mensagem {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.mensagem.sucesso {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensagem.erro {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Formulários */
form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="datetime-local"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.checkbox-label:hover {
    background-color: #f8f9fa;
}

input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Botões */
button,
.btn-editar,
.btn-excluir,
.btn-visualizar,
.btn-download,
.btn-cancelar,
.btn-enviar,
.btn-confirmar {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

button[type="submit"],
.btn-confirmar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

button[type="submit"]:hover,
.btn-confirmar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-editar {
    background-color: #28a745;
    color: white;
}

.btn-editar:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-excluir {
    background-color: #dc3545;
    color: white;
}

.btn-excluir:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-visualizar {
    background-color: #17a2b8;
    color: white;
}

.btn-visualizar:hover {
    background-color: #138496;
    transform: translateY(-2px);
}

.btn-download {
    background-color: #6f42c1;
    color: white;
}

.btn-download:hover {
    background-color: #5a359a;
    transform: translateY(-2px);
}

.btn-cancelar {
    background-color: #6c757d;
    color: white;
}

.btn-cancelar:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-enviar {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    width: 100%;
}

.btn-enviar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

/* Tabelas */
table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

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

/* Link do aluno */
.link-aluno {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

.link-aluno:hover {
    text-decoration: underline;
}

/* Página do aluno */
.header-aluno {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
}

.header-aluno h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.header-aluno h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: rgba(255,255,255,0.9);
}

.header-aluno p {
    font-size: 1.1rem;
    opacity: 0.8;
}

.main-aluno {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Grid de atividades */
.atividades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card-atividade {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.card-atividade:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.card-atividade.enviado {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.card-header h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: white;
}

.docente {
    font-size: 0.9rem;
    opacity: 0.9;
}

.card-body {
    padding: 1.5rem;
}

.descricao {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #666;
}

.info-entrega {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.data-entrega {
    color: #667eea;
    font-weight: 600;
}

.arquivo-suporte {
    margin-bottom: 1rem;
}

.arquivo-suporte .btn-download {
    background: linear-gradient(135deg, #6f42c1 0%, #e83e8c 100%);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid #e1e5e9;
}

.status-enviado {
    color: #28a745;
    font-weight: 600;
    font-size: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Estados de erro e sem conteúdo */
.erro,
.sem-atividades,
.sem-envios {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.erro h3,
.sem-atividades h3,
.sem-envios {
    color: #666;
    margin-bottom: 1rem;
}

/* Info da atividade */
.info-atividade {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

.selecionar-atividade {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Responsividade */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .atividades-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
    
    .checkbox-group {
        flex-direction: column;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th,
    td {
        padding: 0.5rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .header-aluno h1 {
        font-size: 2rem;
    }
    
    .header-aluno h2 {
        font-size: 1.4rem;
    }
    
    main {
        padding: 0 0.5rem;
    }
    
    form {
        padding: 1rem;
    }
}

