/**
 * auth.css - استایل‌های صفحات احراز هویت و حساب کاربری
 */

/* ==================== 1. صفحه ورود و ثبت‌نام ==================== */
.authentication-page {
    background-color: var(--body-bg-light);
    min-height: calc(100vh - 250px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    margin-top: 0;
    margin-bottom: 0;
}

.auth-container {
    background-color: var(--card-bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    width: 100%;
}

.auth-banner {
    background-color: var(--primary-color);
    color: white;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
    position: relative;
    background-image: url('data:image/svg+xml,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="smallGrid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255, 255, 255, 0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23smallGrid)" /></svg>');
    background-size: cover;
    overflow: hidden;
}

.auth-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.auth-banner::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.banner-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    color: white !important;
}

.banner-text {
    margin-bottom: 40px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.9) !important;
}

.auth-features {
    position: relative;
    z-index: 1;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.auth-banner .feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.3rem;
    flex-shrink: 0;
    color: white;
}

.auth-banner .feature-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: white !important;
}

.auth-banner .feature-text p {
    opacity: 0.9;
    font-size: 0.9rem;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.8) !important;
}

.auth-forms {
    padding: 30px;
}

.auth-header {
    margin-bottom: 30px;
}

.nav-auth {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 15px;
}

.nav-auth .nav-link {
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-color-light);
    padding: 10px 20px;
    font-weight: 500;
    transition: var(--transition-speed) ease;
}

.nav-auth .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color-light);
    font-weight: 600;
}

.form-desc {
    color: var(--text-muted-light);
    margin-bottom: 25px;
}

.verification-code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-direction: row-reverse;
}

.verification-code-inputs .code-input {
    width: 50px;
    height: 60px;
    border-radius: var(--border-radius);
    font-size: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color-light);
    background-color: var(--body-bg-light);
    color: var(--text-color-light);
}

.code-timer {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.phone-display {
    font-weight: 500;
    color: var(--primary-color);
}

.auth-divider {
    margin: 30px 0;
    text-align: center;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background-color: var(--border-color-light);
}

.auth-divider span {
    position: relative;
    padding: 0 15px;
    background-color: var(--card-bg-light);
    color: var(--text-muted-light);
}

.traditional-login, .traditional-register {
    margin-top: 30px;
}

.traditional-login h5, .traditional-register h5 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-color-light);
    font-weight: 600;
}

/* ==================== 2. صفحه حساب کاربری ==================== */
.my-account-page {
    background-color: var(--body-bg-light);
    min-height: calc(100vh - 250px);
    padding: 40px 0;
}

.user-account-sidebar {
    position: sticky;
    top: 100px;
}

.user-profile-card {
    background-color: var(--card-bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    text-align: center;
}

.user-avatar {
    margin-bottom: 15px;
}

.user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    padding: 3px;
}

.user-name {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color-light);
    font-weight: 600;
}

.user-phone {
    color: var(--text-muted-light);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.account-navigation {
    background-color: var(--card-bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.account-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-nav-item {
    border-bottom: 1px solid var(--border-color-light);
}

.account-nav-item:last-child {
    border-bottom: none;
}

.account-nav-link {
    display: block;
    padding: 15px 20px;
    color: var(--text-color-light);
    transition: var(--transition-speed) ease;
    text-decoration: none;
}

.account-nav-link:hover {
    background-color: rgba(0, 0, 0, 0.02);
    color: var(--primary-color);
}

.account-nav-item.active .account-nav-link {
    background-color: var(--primary-color);
    color: white;
}

.account-card {
    background-color: var(--card-bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.account-card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color-light);
}

.account-card-title {
    margin-bottom: 0;
    font-size: 1.3rem;
    color: var(--text-color-light);
    font-weight: 600;
}

.account-card-body {
    padding: 20px;
}

.dashboard-welcome {
    background-color: var(--card-bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    margin-bottom: 30px;
}

.welcome-title {
    font-size: 1.5rem;
    color: var(--text-color-light);
    margin-bottom: 15px;
    font-weight: 600;
}

.welcome-text {
    color: var(--text-muted-light);
    margin-bottom: 0;
}

/* ==================== 3. حالت تاریک ==================== */
body.dark-mode .authentication-page,
body.dark-mode .my-account-page {
    background-color: var(--body-bg-dark);
}

body.dark-mode .auth-container,
body.dark-mode .user-profile-card,
body.dark-mode .account-navigation,
body.dark-mode .account-card,
body.dark-mode .dashboard-welcome {
    background-color: var(--card-bg-dark);
    box-shadow: var(--box-shadow-dark);
}

body.dark-mode .form-title,
body.dark-mode .traditional-login h5,
body.dark-mode .traditional-register h5,
body.dark-mode .user-name,
body.dark-mode .account-card-title,
body.dark-mode .welcome-title {
    color: var(--text-color-dark);
}

body.dark-mode .form-desc,
body.dark-mode .welcome-text,
body.dark-mode .user-phone {
    color: var(--text-muted-dark);
}

body.dark-mode .nav-auth {
    border-bottom-color: var(--border-color-dark);
}

body.dark-mode .nav-auth .nav-link {
    color: var(--text-color-dark);
}

body.dark-mode .verification-code-inputs .code-input {
    background-color: var(--card-bg-dark);
    border-color: var(--border-color-dark);
    color: var(--text-color-dark);
}

body.dark-mode .auth-divider::before {
    background-color: var(--border-color-dark);
}

body.dark-mode .auth-divider span {
    background-color: var(--card-bg-dark);
    color: var(--text-muted-dark);
}

body.dark-mode .account-nav-item {
    border-bottom-color: var(--border-color-dark);
}

body.dark-mode .account-nav-link {
    color: var(--text-color-dark);
}

body.dark-mode .account-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

body.dark-mode .account-card-header {
    border-bottom-color: var(--border-color-dark);
}

/* ==================== 4. استایل‌های پاسخگو ==================== */
@media (max-width: 991.98px) {
    .user-account-sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
}

@media (max-width: 767.98px) {
    .auth-forms {
        padding: 20px;
    }
    
    .verification-code-inputs .code-input {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .dashboard-welcome {
        padding: 20px;
    }
    
    .account-card-header,
    .account-card-body {
        padding: 15px;
    }
}

@media (max-width: 575.98px) {
    .verification-code-inputs .code-input {
        width: 35px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .form-title, 
    .welcome-title {
        font-size: 1.3rem;
    }
    
    .auth-banner {
        padding: 20px;
    }
    
    .banner-title {
        font-size: 1.5rem;
    }
}