@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #78206E;
    --primary-hover: #601a58;
    --accent-color: #C793E8;
    --secondary-color: #2D3748; --text-secondary: #718096;
    
    --bg-body: #F7FAFC;
    --bg-surface: #FFFFFF;
    --border-color: #E2E8F0;
    
    --bg-dark-color: #1A202C;
    --info-section-bg: var(--primary-color);
    --login-box-bg: var(--bg-surface);
    --text-primary-color: var(--primary-color);
    --text-info-section: #FFFFFF;
    --text-light-color: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body, html {
    height: 100%;
    width: 100%;
    background-color: var(--bg-dark-color);
    overflow-x: hidden;
}

.login-page-container {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden; 
    flex-direction: row;
}

.info-section {
    flex: 1;
    background: linear-gradient(135deg, var(--info-section-bg) 0%, var(--secondary-color) 100%);
    color: var(--text-info-section);
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    position: relative;
    overflow: hidden; 
}

.info-section h1 {
    font-size: 2.8em; 
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    z-index: 1;
}
 
.info-section p {
    font-size: 1em;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 450px;
    line-height: 1.5;
    z-index: 1;
}

.info-visual-element {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    border-radius: 50%;
    position: absolute;
    bottom: -100px;
    right: -100px;
    opacity: 0.15;
}

.login-section {
    flex: 1;
    background-color: var(--login-box-bg);
    color: var(--text-primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-form-container {
    width: 100%;
    max-width: 380px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-form-container h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: var(--text-primary-color);
    font-weight: 700;
}

.login-form-container p.welcome {
    margin-bottom: 30px;
    color: #666;
    font-size: 0.9em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.8em;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--primary-color);
    opacity: 0.6;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: opacity 0.3s;
}

.form-group input {
    width: 100%;
    padding: 12px 16px 12px 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95em;
    outline: none; 
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    color: var(--secondary-color);
    font-weight: 500;
}

.form-group input:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(120, 32, 110, 0.1);
}

.form-group input:focus + .input-icon,
.form-group input:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
    opacity: 1;
    color: var(--secondary-color);
}

.forgot-password {
    text-align: right;
    margin-bottom: 20px;
}

.forgot-password a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85em;
    transition: color 0.3s;
}
.forgot-password a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.login-button {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    background-image: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-light-color);
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    margin-top: 5px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(120, 32, 110, 0.3);
}

.dashboard-placeholder {
    margin-top: 20px;
    text-align: center;
    color: #aaa;
    font-size: 0.8em;
}

@media (max-width: 768px) {
    .login-page-container {
        flex-direction: column; 
        height: auto;
        overflow-y: auto;
    }

    .info-section {
        flex: 0 0 auto;
        height: 200px;
        padding: 30px;
        text-align: center;
        align-items: center;
        justify-content: center;
    }

    .info-section h1 {
        margin-bottom: 10px;
        font-size: 1.8em;
    }

    .info-section p {
        display: none;
    }

    .info-visual-element {
        width: 40px;
        height: 40px;
    }

    .login-section {
        flex: 1;
        padding: 20px;
    }
    
    .login-form-container {
        min-height: 500px;
    }
    
    .auth-panel {
        padding: 0 20px;
    }
}

.form-wrapper {
    position: relative;
    width: 100%; 
    height: 520px;
}

.auth-panel {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: transparent;
    display: flex;
    flex-direction: column; 
    justify-content: center;
    
    opacity: 0;
    transform: translateX(30px);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.form-wrapper:not(.show-recovery):not(.show-register):not(.show-force-change) #login-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    z-index: 2;
}

.form-wrapper.show-recovery #recovery-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    z-index: 2;
}

.form-wrapper.show-register #register-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    z-index: 2;
}

.form-wrapper.show-force-change #force-change-panel {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    z-index: 2;
}

.return-link {
    margin-top: 20px; 
    text-align: center;
    width: 100%; 
}

.dashboard-placeholder {
    margin-top: 50px;
    text-align: center;
    color: #aaa;
    font-size: 0.9em;
    transition: opacity 0.3s;
}

.form-wrapper.show-recovery .dashboard-placeholder,
.form-wrapper.show-register .dashboard-placeholder,
.form-wrapper.show-force-change .dashboard-placeholder {
    opacity: 0;
}

.loading-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-spinner-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(120, 32, 110, 0.1);
    border-top: 4px solid var(--text-primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.account-profile-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.account-avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 3px solid var(--primary-color);
    background-color: #f0f2f5;
    transition: transform 0.2s;
}

.account-avatar-container:hover {
    transform: scale(1.05);
}

#account-user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    opacity: 0;
    transition: opacity 0.2s;
}

.account-avatar-container:hover .avatar-edit-overlay {
    opacity: 1;
}

.password-strength-container {
    margin-top: 6px;
    margin-bottom: 10px;
}
.password-strength-bar {
    height: 4px;
    background-color: #E2E8F0;
    border-radius: 2px;
    overflow: hidden;
}
.password-strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
}
.password-strength-text {
    font-size: 0.75em;
    margin-top: 4px;
    text-align: right;
    font-weight: 600;
    color: #94A3B8;
}
