:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --accent: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --error: #e63946;
    --gray: #6c757d;
    --border-radius: 16px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--dark);
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 950px;
    min-height: 550px;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.graphic-side {
    flex: 1;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.graphic-side::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -150px;
    left: -150px;
}

.graphic-side::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -100px;
    right: -100px;
}

.graphic-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.graphic-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
}

.graphic-content p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 300px;
}

.features {
    text-align: left;
    margin-top: 30px;
}

.feature {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.feature i {
    background: rgba(255, 255, 255, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.graphic-image {
    margin-top: 30px;
    font-size: 180px;
    opacity: 0.8;
}

.form-side {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 28px;
    color: var(--primary);
    font-weight: 700;
}

.logo p {
    color: var(--gray);
    margin-top: 8px;
    font-size: 14px;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
}

.input-with-icon input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: var(--transition);
}

.input-with-icon input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    outline: none;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember {
    display: flex;
    align-items: center;
}

.remember input {
    margin-right: 8px;
    accent-color: var(--primary);
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.forgot-password:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn.loading {
    pointer-events: none;
    opacity: 0.9;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 3px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

.messages {
    margin-top: 20px;
}

.message {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: none;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.message i {
    margin-right: 12px;
    font-size: 18px;
}

.error-message {
    background-color: rgba(230, 57, 70, 0.1);
    color: var(--error);
    border: 1px solid rgba(230, 57, 70, 0.2);
}

.success-message {
    background-color: rgba(76, 201, 240, 0.1);
    color: var(--success);
    border: 1px solid rgba(76, 201, 240, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: var(--gray);
}

/* Responsive Design */
@media (max-width: 900px) {
    .login-container {
        flex-direction: column;
        max-width: 450px;
    }

    .graphic-side {
        display: none;
    }

    .form-side {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 0;
    }

    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
    }

    .forgot-password {
        margin-top: 10px;
    }
}