/* ========================================
   Componente: Formulário de Login
   ======================================== */

:root {
    --primary-red: #AD0505;
    --primary-red-hover: #8a0404;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --gray-dark: #495057;
    --border-color: #e9ecef;
    --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 12px rgba(173, 5, 5, 0.3);
}

/* ========================================
   Layout Principal
   ======================================== */

.login-wrapper {
    display: flex;
    height: 100vh;
}

.form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: white;
}

/* ========================================
   Container do Formulário
   ======================================== */

.login-container {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    padding: 2.5rem;
}

/* ========================================
   Logo e Título
   ======================================== */

.logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo-container img {
    height: 70px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.system-title {
    color: var(--primary-red);
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.2;
}

/* ========================================
   Elementos do Formulário
   ======================================== */

.form-group label {
    color: var(--gray-dark);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 0.2rem rgba(173, 5, 5, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-medium);
    opacity: 0.7;
}

/* ========================================
   Botão de Login
   ======================================== */

.btn-login {
    background-color: var(--primary-red);
    border: none;
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    min-width: 140px;
    cursor: pointer;
}

.btn-login:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-hover);
    color: white;
}

.btn-login:focus {
    box-shadow: 0 0 0 0.2rem rgba(173, 5, 5, 0.25);
    outline: none;
}

.btn-login:active {
    transform: translateY(0);
}

/* ========================================
   Toggle de Senha
   ======================================== */

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-left: 0;
    padding: 0.75rem 1rem;
}

/* ========================================
   Links do Rodapé
   ======================================== */

.footer-links {
    margin-top: 2rem;
    text-align: center;
}

.footer-links a {
    display: block;
    color: var(--gray-medium);
    text-decoration: none;
    padding: 0.6rem 1rem;
    margin: 0.3rem 0;
    background: var(--gray-light);
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.footer-links a:hover {
    background: var(--border-color);
    color: var(--gray-dark);
    text-decoration: none;
}

.footer-links a:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* ========================================
   Responsividade
   ======================================== */

@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }
    
    .form-section {
        padding: 1rem;
    }

    .login-container {
        padding: 1.5rem;
        box-shadow: none;
        max-width: 100%;
    }
    
    .logo-container {
        margin-bottom: 2rem;
    }
    
    .logo-container img {
        height: 60px;
    }
    
    .system-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 0.5rem;
    }
    
    .login-container {
        padding: 1rem;
        border-radius: 8px;
    }
}

/* ========================================
   Estados de Erro/Sucesso
   ======================================== */

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}