/**

 * Estilos do Sistema de Escola

 * Teste de Programação

 */



* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



body {

    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    background: #667eea;

    min-height: 100vh;

    padding: 20px;

    color: #333;

}



.container {

    max-width: 1200px;

    margin: 0 auto;

    background: white;

    border-radius: 10px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);

    padding: 30px;

}



header {

    text-align: center;

    margin-bottom: 30px;

    padding-bottom: 20px;

    border-bottom: 2px solid #667eea;

}



header h1 {

    color: #667eea;

    font-size: 2.5em;

    margin-bottom: 10px;

}



header p {

    color: #666;

    font-size: 1.1em;

}



.btn-voltar {

    display: inline-block;

    margin-bottom: 20px;

    color: #667eea;

    text-decoration: none;

    font-weight: bold;

    transition: color 0.3s;

}



.btn-voltar:hover {

    color: #5568d3;

}



.menu ul {

    list-style: none;

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));

    gap: 20px;

    margin-top: 30px;

}



.menu li a {

    display: block;

    padding: 20px;

    background: #667eea;

    color: white;

    text-decoration: none;

    border-radius: 8px;

    text-align: center;

    font-weight: bold;

    transition: transform 0.3s, box-shadow 0.3s;

}



.menu li a:hover {

    transform: translateY(-5px);

    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);

}



.mensagem {

    padding: 15px;

    border-radius: 5px;

    margin-bottom: 20px;

    font-weight: bold;

}



.mensagem.sucesso {

    background-color: #d4edda;

    color: #155724;

    border: 1px solid #c3e6cb;

}



.mensagem.erro {

    background-color: #f8d7da;

    color: #721c24;

    border: 1px solid #f5c6cb;

}



.mensagem.info {

    background-color: #d1ecf1;

    color: #0c5460;

    border: 1px solid #bee5eb;

}



.formulario {

    max-width: 600px;

    margin: 0 auto;

}



.formulario-filtro {

    max-width: 400px;

    margin: 0 auto 30px;

}



.campo {

    margin-bottom: 20px;

}



.campo label {

    display: block;

    margin-bottom: 8px;

    font-weight: bold;

    color: #555;

}



.campo input,

.campo select {

    width: 100%;

    padding: 12px;

    border: 2px solid #ddd;

    border-radius: 5px;

    font-size: 1em;

    transition: border-color 0.3s;

}



.campo input:focus,

.campo select:focus {

    outline: none;

    border-color: #667eea;

}



.botoes {

    display: flex;

    gap: 10px;

    margin-top: 30px;

}



.btn {

    padding: 12px 30px;

    border: none;

    border-radius: 5px;

    font-size: 1em;

    font-weight: bold;

    cursor: pointer;

    text-decoration: none;

    display: inline-block;

    transition: transform 0.3s, box-shadow 0.3s;

}



.btn-primary {

    background: #667eea;

    color: white;

}



.btn-primary:hover {

    transform: translateY(-2px);

    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);

}



.btn-secondary {

    background: #6c757d;

    color: white;

}



.btn-secondary:hover {

    background: #5a6268;

    transform: translateY(-2px);

}



.info-turma {

    background: #f8f9fa;

    padding: 20px;

    border-radius: 5px;

    margin-bottom: 20px;

}



.info-turma h2 {

    color: #667eea;

    margin-bottom: 10px;

}



.tabela-container {

    overflow-x: auto;

    margin-top: 20px;

}



.tabela-chamadas {

    width: 100%;

    border-collapse: collapse;

    background: white;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

}



.tabela-chamadas thead {

    background: #667eea;

    color: white;

}



.tabela-chamadas th,

.tabela-chamadas td {

    padding: 15px;

    text-align: left;

    border-bottom: 1px solid #ddd;

}



.tabela-chamadas tbody tr:hover {

    background-color: #f8f9fa;

}



.coluna-chamada {

    text-align: center;

}



.select-chamada {

    padding: 8px;

    border: 2px solid #ddd;

    border-radius: 5px;

    font-size: 1em;

    min-width: 150px;

    cursor: pointer;

}



.select-chamada:focus {

    outline: none;

    border-color: #667eea;

}



.select-chamada option[value="presente"] {

    background-color: #d4edda;

    color: #155724;

}



.select-chamada option[value="falta"] {

    background-color: #f8d7da;

    color: #721c24;

}



/* Estilos para grids de listagem */

.grid-container {

    margin-top: 30px;

}



.grid-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 20px;

}



.grid-header h2 {

    color: #667eea;

    margin: 0;

}



.tabela-grid {

    width: 100%;

    border-collapse: collapse;

    background: white;

    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

    margin-bottom: 20px;

}



.tabela-grid thead {

    background: #667eea;

    color: white;

}



.tabela-grid th,

.tabela-grid td {

    padding: 15px;

    text-align: left;

    border-bottom: 1px solid #ddd;

}



.tabela-grid tbody tr:hover {

    background-color: #f8f9fa;

}



.tabela-grid tbody tr:nth-child(even) {

    background-color: #f9f9f9;

}



.tabela-grid tbody tr:nth-child(even):hover {

    background-color: #f0f0f0;

}



.acoes {

    display: flex;

    gap: 10px;

}



.btn-acao {

    padding: 6px 12px;

    border: none;

    border-radius: 4px;

    font-size: 0.9em;

    cursor: pointer;

    text-decoration: none;

    display: inline-block;

    transition: opacity 0.3s;

}



.btn-acao:hover {

    opacity: 0.8;

}



.btn-ver {

    background: #17a2b8;

    color: white;

}



.btn-editar {

    background: #6c757d;

    color: white;

}



.btn-excluir {

    background: #dc3545;

    color: white;

}



.sem-registros {

    text-align: center;

    padding: 40px;

    color: #666;

    font-style: italic;

}



.botoes-acao {

    display: flex;

    gap: 10px;

    margin-bottom: 20px;

}



/* Card do formulário */

.card-formulario {

    background: #f8f9fa;

    padding: 25px;

    border-radius: 8px;

    border: 1px solid #dee2e6;

    margin-bottom: 20px;

}



.card-formulario h3 {

    color: #667eea;

    margin-bottom: 20px;

    font-size: 1.5em;

}



/* Melhorias de responsividade mobile */

@media (max-width: 768px) {

    .container {

        padding: 15px;

    }

    

    header h1 {

        font-size: 1.8em;

    }

    

    header p {

        font-size: 0.9em;

    }

    

    .menu ul {

        grid-template-columns: 1fr;

        gap: 15px;

    }

    

    .menu li a {

        padding: 15px;

        font-size: 0.95em;

    }

    

    .botoes {

        flex-direction: column;

        gap: 10px;

    }

    

    .btn {

        width: 100%;

        text-align: center;

        padding: 12px;

    }

    

    .formulario {

        max-width: 100%;

    }

    

    .campo input,

    .campo select {

        font-size: 16px; /* Evita zoom no iOS */

        padding: 12px;

    }

    

    .tabela-container {

        overflow-x: auto;

        -webkit-overflow-scrolling: touch;

    }

    

    .tabela-grid {

        font-size: 0.85em;

        min-width: 600px;

    }

    

    .tabela-grid th,

    .tabela-grid td {

        padding: 8px 5px;

        white-space: nowrap;

    }

    

    .tabela-chamadas {

        font-size: 0.85em;

        min-width: 400px;

    }

    

    .tabela-chamadas th,

    .tabela-chamadas td {

        padding: 10px 5px;

    }

    

    .acoes {

        flex-direction: column;

        gap: 5px;

    }

    

    .grid-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 15px;

    }

    

    .grid-header h2 {

        font-size: 1.3em;

    }

    

    .botoes-acao {

        width: 100%;

    }

    

    .botoes-acao .btn {

        width: 100%;

    }

    

    .card-formulario {

        padding: 15px;

    }

    

    .card-formulario h3 {

        font-size: 1.2em;

    }

    

    .formulario-filtro {

        max-width: 100%;

    }

    

    .info-turma {

        padding: 15px;

    }

    

    .info-turma h2 {

        font-size: 1.2em;

    }

}



@media (max-width: 480px) {

    header h1 {

        font-size: 1.5em;

    }

    

    .tabela-grid th,

    .tabela-grid td {

        padding: 6px 3px;

        font-size: 0.8em;

    }

    

    .card-formulario {

        padding: 12px;

    }

}



