/* auth-theme.css - 100% matched aesthetic for Login & Register */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

body {
    background: radial-gradient(circle at top left, #d0bde6, #9f86c0);
    min-height: 100vh;
    margin: 0;
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
}

.auth-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    /* Soft wave background effect for the page body can be simulated with pseudo-element on the wrapper */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Page background big blobs */
.auth-wrapper::before,
.auth-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
}
.auth-wrapper::before {
    width: 600px;
    height: 600px;
    background: rgba(112, 70, 180, 0.4);
    top: -200px;
    left: -200px;
}
.auth-wrapper::after {
    width: 500px;
    height: 500px;
    background: rgba(144, 102, 219, 0.3);
    bottom: -100px;
    right: -100px;
}

.auth-box {
    background: #ffffff;
    width: 100%;
    max-width: 900px;
    height: auto;
    min-height: 550px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.05);
    display: flex;
    /* RTL aware: layout will naturally flip if dir=rtl, which is fine, 
       but if we strictly want purple on left, we override flex-direction */
    flex-direction: row; 
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Ensure purple is on the left in LTR, and right in RTL */
/* Wait, the image has purple on left. So we force row in both or let it flip? 
   Let it flip for RTL to look native. */

.auth-side {
    flex: 1;
    background: linear-gradient(135deg, #8154c9, #543399);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Decorative elements in the purple side */
.decor-svg-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}
.decor-dot {
    position: absolute;
    top: 30px;
    right: 40px;
    width: 30px;
    height: 80px;
    background-image: radial-gradient(white 2px, transparent 2px);
    background-size: 10px 10px;
    opacity: 0.5;
}
.decor-circle {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 50%;
}
.decor-circle.c1 { top: 20%; right: 20%; }
.decor-circle.c2 { bottom: 20%; left: 15%; }
.decor-plus {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0.6;
}
.decor-plus::before, .decor-plus::after {
    content: '';
    position: absolute;
    background: white;
}
.decor-plus::before { top: 7px; left: 0; width: 16px; height: 2px; }
.decor-plus::after { top: 0; left: 7px; width: 2px; height: 16px; }
.decor-plus.p1 { top: 15%; left: 30%; }
.decor-plus.p2 { bottom: 35%; right: 25%; }

.auth-side-content {
    position: relative;
    z-index: 2;
    max-width: 80%;
}
.auth-side-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}
.auth-side-content p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
}

.auth-form-container {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.auth-form-container h2 {
    color: #555;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

.form-group-custom {
    position: relative;
    margin-bottom: 20px;
}
.form-group-custom i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}
/* Address RTL / LTR icon placement */
html[dir="rtl"] .form-group-custom i { right: 20px; }
html[dir="ltr"] .form-group-custom i { left: 20px; }
html[dir="rtl"] .form-group-custom input { padding: 15px 45px 15px 20px; }
html[dir="ltr"] .form-group-custom input { padding: 15px 20px 15px 45px; }

.form-group-custom input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}
.form-group-custom input:focus {
    border-color: #7450b5;
    box-shadow: 0 0 5px rgba(116, 80, 181, 0.2);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #666;
}
.remember-me input {
    margin: 0;
    margin-inline-end: 8px; /* RTL aware */
    accent-color: #7450b5;
}

.forgot-link {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}
.forgot-link:hover {
    color: #7450b5;
}

.btn-custom {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #7b52c4, #5a35a6);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(97, 56, 171, 0.3);
}
.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(97, 56, 171, 0.4);
}

.auth-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 13px;
    color: #666;
}
.auth-footer a {
    color: #7450b5;
    text-decoration: none;
    font-weight: 600;
}
.auth-footer a:hover {
    text-decoration: underline;
}

/* Social logins customized to not clash with the clean design */
.social-login-custom {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}
.btn-social {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: transform 0.2s;
}
.btn-social:hover { transform: scale(1.1); }
.btn-social.google { background: #db4437; }
.btn-social.facebook { background: #4267B2; }

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-error {
    background: #ffeded;
    color: #d32f2f;
    border-left: 4px solid #d32f2f;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-box {
        flex-direction: column;
        height: auto;
    }
    .auth-side {
        padding: 30px 20px;
        text-align: center;
    }
    .auth-side-content {
        max-width: 100%;
        margin: 0 auto;
    }
    .auth-form-container {
        padding: 40px 20px;
    }
}
