/* ============================================
   RESET & BASE STYLES
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ============================================
   CONTAINER STYLES
============================================ */
.login-container,
.register-container {
    display: flex;
    max-width: 1000px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    /* min-height: 600px; */
}

/* .register-container {
    min-height: 800px;
} */

/* ============================================
   LEFT SIDE STYLES
============================================ */
.left-side {
    flex: 1;
    background: linear-gradient(135deg, #d38312 0%, #a83279 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.logo-container {
    margin-bottom: 40px;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
}

.image-placeholder {
    background: rgb(240, 133, 25, 0.5);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.image-placeholder i {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.image-text {
    display: block;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgb(255, 255, 255);
}

.create-account-section {
    margin-top: auto;
}

.create-account-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.description {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
}

.create-account-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.create-account-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Benefits Section for Register */
.benefits-section {
    margin-top: auto;
}

.benefits-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateX(10px);
}

.benefit-item i {
    font-size: 24px;
    color: #fff;
    min-width: 40px;
}

.benefit-item h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.benefit-item p {
    font-size: 12px;
    opacity: 0.9;
}

.design-credit {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* ============================================
   RIGHT SIDE STYLES
============================================ */
.right-side {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header Styles */
.login-header,
.register-header {
    text-align: center;
    margin-bottom: 40px;
}

.user-icon {
    font-size: 60px;
    color: #667eea;
    margin-bottom: 15px;
}

.register-header .user-icon {
    color: #4CAF50;
}

.login-header h1,
.register-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.welcome-text {
    font-size: 18px;
    color: #666;
    font-weight: 500;
}

/* ============================================
   FORM STYLES - FIXED FOR VALIDATION
============================================ */
.login-form,
.register-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.register-form {
    max-width: 450px;
}

/* Form Group - FIXED STRUCTURE */
.form-group {
    position: relative;
    margin-bottom: 25px;
     /* Increased for error messages */
    /* min-height: 70px; */
}

/* Input Icon - FIXED POSITION */
.form-group .input-icon {
    position: absolute;
    left: 20px;
    top: 10px; /* FIXED: Use fixed position instead of 50% */
    color: #667eea;
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Input Field - FIXED PADDING */
.form-group .form-control {
    width: 100%;
    padding: 10px 20px 10px 55px; /* FIXED: Consistent padding */
    border: 2px solid #e1e5eb;
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
    line-height: 1.5;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

/* Password Toggle - FIXED POSITION */
.form-group .password-toggle {
    position: absolute;
    right: 20px;
    top: 12px; /* FIXED: Align with input */
    color: #999;
    cursor: pointer;
    font-size: 18px;
    z-index: 3;
    background: none;
    border: none;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Validation Icons - FIXED POSITION */
.form-control + .validation-icon {
    position: absolute;
    right: 25px;
    top: 18px; /* FIXED: Align with input */
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    pointer-events: none;
}

/* Form Row for Side by Side Fields */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ============================================
   VALIDATION STATES - FIXED
============================================ */
/* Success State */
.form-group.success .input-icon {
    color: #4CAF50;
}

.form-group.success .form-control + .validation-icon {
    opacity: 1;
    color: #4CAF50;
}

.form-group.success .form-control {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
    padding-left: 55px !important; /* Force same padding */
}

/* Error State */
.form-group.error .input-icon {
    color: #ff4757;
}

.form-group.error .form-control + .validation-icon {
    opacity: 1;
    color: #ff4757;
}

.form-group.error .form-control {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.05);
    padding-left: 55px !important; /* Force same padding */
}

/* Adjust password toggle when validation icon is visible */
.form-group.success .password-toggle,
.form-group.error .password-toggle {
    right: 50px; /* Move left to make room for validation icon */
}

/* Error and Success Messages - FIXED POSITION */
.form-group .error-message,
.form-group .success-message {
    position: absolute;
    /* bottom: -22px; */
    left: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: slideInUp 0.3s ease;
}

.error-message {
    color: #ff4757;
}

.success-message {
    color: #4CAF50;
}

/* Password Strength Indicator */
.password-strength-container {
    position: relative;
    /* margin-top: 5px; */
    padding: 0px 20px;
}

.password-strength {
    height: 5px;
    border-radius: 3px;
    background: #eee;
    overflow: hidden;
    /* margin-bottom: 5px; */
}

.strength-bar {
    height: 100%;
    width: 0%;
    background: #ff4757;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: #666;
    text-align: right;
}


/* ============================================
   USER TYPE SELECTION
============================================ */
.user-type-label {
    display: block;
    margin-bottom: 15px;
    color: #333;
    font-weight: 500;
    font-size: 16px;
}

.user-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.user-type-option {
    flex: 1;
    cursor: pointer;
}

.user-type-option input {
    display: none;
}

.option-card {
    background: #f8f9fa;
    border: 2px solid #e1e5eb;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.option-card i {
    font-size: 32px;
    color: #667eea;
    transition: color 0.3s ease;
}

.option-card span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.option-card small {
    font-size: 12px;
    color: #666;
}

.user-type-option input:checked + .option-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.2);
}

.user-type-option input:checked + .option-card i {
    color: #764ba2;
}

/* ============================================
   CHECKBOX STYLES
============================================ */
.terms-group,
.newsletter-group {
    margin-bottom: 20px;
    position: relative;
}

.terms-label,
.newsletter-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.5;
    position: relative;
    padding-left: 30px;
}

.terms-label input[type="checkbox"],
.newsletter-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.terms-label .checkmark,
.newsletter-label .checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #e1e5eb;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.terms-label:hover .checkmark,
.newsletter-label:hover .checkmark {
    border-color: #667eea;
}

.terms-label input:checked ~ .checkmark,
.newsletter-label input:checked ~ .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.terms-label input:checked ~ .checkmark::after,
.newsletter-label input:checked ~ .checkmark::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 14px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
}

/* ============================================
   BUTTON STYLES
============================================ */
.login-btn,
.register-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.register-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
}

/* Loading State */
.login-btn.loading,
.register-btn.loading {
    position: relative;
    color: transparent !important;
}

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

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================
   FORM OPTIONS & LINKS
============================================ */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
}

.remember-me input {
    display: none;
}

.remember-me .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remember-me input:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.remember-me input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
    color: #999;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #eee;
}

.divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #eee;
}

/* Social Login/Register */
.social-login,
.social-register {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid #e1e5eb;
    border-radius: 50px;
    background: white;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.social-btn.google:hover {
    border-color: #db4437;
    color: #db4437;
}

.social-btn.facebook:hover {
    border-color: #4267B2;
    color: #4267B2;
}

/* Sign Up / Login Links */
.signup-link,
.login-link {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.signup-link a,
.login-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signup-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.login-link a {
    color: #4CAF50;
}

.login-link a:hover {
    color: #2E7D32;
    text-decoration: underline;
}

/* ============================================
   MOBILE TOGGLE
============================================ */
.mobile-toggle {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    z-index: 10;
}

.toggle-btn {
    flex: 1;
    padding: 20px;
    border: none;
    background: #f8f9fa;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.toggle-btn.active {
    background: linear-gradient(135deg, #db4437 0%, #764ba2 100%);
    color: white;
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form,
.register-form,
.create-account-section,
.benefits-section {
    animation: fadeIn 0.8s ease-out;
}

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

@keyframes validationPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.form-group.success .validation-icon,
.form-group.error .validation-icon {
    animation: validationPulse 0.3s ease;
}

/* ============================================
   RESPONSIVE STYLES
============================================ */
@media (max-width: 1200px) {
    .login-container,
    .register-container {
        max-width: 900px;
    }
    
    .register-container {
        min-height: 750px;
    }
    
    .benefits-list {
        gap: 15px;
    }
    
    .benefit-item {
        padding: 12px;
    }
}

@media (max-width: 992px) {
    .login-container,
    .register-container {
        flex-direction: column;
        max-width: 600px;
        min-height: auto;
    }
    
    .left-side, .right-side {
        padding: 40px 30px;
    }
    
    .left-side {
        border-radius: 20px 20px 0 0;
    }
    
    .right-side {
        border-radius: 0 0 20px 20px;
    }
    
    .image-placeholder {
        padding: 30px;
    }
    
    .image-placeholder i {
        font-size: 60px;
    }
    
    .logo {
        font-size: 28px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-type-selector {
        flex-direction: column;
    }
    
    .benefits-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .benefit-item {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .login-container,
    .register-container {
        border-radius: 15px;
    }
    
    .left-side, .right-side {
        padding: 30px 20px;
    }
    
    .login-header h1,
    .register-header h1 {
        font-size: 28px;
    }
    
    .user-icon {
        font-size: 50px;
    }
    
    .create-account-section h2,
    .benefits-section h2 {
        font-size: 24px;
    }
    
    .benefit-item {
        min-width: 150px;
    }
    
    .form-group .input-icon {
        left: 22px;
        top: 10px;
        font-size: 16px;
    }
    
    .form-group .form-control {
        padding: 8px 20px 8px 55px;
        /* padding: 14px 15px 14px 45px; */
    }
    
    .form-control + .validation-icon {
        right: 25px;
        top: 16px;
        font-size: 14px;
    }
    
    .form-group .password-toggle {
        right: 15px;
        top: 12px;
        font-size: 16px;
    }
    
    .form-group.success .password-toggle,
    .form-group.error .password-toggle {
        right: 45px;
    }
    
    .login-btn,
    .register-btn,
    .create-account-btn {
        padding: 15px;
        font-size: 16px;
    }
    
    .social-login,
    .social-register {
        flex-direction: column;
    }
    
    .error-message,
    .success-message {
        left: 15px;
        bottom: -20px;
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .login-container,
    .register-container {
        position: relative;
        min-height: 100vh;
        border-radius: 0;
        margin: 0;
        max-width: 100%;
    }
    
    .left-side {
        display: none;
    }
    
    .right-side {
        padding: 40px 20px 100px;
        height: 100vh;
        overflow-y: auto;
    }
    
    .mobile-toggle {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-top: 1px solid #eee;
        z-index: 100;
    }
    
    .toggle-btn {
        padding: 18px;
    }
    
    .benefits-list {
        flex-direction: column;
    }
    
    .benefit-item {
        min-width: 100%;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .login-form,
    .register-form {
        max-width: 100%;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ============================================
   DARK MODE
============================================ */
/* @media (prefers-color-scheme: dark) {
    .right-side {
        background: #1a1a1a;
    }
    
    .login-header h1,
    .register-header h1 {
        color: #fff;
    }
    
    .welcome-text {
        color: #aaa;
    }
    
    .form-control {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .form-control:focus {
        background: #333;
    }
    
    .social-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .signup-link,
    .login-link {
        color: #aaa;
    }
    
    .user-type-label {
        color: #fff;
    }
    
    .option-card {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .option-card span {
        color: #fff;
    }
    
    .option-card small {
        color: #aaa;
    }
    
    .user-type-option input:checked + .option-card {
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    }
    
    .terms-label,
    .newsletter-label {
        color: #aaa;
    }
} */

/* ============================================
   ACCESSIBILITY
============================================ */
.form-control:focus,
.login-btn:focus,
.register-btn:focus,
.create-account-btn:focus,
.social-btn:focus {
    outline: 1px solid #667eea;
    outline-offset: 1px;
}

/* Progress Steps (Optional - remove if not needed) */
.registration-progress {
    display: none;
}