:root {
    --primary-color: #2ECC71;
    --primary-dark: #27AE60;
    --primary-light: #58D68D;
    --dark-color: #1a1a2e;
    --gradient-start: #E8F8F0;
    --gradient-end: #D4EFED;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.auth-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: auto;
    min-height: 600px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Left Side - Form */
.auth-form-section {
    flex: 1;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    max-height: 90vh;
}

.auth-logo {
    margin-bottom: 30px;
}

.auth-logo img {
    height: 42px;
}

.auth-tabs {
    display: flex;
    gap: 30px;
    margin-bottom: 35px;
    border-bottom: 1px solid #E8E8E8;
}

.auth-tab {
    padding: 0 5px 12px;
    font-size: 16px;
    font-weight: 500;
    color: #999;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.auth-tab:hover {
    color: var(--primary-color);
}

.auth-tab.active {
    color: #1a1a2e;
    border-bottom-color: var(--primary-color);
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 35px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

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

.form-input-icon {
    position: absolute;
    left: 16px;
    color: #999;
    font-size: 16px;
    pointer-events: none;
}

.form-control-modern {
    width: 100%;
    padding: 14px 16px 14px 45px;
    font-size: 15px;
    border: 1.5px solid #E0E0E0;
    border-radius: 12px;
    background: #FAFAFA;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-control-modern.is-invalid {
    border-color: #E74C3C;
    background: rgba(231, 76, 60, 0.05);
}

.form-control-modern.is-valid {
    border-color: var(--primary-color);
}

.validation-icon {
    position: absolute;
    right: 16px;
    font-size: 16px;
}

.validation-icon.valid {
    color: var(--primary-color);
}

.validation-icon.invalid {
    color: #E74C3C;
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.error-message {
    font-size: 12px;
    color: #E74C3C;
    margin-top: 5px;
}

.btn-social {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 1.5px solid #E0E0E0;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.btn-social:hover {
    background: #F5F5F5;
    border-color: #ccc;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-google svg {
    width: 20px;
    height: 20px;
}

.btn-facebook {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.btn-facebook:hover {
    background: #166fe5;
    border-color: #166fe5;
    color: white;
}

.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #999;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E8E8E8;
}

.divider span {
    padding: 0 15px;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.custom-checkbox label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin: 0;
}

.forgot-link {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

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

.btn-primary-modern {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.35);
}

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

.auth-footer-text {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #666;
}

.auth-footer-text a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

.terms-text {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

.terms-text a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border: none;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #27ae60;
}

/* Right Side - Illustration */
.auth-illustration-section {
    flex: 1;
    background: linear-gradient(135deg, #2ECC71 0%, #27AE60 100%);
    padding: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-illustration-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.auth-illustration-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.illustration-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 450px;
}

.illustration-icon {
    margin-bottom: 40px;
}

.illustration-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.3;
}

.illustration-text {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 35px;
}

.illustration-features {
    text-align: left;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    color: #fff;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.feature-text {
    font-size: 15px;
    line-height: 1.5;
}

.back-home {
    position: fixed;
    top: 25px;
    left: 25px;
    color: var(--primary-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 1000;
}

.back-home:hover {
    opacity: 1;
    color: var(--primary-dark);
}

/* Responsive */
@media (max-width: 992px) {
    .auth-illustration-section {
        display: none;
    }

    .auth-container {
        max-width: 500px;
    }

    .auth-form-section {
        padding: 40px 30px;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 10px;
    }

    .auth-container {
        border-radius: 16px;
    }

    .auth-form-section {
        padding: 30px 20px;
    }

    .auth-title {
        font-size: 24px;
    }

    .back-home {
        position: absolute;
        top: 15px;
        left: 15px;
    }
}

/* Loading State */
.btn-primary-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary-modern.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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