/* =====================================================
   AFG Custom Registration - Modern Styles v2.0
   ===================================================== */

/* ---------- ریست و متغیرها ---------- */

:root {
    --afg-primary:        #6C63FF;
    --afg-primary-dark:   #4B44CC;
    --afg-primary-light:  #EEF0FF;
    --afg-accent:         #FF6584;
    --afg-success:        #28a745;
    --afg-success-light:  #d1e7dd;
    --afg-warning:        #F39C12;
    --afg-danger:         #dc3545;
    --afg-danger-light:   #f8d7da;
    --afg-text:           #2D3748;
    --afg-text-muted:     #718096;
    --afg-border:         #E2E8F0;
    --afg-bg:             #F7F8FC;
    --afg-white:          #FFFFFF;
    --afg-shadow:         0 10px 40px rgba(108, 99, 255, 0.15);
    --afg-shadow-sm:      0 4px 15px rgba(0, 0, 0, 0.08);
    --afg-radius:         24px;
    --afg-radius-sm:      8px;
    --afg-transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --afg-font:           'Vazirmatn', 'Vazir', Tahoma, sans-serif;
}


/* تغییر رنگ آیکن چشم (نمایش رمز) */
.afg-toggle-pass i {
    color: #7f8c8d;
}

/* رنگ آیکن پرچم / گلوب در شماره تماس */
.afg-phone-prefix i {
    color: #0e813e;
}

/* رنگ آیکن آپلود عکس */
.afg-upload-icon i {
    color: #e67e22;
}

/* رنگ آیکن‌های بخش نشست‌های فعال */
.afg-session-icon i {
    color: #0b4368;
}
.afg-session-meta i {
    color: #d4760b;
    margin-left: 5px;
}


body { 
    overflow-x: hidden !important; 
    
}

.afg-form-panel {
    background: #ffffff !important; /* یا هر رنگی */
}


/* ---------- wrapper اصلی صفحه ---------- */
.afg-registration-wrapper {
    position: fixed !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    background-color: var(--afg-bg) !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: flex;
    flex-direction: row-reverse; 
    font-family: var(--afg-font);
    direction: rtl;
    overflow: hidden !important;
}

/* پیام کاربری که وارد شده */
.afg-logged-in-msg {
    text-align: center;
    margin-top: 50px;
    font-size: 18px;
}

/* =====================================================
   SLIDESHOW PANEL (سمت چپ)
   ===================================================== */
.afg-slideshow-panel {
    width: calc(100% - 480px) !important;
    flex: 1 1 auto !important;
    position: relative;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

.afg-slideshow {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

.afg-slide {
    position: absolute;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    opacity: 0;
    transform: scale(1.05);
    z-index: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.afg-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.afg-slide.prev {
    opacity: 0;
    transform: scale(0.98);
    z-index: 1;
}

.afg-slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4); /* به درخواست شما تیره شفاف تنظیم شد */
}

.afg-slide-content {
    position: absolute;
    bottom: 40px;
    right: 40px;
    left: 40px;
    z-index: 2;
    color: var(--afg-white);
    text-align: right;
}

.afg-slide-content h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    line-height: 1.3;
}

.afg-slide-content p {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.afg-slide-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.afg-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: var(--afg-transition);
}

.afg-dot.active {
    background: var(--afg-white);
    opacity: 1;
}

/* =====================================================
   FORM PANEL (سمت راست)
   ===================================================== */
.afg-form-panel {
    width: 480px !important;
    min-width: 480px !important;
    background: var(--afg-white);
    display: flex;
    align-items: flex-start;
    justify-content: center; 
    padding: 40px 35px;
    overflow-y: auto;
    position: relative;
    z-index: 5;
    box-shadow: -8px 0 40px rgba(0,0,0,0.08);
    box-sizing: border-box !important;
    margin-right: 10px;
}

.afg-form-container {
    width: 100%;
    background: #e2c5f3;
    padding: 40px 32px;
    border-radius: var(--afg-radius);
    box-shadow: 0 20px 50px rgba(160, 32, 27, 0.52), 0 5px 15px rgba(243, 191, 79, 0.23);
    border: 1px solid #dfd2de;
    border-top: 12px solid #e46e0e;
    box-sizing: border-box;
    margin: auto;
}

/* ---------- تب‌های فرم و انیمیشن ---------- */
.afg-auth-section { 
    display: none; 
    animation: afgFadeIn 0.4s ease-in-out; 
}

.afg-auth-section.active { 
    display: block; 
}

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

/* ---------- هدر فرم ---------- */
.afg-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.afg-form-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--afg-text);
    margin: 0 0 5px;
    line-height: 1.3;
}

.afg-form-header p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ---------- پیام سیستم ---------- */
.afg-msg-box { 
    padding: 12px; 
    border-radius: var(--afg-radius-sm); 
    margin-bottom: 15px; 
    text-align: center; 
    font-size: 14px;
}

.afg-msg-error { 
    color: #842029; 
    background-color: var(--afg-danger-light); 
    border: 1px solid #f5c2c7; 
}

.afg-msg-success { 
    color: #0f5132; 
    background-color: var(--afg-success-light); 
    border: 1px solid #badbcc; 
}

/* ---------- لینک سوئیچ فرم ---------- */
.afg-switch-link { 
    color: #007bff; 
    cursor: pointer; 
    font-weight: bold; 
    text-decoration: none; 
}

.afg-switch-link:hover { 
    text-decoration: underline; 
}

.afg-remember-row {
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 25px; 
    font-size: 14px;
}

/* ---------- گروه‌های اینپوت ---------- */
.afg-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.afg-input-group {
    margin-bottom: 15px;
    flex: 1;
}

.afg-input-group label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: var(--afg-text);
    margin-bottom: 5px;
}

.afg-center-label {
    text-align: center;
}

.afg-required {
    color: red;
}

/* wrapper ورودی */
.afg-input-wrap {
    position: relative;
    width: 100%;
}

/* استایل اینپوت‌ها */
.afg-input-wrap input[type="text"],
.afg-input-wrap input[type="email"],
.afg-input-wrap input[type="password"],
.afg-input-wrap input[type="number"] {
    width: 100%;
    padding: 10px;
    font-family: var(--afg-font);
    font-size: 14px;
    color: var(--afg-text);
    background: var(--afg-white);
    border: 1px solid #ccc;
    border-radius: var(--afg-radius-sm);
    box-sizing: border-box;
    transition: var(--afg-transition);
    outline: none;
    border-right: 4px solid #e46e0e;

}

.afg-pass-input {
    padding-left: 35px !important;
}

.afg-input-wrap input:focus {
    border-color: var(--afg-primary);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.12);
}

/* ---------- شماره تلفن افغانستان ---------- */
.afg-phone-wrap {
    display: flex;
    align-items: center;
    background: var(--afg-white);
    border: 1px solid #ccc;
    border-radius: var(--afg-radius-sm);
    overflow: hidden;
    transition: var(--afg-transition);
    direction: ltr;
     border-right: 4px solid #0e84e4;

}

.afg-phone-prefix {
    padding-right: 10px;
    font-size: 14px;
    background: #f8f9fa;
    border-right: 1px solid #ccc;
    direction: ltr;
     align-items: center;
          border-left: 4px solid #0e84e4;

}

.afg-phone-wrap input {
    width: 100%;
    border: none !important;
    outline: none;
    padding: 10px;
    direction: ltr;
}

/* ---------- نمایش/مخفی رمز ---------- */
.afg-toggle-pass {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
}

/* ---------- سنجش رمز عبور ---------- */
.afg-password-meter { 
    width: 100%; 
    height: 5px; 
    background-color: #e0e0e0; 
    border-radius: 3px; 
    margin-top: 8px; 
    overflow: hidden; 
}

.afg-password-meter-fill { 
    height: 100%; 
    width: 0; 
    transition: width 0.3s ease, background-color 0.3s ease; 
}

.afg-password-text { 
    font-size: 12px; 
    margin-top: 5px; 
    font-weight: bold; 
    text-align: right; 
}

.afg-match-error {
    color: var(--afg-danger);
    font-size: 12px;
    margin-top: 5px;
    display: none;
    text-align: right;
    font-weight: bold;
}

.strength-weak { background-color: var(--afg-danger) !important; color: var(--afg-danger); }
.strength-medium { background-color: var(--afg-warning) !important; color: var(--afg-warning); }
.strength-strong { background-color: var(--afg-success) !important; color: var(--afg-success); }

/* ---------- آپلود عکس ---------- */
.afg-upload-area {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: var(--afg-radius-sm);
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.afg-file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.afg-upload-content {
    padding: 20px;
    text-align: center;
}

.afg-upload-icon {
    font-size: 24px;
}

.afg-upload-content p {
    margin-top: 5px;
    font-size: 14px;
}

.afg-upload-area.is-circular { 
    border-radius: 50% !important; 
    width: 120px; 
    height: 120px; 
    margin: 0 auto; 
    overflow: hidden; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.afg-upload-area.is-circular .afg-upload-content { 
    display: none; 
}

.afg-captcha-group {
    margin-bottom: 25px;
}

/* ---------- دکمه ارسال ---------- */
.afg-submit-btn {
    width: 100%;
    padding: 14px;
    color: var(--afg-white);
    border: none;
    border-radius: var(--afg-radius-sm);
    font-family: var(--afg-font);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--afg-transition);
}

.afg-btn-primary {
    background: #007bff;
}

.afg-btn-success {
    background: var(--afg-success);
}

.afg-submit-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ---------- لینک ورود و فرم پایین ---------- */
.afg-login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

/* ---------- آیکون هدر فرم ---------- */
.afg-header-icon {
    width: 100px; /* می‌توانید این مقدار را تغییر دهید تا آیکون بزرگتر یا کوچکتر شود */
    height: auto;
    margin-bottom: 7px;
    display: inline-block;
}


            .afg-logged-in-card {
                background: #f0f9f4;
                border: 1px solid #c8e6c9;
                border-radius: 16px;
                padding: 32px 24px;
                margin: 25px 0;
                display: flex;
                flex-direction: column;
                align-items: center;
                text-align: center;
                gap: 16px;
                box-shadow: 0 4px 16px rgba(46,125,50,0.08);
            }
            .afg-logged-in-card .afg-icon {
            width: 100px;
            height: 100px;
            background-repeat: no-repeat;
            background-position: center;
            background-size: contain;
            border-radius: 12px;
             }

            .afg-logged-in-card .afg-msg {
                color: #2e7d32;
                font-size: 15px;
                line-height: 1.7;
                font-weight: 500;
            }
            .afg-buttons {
                display: flex;
                gap: 10px;
                flex-wrap: wrap;
                justify-content: center;
            }
            .afg-btn {
                background: #2e7d32;
                color: white !important;
                padding: 9px 20px;
                border-radius: 8px;
                text-decoration: none;
                font-weight: 600;
                font-size: 14px;
                transition: background 0.2s, transform 0.15s;
            }
            .afg-btn:hover {
                background: #1b5e20;
                transform: translateY(-1px);
            }



/* ریسپانسیو فرم برای موبایل */
@media (max-width: 768px) {
    .afg-registration-wrapper {
        flex-direction: column;
    }
    .afg-slideshow-panel {
        display: none !important;
    }
    .afg-form-panel {
        width: 100% !important;
        min-width: 100% !important;
        padding: 35px 35px;
        height: auto !important;
    }
    .afg-form-container {
        padding: 30px 20px;
        border-radius: 16px;
    }
    .afg-form-row {
        grid-template-columns: 1fr;
    }
}




/* ====== پنل کاربری ====== */
.afg-dashboard-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Vazir', 'Tahoma', sans-serif;
    direction: rtl;
}

.afg-dashboard-section {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.afg-section-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: #1a1a1a;
}

.afg-section-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* نشست‌ها */
.afg-sessions-list {
    margin-top: 20px;
}

.afg-session-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.afg-session-card:hover {
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76,175,80,0.15);
}

.afg-current-session {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-color: #4CAF50;
}

.afg-session-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.afg-session-info {
    flex: 1;
}

.afg-session-device {
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.afg-badge-current {
    background: #4CAF50;
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.afg-session-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
}

.afg-session-action {
    flex-shrink: 0;
}

.afg-btn-danger-small {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.afg-btn-danger-small:hover {
    background: #d32f2f;
    transform: translateY(-1px);
}

.afg-destroy-all-form {
    margin-top: 20px;
    text-align: center;
}

.afg-btn-warning {
    background: #ff9800;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.afg-btn-warning:hover {
    background: #f57c00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,152,0,0.3);
}

/* منطقه خطرناک */
.afg-danger-zone {
    border: 2px solid #f44336;
}

.afg-warning-box {
    background: #fff3e0;
    border-right: 4px solid #ff9800;
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
    color: #e65100;
    font-size: 14px;
}

.afg-btn-danger {
    background: #f44336;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.afg-btn-danger:hover {
    background: #d32f2f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244,67,54,0.3);
}

.afg-delete-form {
    margin-top: 20px;
    padding: 20px;
    background: #ffebee;
    border-radius: 8px;
}

.afg-delete-form .afg-input-group {
    margin-bottom: 15px;
}

.afg-delete-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #c62828;
}

.afg-delete-form input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ef5350;
    border-radius: 6px;
    font-size: 14px;
}

.afg-checkbox-group {
    margin: 15px 0;
}

.afg-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #c62828;
}

.afg-btn-danger-final {
    background: #b71c1c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    margin-left: 10px;
}

.afg-btn-danger-final:hover {
    background: #7f0000;
}

.afg-btn-cancel {
    background: #757575;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

.afg-btn-cancel:hover {
    background: #616161;
}

.afg-empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 15px;
}

.afg-error-box {
    background: #ffebee;
    border-right: 4px solid #f44336;
    padding: 15px;
    border-radius: 6px;
    color: #c62828;
    margin: 20px 0;
}
