/* متغیرهای رنگ */
:root {
    --primary: #6C63FF;
    --secondary: #4D44DB;
    --dark: #2F2B54;
    --light: #F0F2FF;
    --danger: #FF4757;
    --success: #28A745;
    --warning: #FD7E14;
    --glass: rgba(255, 255, 255, 0.2);
}

/* استایل‌های پایه */
body {
    font-family: 'IRANSans', sans-serif;
    background-color: #F5F7FF;
    color: var(--dark);
}

/* نوار ناوبری */
.navbar-custom {
    /*background: white;*/
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 800;
    color: var(--primary) !important;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--light) !important;
    margin-left: 15px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    transform: translateY(-2px);
}

.nav-link .badge {
    font-size: 0.6rem;
    margin-right: 3px;
}

/* پیشرفت فرم */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.form-progress::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 0;
    left: 0;
    height: 3px;
    background: #eee;
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.progress-step::before {
    content: '';
    width: 30px;
    height: 30px;
    background: white;
    border: 3px solid #eee;
    border-radius: 50%;
    display: block;
    margin: 0 auto 10px;
    box-sizing: border-box;
}

.progress-step.active::before {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.progress-step.completed::before {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.progress-step p {
    font-size: 0.9rem;
    color: #777;
    margin-top: 5px;
}

.progress-step.active p {
    color: var(--primary);
    font-weight: bold;
}

/* کارت فرم */
.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-bottom: 30px;
}

.form-title {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

/* رتبه‌بندی اعتباری */
.credit-rating-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.rating-card {
    flex: 1;
    min-width: 120px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid #eee;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.rating-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.rating-card.selected {
    border-color: var(--primary);
    background: var(--light);
}

.rating-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 auto 10px;
}

.rating-A {
    background: var(--success);
    color: white;
}

.rating-B {
    background: var(--warning);
    color: white;
}

.rating-C {
    background: var(--danger);
    color: white;
}

/* اسلایدر مبلغ تسهیلات */
.loan-amount-slider {
    margin: 30px 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.slider-value {
    font-weight: bold;
    color: var(--primary);
}

.form-range::-webkit-slider-thumb {
    background: var(--primary);
}

/* آپلودر فایل */
.file-upload-card {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.file-upload-card:hover {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.05);
}

.upload-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 10px;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-file {
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
}

/* خلاصه تسهیلات */
.loan-summary, .payment-details {
    background: var(--light);
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
}

.summary-item, .detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-label, .detail-label {
    color: var(--dark);
    font-weight: 500;
}

.summary-value, .detail-value {
    font-weight: bold;
}

.total-row {
    border-top: 1px solid #ddd;
    padding-top: 10px;
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.1rem;
}

/* دکمه‌ها */
.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

/* سایدبار */
.sidebar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    height: calc(100vh - 80px);
    position: sticky;
    top: 20px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin: 5px 0;
    border-radius: 10px;
    transition: all 0.3s;
    color: var(--dark);
    text-decoration: none;
}

.menu-item:hover, .menu-item.active {
    background: var(--light);
    color: var(--primary);
    transform: translateX(-5px);
}

.menu-item i {
    margin-left: 10px;
    font-size: 1.1rem;
}

/* محتوای اصلی */
.main-content {
    padding: 20px 0;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.welcome-card::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -30px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* کارت‌های آماری */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border-left: 4px solid var(--primary);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    color: var(--primary);
    font-size: 1.2rem;
    margin-left: auto;
}

/* لیست تسهیلات */
.loan-card {
    background: white;
    border-radius: 15px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    overflow: hidden;
}

.loan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.loan-card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px;
}

.loan-card-body {
    padding: 20px;
}

.loan-feature {
    display: flex;
    margin-bottom: 10px;
}

.loan-feature i {
    color: var(--primary);
    margin-left: 10px;
}

.loan-badge {
    background: var(--light);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* نوتیفیکیشن */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4757;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* درگاه‌های پرداخت */
.payment-methods {
    margin: 30px 0;
}

.payment-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.payment-card:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(108, 99, 255, 0.1);
}

.payment-card.selected {
    border-color: var(--primary);
    background: var(--light);
}

.payment-card .checkmark {
    position: absolute;
    top: -10px;
    left: -10px;
    background: var(--primary);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: all 0.3s;
}

.payment-card.selected .checkmark {
    opacity: 1;
}

.payment-logo {
    height: 30px;
    margin-left: 10px;
}

/* انیمیشن پرداخت */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.processing-payment {
    animation: pulse 1.5s infinite;
}

/* تب‌های نوع شغل */
.job-type-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.job-type-tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    font-weight: 500;
}

.job-type-tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

/* بخش‌های شرطی */
.conditional-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.conditional-section.active {
    display: block;
}

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

/* اعتبارسنجی آدرس */
.address-validation {
    background: var(--light);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    display: none;
}

.validation-success {
    color: #28a745;
}

.validation-error {
    color: var(--danger);
}

/* صفحه ورود */
.auth-container {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    transition: all 0.3s;
}

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.auth-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

.auth-logo {
    width: 70px;
    /*margin-bottom: 1rem;*/
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.captcha-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.captcha-code {
    letter-spacing: 3px;
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--dark);
}

.refresh-captcha {
    color: var(--primary);
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.3s;
}

.refresh-captcha:hover {
    transform: rotate(180deg);
}

.otp-input {
    letter-spacing: 5px;
    font-size: 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
}

/* صفحه تأیید */
.verification-card {
    text-align: center;
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.verification-icon {
    font-size: 80px;
    color: #28A745;
    margin-bottom: 20px;
}

.tracking-code {
    font-size: 1.5rem;
    letter-spacing: 3px;
    background: #F0F2FF;
    padding: 10px 20px;
    border-radius: 10px;
    display: inline-block;
}

/* نوتیفیکیشن‌ها */
.notification-card {
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
    border-right: 3px solid transparent;
}

.notification-card.unread {
    background: #F0F7FF;
    border-right-color: #6C63FF;
}

.notification-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.notification-time {
    font-size: 0.8rem;
    color: #6C63FF;
}

/* داشبورد کاربر */
.quick-access-btn {
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid #eee;
}

.quick-access-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.loan-status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.status-approved {
    background: #E3F7E8;
    color: #28A745;
}

/* فوتر */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}
