/* ============================================================
   ESTILOS DA PÁGINA DE LOGIN
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #20B2AA 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ============================================================
   CONTAINER PRINCIPAL
   ============================================================ */

.login-container {
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease-out;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* ============================================================
   SEÇÃO DE LOGO
   ============================================================ */

.logo-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 2.5rem 2rem 2rem 2rem;
    text-align: center;
    color: white;
}

.logo-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-section h1 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    color: #20B2AA;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ============================================================
   FORMULÁRIO DE LOGIN
   ============================================================ */

.login-form {
    padding: 2rem;
}

.login-form h2 {
    color: #1e3c72;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
}

/* ============================================================
   CAMPOS DO FORMULÁRIO
   ============================================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group label .icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #20B2AA;
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.2);
    transform: translateY(-2px);
}

.form-group input:hover {
    border-color: #cbd5e0;
}

.form-group input.invalid {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Mensagens de erro */
.error-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    font-weight: 500;
}

/* ============================================================
   CAIXA DE ERRO
   ============================================================ */

.error-box {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.error-box .error-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.error-box .error-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ============================================================
   BOTÃO DE LOGIN
   ============================================================ */

button {
    width: 100%;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #20B2AA 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.4);
}

button:active {
    transform: translateY(-1px);
}

button:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================================
   RODAPÉ
   ============================================================ */

.footer-info {
    background: #f7fafc;
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.footer-info p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.footer-info .copyright {
    color: #a0aec0;
    font-size: 0.85rem;
}

/* ============================================================
   ANIMAÇÕES
   ============================================================ */

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

button:disabled::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */

@media (max-width: 480px) {
    .login-container {
        max-width: 100%;
    }
    
    .logo-section {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
    }
    
    .logo-section h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .logo-icon {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .login-form {
        padding: 1.5rem;
    }
    
    .login-form h2 {
        font-size: 1.3rem;
    }
    
    .form-group input {
        padding: 0.875rem;
    }
    
    button {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============================================================
   ACESSIBILIDADE
   ============================================================ */

/* Foco visível para navegação por teclado */
input:focus-visible,
button:focus-visible {
    outline: 3px solid #20B2AA;
    outline-offset: 2px;
}

/* Redução de movimento para usuários com preferência */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
