/* ========================================
   CSS específico para a página de Login
   FreteSaaS - Versão Atualizada
======================================== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 25%, #cbd5e1 50%, #94a3b8 75%, #2563eb 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container principal */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: 80px; /* Espaço para a navbar */
}

/* Container do login */
.login-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Header do login */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2563eb;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
}

/* Formulário */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Campo de senha com toggle */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.password-toggle:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.password-toggle:focus {
    outline: none;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.15);
}

/* Botão de login */
.btn-login {
    width: 100%;
    background: #2563eb;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

/* Alertas */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Links de recuperação e registro */
.forgot-password {
    text-align: center;
    margin-top: 20px;
}

.forgot-password a {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.register-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.register-link p {
    color: #6b7280;
    font-size: 14px;
}

.register-link a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
}

/* Ajustes para integração com navbar */
.main-content {
    min-height: calc(100vh - 80px);
}

/* Efeitos adicionais */
.login-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

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

/* Animações de entrada */
.form-group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }

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