/* ===== PÁGINA DE LOGIN ===== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    position: relative;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(40, 167, 69, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(23, 162, 184, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 8px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    min-height: 400px;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.12),
        0 12px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.login-header {
    background: var(--nova-gradient-primary);
    color: white;
    text-align: center;
    padding: 2rem 2rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.login-logo {
    position: relative;
    z-index: 1;
}

.login-logo img {
    height: 70px;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.login-logo:hover img {
    transform: scale(1.05);
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
}

.login-body {
    padding: 2rem 2.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--nova-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.form-label i {
    margin-right: 0.5rem;
    color: var(--nova-primary);
    width: 20px;
    font-size: 1rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    height: auto;
    width: 100%;
}

.form-control:focus {
    border-color: var(--nova-primary);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
    background: white;
    transform: translateY(-2px);
    outline: none;
}

/* ===== CAMPO DE SENHA COM TOGGLE ===== */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .form-control {
    padding-right: 3.5rem;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #6c757d;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.password-toggle:hover {
    color: var(--nova-primary);
    background: rgba(40, 167, 69, 0.1);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

.password-toggle i {
    font-size: 1rem;
    pointer-events: none;
}

/* ===== BOTÃO DE LOGIN ===== */
.btn-login {
    background: var(--nova-gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    height: auto;
    position: relative;
    cursor: pointer;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-login.loading {
    background: var(--nova-secondary);
    pointer-events: none;
    transform: none !important;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== FOOTER ===== */
.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.login-footer p {
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.login-footer .copyright {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .login-page {
        padding: 1rem;
        min-height: 100vh;
    }
    
    .login-card {
        margin: 0 0.5rem;
        min-height: 350px;
        max-width: 100%;
    }
    
    .login-header {
        padding: 1.5rem 1rem;
    }
    
    .login-body {
        padding: 1.5rem 1rem;
    }
    
    .login-logo img {
        height: 60px;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-subtitle {
        font-size: 1rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-control {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .password-input-wrapper .form-control {
        padding-right: 3rem;
    }
    
    .password-toggle {
        right: 6px;
        min-width: 36px;
        height: 36px;
        padding: 6px;
    }
    
    .btn-login {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .login-footer {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 0.5rem;
    }
    
    .login-card {
        margin: 0 0.25rem;
        min-height: 320px;
        border-radius: 16px;
    }
    
    .login-header {
        padding: 1.25rem 0.75rem;
    }
    
    .login-body {
        padding: 1.25rem 0.75rem;
    }
    
    .login-logo img {
        height: 50px;
        margin-bottom: 0.75rem;
    }
    
    .login-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-label {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .password-input-wrapper .form-control {
        padding-right: 2.75rem;
    }
    
    .password-toggle {
        right: 4px;
        min-width: 32px;
        height: 32px;
        padding: 4px;
    }
    
    .password-toggle i {
        font-size: 0.9rem;
    }
    
    .btn-login {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
        border-radius: 10px;
    }
    
    .login-footer {
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .login-footer p {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .login-footer .copyright {
        font-size: 0.75rem;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: slideInUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-header, .login-body {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* ===== EFEITOS EXTRAS ===== */
.login-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 20px;
}

.form-control::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

/* ===== VALIDAÇÃO ===== */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #dc3545;
    font-weight: 500;
}
