/* css/login.css */
* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #ffffff, #e3f2fd);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    justify-content: center;
    align-items: center;
}

.container {
    background: #fff;
    padding: 30px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.titulo-escola {
    text-align: center;
    color: #0d47a1;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 25px;
    color: #1565c0;
    font-size: 26px;
}

label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: #333;
}

input[type="email"],
.senha-container input {
    width: 100%;
    padding: 12px 15px;
    margin-top: 5px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

input[type="email"]:focus,
.senha-container input:focus {
    outline: none;
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.2);
}

button {
    width: 100%;
    padding: 14px;
    background-color: #1565c0;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button:hover {
    background-color: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

button:active {
    transform: translateY(0);
}

p {
    text-align: center;
    margin-top: 15px;
    color: #555;
}

a {
    color: #0d47a1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

a:hover {
    color: #0a3d7a;
    text-decoration: underline;
}

.erro {
    color: #d32f2f;
    background: #ffebee;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    border-left: 4px solid #d32f2f;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.senha-container {
    position: relative;
}

.senha-container input {
    padding-right: 40px;
}

.toggle-senha {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #555;
    user-select: none;
    transition: color 0.2s ease;
    padding: 5px;
}

.toggle-senha:hover {
    color: #1565c0;
}

/* Responsividade */
@media (max-width: 480px) {
    .container {
        margin: 20px;
        padding: 25px 20px;
        max-width: 100%;
    }
    
    h1 {
        font-size: 22px;
    }
    
    .titulo-escola {
        font-size: 18px;
    }
}

/* Loader para botão de login */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Melhorias para acessibilidade */
input:focus-visible {
    outline: 2px solid #1565c0;
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid #1565c0;
    outline-offset: 2px;
}