/* ==============================================
   Modern Login Page - Clean Design
   Based on SoftQA interface
   ============================================== */

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

:root {
    --vermelho-primario: #eb3835;
    --azul-secundario: #111D69;
    --success-color: #34a853;
    --danger-color: #ea4335;
    --text-dark: #202124;
    --text-light: #5f6368;
    --text-gray: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --white: #ffffff;
}

body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--white);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==============================================
   Main Layout - Split Screen
   ============================================== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==============================================
   Left Side - Login Form
   ============================================== */
.login-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    padding: 40px 20px;
}

.login-content {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.6s ease;
}

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

/* Brand Section */
.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}

.brand-logo {
    width: 64px;
    height: 64px;
    background-color: var(--azul-secundario);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.brand-logo img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand-section h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 32px;
}

.welcome-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.welcome-section p {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ==============================================
   Form Styles
   ============================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: var(--text-gray);
    font-size: 16px;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-dark);
    transition: none;
    background-color: var(--white);
}

.input-wrapper input:focus {
    outline: none;
}

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

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2;
    font-size: 16px;
}

.toggle-password:hover {
    color: var(--text-dark);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
}

.forgot-link {
    font-size: 14px;
    color: var(--azul-secundario);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--vermelho-primario);
}

/* Sign In Button */
.btn-signin {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--azul-secundario);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn-signin::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-signin:hover::before {
    left: 100%;
}

.btn-signin:hover {
    background-color: #0d1550;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(17, 29, 105, 0.25);
}

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

.btn-signin i {
    font-size: 16px;
    transition: transform 0.3s;
}

.btn-signin:hover i {
    transform: translateX(4px);
}

.btn-signin:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.btn-signin.loading span {
    opacity: 0;
}

.btn-signin.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==============================================
   Alert Messages
   ============================================== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background-color: #fef2f2;
    color: var(--danger-color);
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: var(--success-color);
    border: 1px solid #bbf7d0;
}

.alert i {
    font-size: 18px;
    flex-shrink: 0;
}

/* ==============================================
   Right Side - Visual Panel
   ============================================== */
.login-right {
    flex: 1;
    background: linear-gradient(135deg, var(--azul-secundario) 0%, #1a2b7d 50%, var(--vermelho-primario) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

/* Decorative Elements */
.login-right::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -300px;
    right: -300px;
    animation: float 10s ease-in-out infinite;
}

.login-right::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.right-content {
    z-index: 1;
    animation: fadeInRight 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.right-content h2 {
    font-size: 48px;
    font-weight: 900;
    color: var(--white);
    line-height: 1.2;
    text-align: center;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
}

.right-content h2 br {
    display: block;
    content: "";
    margin-top: 8px;
}

/* ==============================================
   Responsive Design
   ============================================== */
@media (max-width: 1024px) {
    .login-right {
        display: none;
    }
    
    .login-left {
        flex: 1;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .login-content {
        max-width: 100%;
    }
    
    .welcome-section h2 {
        font-size: 28px;
    }
    
    .welcome-section p {
        font-size: 15px;
    }
    
    .brand-section {
        margin-bottom: 36px;
    }
}

@media (max-width: 480px) {
    .login-left {
        padding: 24px 16px;
    }
    
    .brand-section {
        margin-bottom: 28px;
    }
    
    .brand-logo {
        width: 40px;
        height: 40px;
    }
    
    .brand-section h1 {
        font-size: 20px;
    }
    
    .welcome-section {
        margin-bottom: 24px;
    }
    
    .welcome-section h2 {
        font-size: 24px;
    }
    
    .welcome-section p {
        font-size: 14px;
    }
    
    .login-form {
        gap: 20px;
    }
    
    .input-wrapper input {
        padding: 12px 16px 12px 44px;
        font-size: 14px;
    }
    
    .btn-signin {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* ==============================================
   Dark Mode Support (Optional)
   ============================================== */
@media (prefers-color-scheme: dark) {
    /* Can be implemented if needed */
}

/* ==============================================
   Accessibility Improvements
   ============================================== */
.btn-signin:focus-visible,
.input-wrapper input:focus-visible,
.forgot-link:focus-visible {
    outline: 3px solid var(--azul-secundario);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .input-wrapper input {
        border-width: 3px;
    }
    
    .btn-signin {
        border: 3px solid transparent;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
