﻿
/* ==========================================
   کارت‌های متن (موقعیت، افکار، رفتار)
   ========================================== */

/* ===== کارت اصلی ===== */
.section-card {
    background: #ffffff;
    border-radius: 20px;
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 28px;
    overflow: hidden;
    position: relative;
}

    /* ===== خط گرادیانت بالای کارت ===== */
    .section-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: linear-gradient(90deg, #2A6CF0, #4A8AF4, #7C3AED, #2A6CF0);
        background-size: 300% 100%;
        animation: shimmerCard 4s ease-in-out infinite;
        z-index: 2;
    }

@keyframes shimmerCard {
    0% {
        background-position: -300% 0;
    }

    100% {
        background-position: 300% 0;
    }
}

/* ===== هاور کارت ===== */
.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(42, 108, 240, 0.10), 0 8px 24px rgba(0, 0, 0, 0.04);
}

/* ===== هدر کارت ===== */
.section-header {
    background: linear-gradient(135deg, #f8faff, #f1f5f9);
    padding: 18px 24px;
    border-bottom: 2px solid #f0f4f8;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.section-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.section-subtitle {
    font-size: 0.85rem;
    color: #64748b;
    margin-right: auto;
    font-weight: 400;
}

/* ===== بدنه کارت ===== */
.section-card .card-body {
    padding: 28px 24px;
}

/* ===== Textarea داخل کارت ===== */
.section-card textarea.form-control {
    width: 100%;
    min-height: 120px;
    padding: 18px 20px;
    font-size: 20px;
    line-height: 2;
    color: #0f172a;
    background: #fafcff;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    resize: vertical;
    font-family: inherit;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

    /* ===== فوکوس Textarea ===== */
    .section-card textarea.form-control:focus {
        border-color: #2A6CF0;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(42, 108, 240, 0.08), inset 0 2px 4px rgba(0, 0, 0, 0.02);
        outline: none;
    }

    /* ===== پلیس هولدر ===== */
    .section-card textarea.form-control::placeholder {
        color: #94a3b8;
        font-size: 17px;
        font-weight: 400;
    }

/* ==========================================
   کنترل‌های بزرگنمایی فونت
   ========================================== */

.font-controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f8fafc;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    margin: 16px auto 24px;
    width: fit-content;
    flex-wrap: wrap;
}

    .font-controls-wrapper .font-label {
        font-size: 0.85rem;
        font-weight: 600;
        color: #475569;
    }

    .font-controls-wrapper .font-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 2px solid #e2e8f0;
        background: #ffffff;
        color: #0f172a;
        font-size: 1.3rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .font-controls-wrapper .font-btn:hover {
            background: #2A6CF0;
            border-color: #2A6CF0;
            color: #ffffff;
            transform: scale(1.05);
            box-shadow: 0 4px 15px rgba(42, 108, 240, 0.25);
        }

        .font-controls-wrapper .font-btn:active {
            transform: scale(0.92);
        }

    .font-controls-wrapper .font-value {
        font-size: 1.1rem;
        font-weight: 700;
        color: #0f172a;
        min-width: 40px;
        text-align: center;
    }

    .font-controls-wrapper .font-reset {
        padding: 6px 18px;
        border: none;
        background: #e2e8f0;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        color: #475569;
        cursor: pointer;
        transition: all 0.3s ease;
    }

        .font-controls-wrapper .font-reset:hover {
            background: #cbd5e1;
            transform: scale(1.03);
        }

/* ==========================================
   حالت بزرگ‌نمایی (توسط کاربر)
   ========================================== */

body.font-large .section-card textarea.form-control {
    font-size: 22px !important;
    line-height: 2.2 !important;
}

body.font-large .section-title {
    font-size: 1.3rem !important;
}

body.font-large .section-subtitle {
    font-size: 0.95rem !important;
}

body.font-xlarge .section-card textarea.form-control {
    font-size: 26px !important;
    line-height: 2.4 !important;
}

/* ==========================================
   ریسپانسیو
   ========================================== */

@media (max-width: 768px) {
    .section-card .card-body {
        padding: 18px 16px;
    }

    .section-card textarea.form-control {
        min-height: 100px;
        padding: 14px 16px;
        font-size: 20px;
        border-radius: 14px;
    }

        .section-card textarea.form-control::placeholder {
            font-size: 15px;
        }

    .section-header {
        padding: 14px 16px;
        gap: 10px;
    }

    .section-title {
        font-size: 1rem;
    }

    .section-subtitle {
        font-size: 0.75rem;
        width: 100%;
        margin-right: 0;
    }

    .section-icon {
        font-size: 1.3rem;
    }

    .font-controls-wrapper {
        padding: 10px 16px;
        gap: 8px;
        border-radius: 40px;
    }

        .font-controls-wrapper .font-btn {
            width: 34px;
            height: 34px;
            font-size: 1.1rem;
        }

        .font-controls-wrapper .font-value {
            font-size: 1rem;
            min-width: 30px;
        }

    body.font-large .section-card textarea.form-control {
        font-size: 19px !important;
    }

    body.font-xlarge .section-card textarea.form-control {
        font-size: 22px !important;
    }
}

@media (max-width: 480px) {
    .section-card .card-body {
        padding: 14px 12px;
    }

    .section-card textarea.form-control {
        min-height: 80px;
        padding: 12px 14px;
        font-size: 15px;
        border-radius: 12px;
    }

        .section-card textarea.form-control::placeholder {
            font-size: 14px;
        }

    .section-header {
        padding: 12px 14px;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .font-controls-wrapper {
        padding: 8px 12px;
        gap: 6px;
        border-radius: 30px;
        width: 100%;
        justify-content: center;
    }

        .font-controls-wrapper .font-btn {
            width: 30px;
            height: 30px;
            font-size: 1rem;
        }

        .font-controls-wrapper .font-value {
            font-size: 0.9rem;
            min-width: 25px;
        }

        .font-controls-wrapper .font-reset {
            font-size: 0.7rem;
            padding: 4px 12px;
        }

    body.font-large .section-card textarea.form-control {
        font-size: 17px !important;
    }

    body.font-xlarge .section-card textarea.form-control {
        font-size: 20px !important;
    }
}

/* ==========================================
   کارت‌های احساس
   ========================================== */
.emotion-grid-wrapper {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #eef2f6;
}

.emotion-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.emotion-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    min-width: 44px;
    min-height: 44px;
    user-select: none;
    font-size: 20px;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Vazir', 'IRANSans', Tahoma, sans-serif;
}

    .emotion-card:hover {
        border-color: #2A6CF0;
        transform: scale(1.05);
        background: #f0f4ff;
    }

    .emotion-card.selected {
        border-color: #2A6CF0;
        background: #e8f0fe;
        box-shadow: 0 0 0 3px rgba(42,108,240,0.2);
    }

    .emotion-card .emotion-emoji {
        font-size: 20px;
        line-height: 1.4;
        display: inline-block;
        vertical-align: middle;
    }


/* ==========================================
   نمایش انتخاب‌ها
   ========================================== */
.emotion-selection-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid #eef2f6;
    height: 100%;
    transition: border-color 0.3s ease;
}

    .emotion-selection-box.selected {
        border-color: #2A6CF0;
    }

.selected-emotion-badge {
    font-size: 22px;
    line-height: 1;
    min-width: 40px;
    text-align: center;
    display: inline-block;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

    .selected-emotion-badge.selected {
        background: #e8f0fe;
        border-radius: 30px;
        padding: 0 8px;
    }


/* ==========================================
   Range Slider
   ========================================== */
.range-slider-container {
    padding: 4px 0;
}

    .range-slider-container .range-value {
        font-weight: 700;
        color: #2A6CF0;
        font-size: 16px;
        background: #e8f0fe;
        padding: 0 10px;
        border-radius: 20px;
        min-width: 24px;
        text-align: center;
    }

.range-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, #dbeafe, #2A6CF0);
    border-radius: 10px;
    outline: none;
    margin: 6px 0;
}

    .range-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #2A6CF0;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(42,108,240,0.3);
        transition: 0.2s;
    }

        .range-slider::-webkit-slider-thumb:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(42,108,240,0.4);
        }

    .range-slider::-moz-range-thumb {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #2A6CF0;
        cursor: pointer;
        border: none;
    }

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
}


/* ==========================================
   دکمه انتخاب مجدد
   ========================================== */
.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-reset:hover {
        background: #f1f5f9;
        border-color: #2A6CF0;
        color: #2A6CF0;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(42,108,240,0.15);
    }

    .btn-reset i {
        font-size: 14px;
    }

    .btn-reset:active {
        transform: scale(0.95);
    }


/* ==========================================
   کارت‌های مکان
   ========================================== */
.location-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px 0;
}

.location-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    font-size: 18px;
    min-width: 50px;
    min-height: 50px;
    user-select: none;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', 'Vazir', 'IRANSans', Tahoma, sans-serif;
}

    .location-card:hover {
        border-color: #2A6CF0;
        transform: scale(1.05);
        background: #f0f4ff;
    }

    .location-card.selected {
        border-color: #2A6CF0;
        background: #e8f0fe;
        box-shadow: 0 0 0 3px rgba(42,108,240,0.2);
    }

    .location-card .location-emoji {
        font-size: 20px;
        line-height: 1.4;
        display: inline-block;
        vertical-align: middle;
    }


/* ==========================================
   Toggle Switch
   ========================================== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        transition: 0.3s;
        border-radius: 50%;
    }

.switch input:checked + .slider {
    background-color: #2A6CF0;
}

    .switch input:checked + .slider:before {
        transform: translateX(22px);
    }

.switch input:focus + .slider {
    box-shadow: 0 0 1px #2A6CF0;
}

.slider.round {
    border-radius: 34px;
}

    .slider.round:before {
        border-radius: 50%;
    }


/* ==========================================
   بخش‌بندی کارت‌ها
   ========================================== */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 2px solid #eef2f6;
}

.section-icon {
    font-size: 1.5rem;
}

.section-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #0F172A;
    display: block;
    line-height: 1.3;
}

.section-subtitle {
    font-weight: 400;
    font-size: 0.85rem;
    color: #94a3b8;
    display: block;
    line-height: 1.3;
}

.section-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

    .section-card:hover {
        box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    }

.shadowed-textarea {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    width: 100%;
}

    .shadowed-textarea:focus {
        border-color: #2A6CF0;
        box-shadow: 0 0 0 4px rgba(42,108,240,0.08);
    }


/* ==========================================
   دکمه‌های شیشه‌ای
   ========================================== */
.btn-glass {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    color: #fff;
    white-space: nowrap;
}

.btn-glass-primary {
    background: rgba(42,108,240,0.25);
    border-color: rgba(42,108,240,0.3);
    color: #2A6CF0;
}

.btn-glass-success {
    background: rgba(34,197,94,0.25);
    border-color: rgba(34,197,94,0.3);
    color: #22c55e;
}

.btn-glass-purple {
    background: rgba(124,58,237,0.25);
    border-color: rgba(124,58,237,0.3);
    color: #7c3aed;
}

.btn-glass:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    background: rgba(255,255,255,0.25);
}

.btn-glass:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}


/* ==========================================
   دکمه بنفش
   ========================================== */
.btn-purple {
    background-color: #7c3aed;
    border-color: #7c3aed;
    color: #ffffff;
}

    .btn-purple:hover {
        background-color: #6d28d9;
        border-color: #6d28d9;
        color: #ffffff;
    }

    .btn-purple:disabled {
        background-color: #e5e7eb;
        border-color: #d1d5db;
        color: #9ca3af;
        opacity: 0.7;
        cursor: not-allowed;
    }

.btn-purple-dark {
    background-color: #5b21b6;
    border-color: #5b21b6;
    color: #ffffff;
}

    .btn-purple-dark:hover {
        background-color: #4c1d95;
        border-color: #4c1d95;
        color: #ffffff;
    }


/* ==========================================
   Badge
   ========================================== */
.bg-light.text-success {
    background: #dcfce7 !important;
    color: #16a34a !important;
}

.bg-light.text-purple {
    background: #f3e8ff !important;
    color: #6b21a8 !important;
}


/* ==========================================
   راهنمای سریع
   ========================================== */
.alert-info {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
}

    .alert-info .badge.bg-warning {
        background: #fef3c7 !important;
        color: #92400e !important;
    }


/* ==========================================
   ریسپانسیو
   ========================================== */
@media (max-width: 768px) {

    .emotion-grid {
        gap: 6px;
    }

    .emotion-card {
        padding: 6px 12px;
        font-size: 17px;
        min-width: 38px;
        min-height: 38px;
    }

        .emotion-card .emotion-emoji {
            font-size: 17px;
        }

    .emotion-selection-box {
        padding: 12px;
    }

    .selected-emotion-badge {
        font-size: 18px;
        min-width: 32px;
    }

    .range-slider-container .range-value {
        font-size: 14px;
    }

    .location-card {
        padding: 8px 14px;
        font-size: 16px;
        min-width: 44px;
        min-height: 44px;
    }

        .location-card .location-emoji {
            font-size: 16px;
        }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .section-subtitle {
        margin-right: 0;
    }

    .section-title {
        font-size: 15px;
    }

    .range-slider {
        height: 5px;
    }

        .range-slider::-webkit-slider-thumb {
            width: 18px;
            height: 18px;
        }

    .range-slider-container .range-value {
        font-size: 13px;
        padding: 0 8px;
    }

    .range-labels {
        font-size: 10px;
    }
}

@media (max-width: 480px) {

    .emotion-grid {
        gap: 4px;
    }

    .emotion-card {
        padding: 4px 10px;
        font-size: 15px;
        min-width: 34px;
        min-height: 34px;
        border-radius: 25px;
    }

        .emotion-card .emotion-emoji {
            font-size: 15px;
        }

    .selected-emotion-badge {
        font-size: 16px;
        min-width: 28px;
    }

    .location-card {
        padding: 6px 12px;
        font-size: 14px;
        min-width: 38px;
        min-height: 38px;
        border-radius: 25px;
    }

        .location-card .location-emoji {
            font-size: 14px;
        }

    .section-header {
        padding: 10px 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .section-title {
        font-size: 14px;
    }

    .section-subtitle {
        font-size: 11px;
    }

    .section-card .card-body {
        padding: 12px;
    }

    .emotion-selection-box {
        padding: 8px 10px;
    }

    .range-slider-container .range-value {
        font-size: 12px;
    }
}


.btn-outline-purple {
    color: #7c3aed;
    border-color: #7c3aed;
    background-color: transparent;
}

    .btn-outline-purple:hover {
        color: #fff;
        background-color: #7c3aed;
        border-color: #7c3aed;
    }

    .btn-outline-purple:disabled {
        color: #9ca3af;
        border-color: #9ca3af;
        cursor: not-allowed;
    }


/* ==========================================
   کارت‌های انتخاب تحلیل
   ========================================== */

.step-badge {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    border-radius: 50%;
    margin-bottom: 8px;
    background: #e2e8f0;
    color: #64748b;
}

.analysis-card {
    cursor: pointer;
    border: 3px solid #e2e8f0;
    border-radius: 16px;
    transition: all 0.3s ease;
    height: 100%;
    background: #ffffff;
}

    .analysis-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 30px rgba(0,0,0,0.08);
        border-color: #94a3b8;
    }

    .analysis-card.selected {
        border-color: #2A6CF0 !important;
        box-shadow: 0 0 0 4px rgba(42,108,240,0.15) !important;
    }

        .analysis-card.selected.card-quick-enabled {
            border-color: #22c55e !important;
            box-shadow: 0 0 0 4px rgba(34,197,94,0.15) !important;
        }

    .analysis-card .card-body {
        padding: 16px 12px;
    }

        .analysis-card .card-body small {
            font-size: 12px;
            line-height: 1.5;
        }

    .analysis-card .badge {
        font-size: 10px;
        padding: 3px 8px;
    }


    /* ==========================================
   کارت ثبت تجربه - مرحله اول
   ========================================== */
    .analysis-card.card-step-first {
        border-color: #2A6CF0 !important;
        background: linear-gradient(145deg,#dbeafe,#eff6ff) !important;
        border-width: 3px !important;
        box-shadow: 0 4px 20px rgba(42,108,240,0.25) !important;
        position: relative;
    }

        .analysis-card.card-step-first .step-badge {
            background: #2A6CF0 !important;
            color: #ffffff !important;
            box-shadow: 0 4px 12px rgba(42,108,240,0.3) !important;
        }

        .analysis-card.card-step-first::after {
            content: '★';
            position: absolute;
            top: -8px;
            right: -8px;
            background: #2A6CF0;
            color: white;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            box-shadow: 0 2px 8px rgba(42,108,240,0.4);
            z-index: 5;
        }

        .analysis-card.card-step-first:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 30px rgba(42,108,240,0.35) !important;
        }

        .analysis-card.card-step-first .card-body {
            color: #1e293b;
        }

        .analysis-card.card-step-first .badge.bg-primary {
            background: linear-gradient(145deg,#2A6CF0,#1a4fa8) !important;
        }


    /* ==========================================
   تحلیل فوری - غیرفعال
   ========================================== */
    .analysis-card.card-quick-disabled {
        opacity: 0.6;
        border-color: #e2e8f0;
        cursor: not-allowed !important;
    }

        .analysis-card.card-quick-disabled:hover {
            transform: none !important;
            box-shadow: none !important;
        }

        .analysis-card.card-quick-disabled .step-badge {
            background: #e2e8f0 !important;
            color: #94a3b8 !important;
            box-shadow: none !important;
        }


    /* ==========================================
   تحلیل فوری - فعال
   ========================================== */
    .analysis-card.card-quick-enabled {
        border-color: #22c55e;
        background: linear-gradient(145deg,#f0fdf4,#ffffff);
        cursor: pointer !important;
    }

        .analysis-card.card-quick-enabled .step-badge {
            background: #22c55e !important;
            color: #ffffff !important;
            box-shadow: 0 4px 12px rgba(34,197,94,0.3) !important;
        }

        .analysis-card.card-quick-enabled:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 30px rgba(34,197,94,0.2);
        }


/* ==========================================
   نشانگر مرحله
   ========================================== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.step-line {
    flex: 1;
    height: 2px;
    max-width: 30px;
    background: linear-gradient(90deg,#2A6CF0,#22c55e);
    border-radius: 2px;
}

.step-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #22c55e;
    color: #ffffff;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(34,197,94,0.3);
}


/* ==========================================
   وضعیت Badge
   ========================================== */
.status-badge {
    font-size: 10px !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

    .status-badge.status-locked {
        background: #e2e8f0 !important;
        color: #64748b !important;
    }

    .status-badge.status-ready {
        background: #dcfce7 !important;
        color: #16a34a !important;
    }

    .status-badge.status-loading {
        background: #fef3c7 !important;
        color: #d97706 !important;
    }


/* ==========================================
   ریسپانسیو کارت تحلیل
   ========================================== */
@media (max-width: 992px) {

    .analysis-card.card-step-first::after {
        display: none;
    }

    .step-arrow,
    .step-line {
        display: none;
    }
}

@media (max-width: 768px) {

    .analysis-card .card-body small {
        font-size: 11px;
    }

    .step-badge {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {

    .analysis-card .card-body {
        padding: 12px 8px;
    }

        .analysis-card .card-body small {
            font-size: 10px;
        }

    .step-badge {
        width: 20px;
        height: 20px;
        line-height: 20px;
        font-size: 10px;
    }

    .analysis-card .badge {
        font-size: 8px;
        padding: 2px 6px;
    }
}


/* ==========================================
   SweetAlert2
   ========================================== */

.swal2-popup {
    border-radius: 24px !important;
    padding: 0 !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.2) !important;
    background: #ffffff !important;
    overflow: hidden !important;
    max-width: 420px !important;
}

    .swal2-popup .swal2-header {
        padding: 30px 30px 10px !important;
        background: #ffffff !important;
    }

    .swal2-popup .swal2-title {
        font-size: 1.3rem !important;
        font-weight: 700 !important;
        color: #0F172A !important;
        padding: 0 !important;
        line-height: 1.5 !important;
    }

    .swal2-popup .swal2-html-container {
        font-size: 0.95rem !important;
        color: #475569 !important;
        padding: 5px 30px 20px !important;
        line-height: 1.7 !important;
    }

    .swal2-popup .swal2-actions {
        padding: 0 30px 30px !important;
        gap: 10px !important;
    }

    .swal2-popup .swal2-confirm {
        border-radius: 14px !important;
        padding: 14px 36px !important;
        font-weight: 600 !important;
        font-size: 0.9rem !important;
        transition: all 0.3s ease !important;
        background: linear-gradient(145deg,#2A6CF0,#1a4fa8) !important;
        box-shadow: 0 6px 20px rgba(42,108,240,0.35) !important;
        border: none !important;
        color: white !important;
    }

        .swal2-popup .swal2-confirm:hover {
            transform: translateY(-3px) !important;
            box-shadow: 0 10px 30px rgba(42,108,240,0.45) !important;
        }

        .swal2-popup .swal2-confirm:active {
            transform: scale(0.97) !important;
        }

    .swal2-popup .swal2-cancel {
        border-radius: 14px !important;
        padding: 14px 36px !important;
        font-weight: 600 !important;
        font-size: 0.9rem !important;
        transition: all 0.3s ease !important;
        background: #f1f5f9 !important;
        color: #64748b !important;
        border: 2px solid #e2e8f0 !important;
    }

        .swal2-popup .swal2-cancel:hover {
            background: #e2e8f0 !important;
            transform: translateY(-3px) !important;
        }

    .swal2-popup .swal2-icon {
        width: 72px !important;
        height: 72px !important;
        margin: 20px auto 5px !important;
        border-width: 4px !important;
    }

        .swal2-popup .swal2-icon .swal2-icon-content {
            font-size: 2.8rem !important;
        }

        .swal2-popup .swal2-icon.swal2-warning {
            border-color: #f59e0b !important;
            color: #f59e0b !important;
        }

            .swal2-popup .swal2-icon.swal2-warning .swal2-icon-content {
                color: #f59e0b !important;
            }

        .swal2-popup .swal2-icon.swal2-success {
            border-color: #22c55e !important;
            color: #22c55e !important;
        }

            .swal2-popup .swal2-icon.swal2-success .swal2-icon-content {
                color: #22c55e !important;
            }

            .swal2-popup .swal2-icon.swal2-success .swal2-success-ring {
                border-color: #22c55e !important;
            }

            .swal2-popup .swal2-icon.swal2-success [class^='swal2-success-line'] {
                background-color: #22c55e !important;
            }

        .swal2-popup .swal2-icon.swal2-error {
            border-color: #ef4444 !important;
            color: #ef4444 !important;
        }

            .swal2-popup .swal2-icon.swal2-error .swal2-icon-content {
                color: #ef4444 !important;
            }

            .swal2-popup .swal2-icon.swal2-error .swal2-x-mark {
                color: #ef4444 !important;
            }

        .swal2-popup .swal2-icon.swal2-info {
            border-color: #2A6CF0 !important;
            color: #2A6CF0 !important;
        }

            .swal2-popup .swal2-icon.swal2-info .swal2-icon-content {
                color: #2A6CF0 !important;
            }

    .swal2-popup .swal2-loader {
        border-color: #2A6CF0 !important;
        border-width: 4px !important;
        width: 60px !important;
        height: 60px !important;
    }

.swal2-popup {
    animation: modalSlideUp 0.5s cubic-bezier(0.34,1.56,0.64,1) !important;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(40px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.swal2-show {
    animation: modalFadeIn 0.4s ease !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.swal2-container {
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    background: rgba(15,23,42,0.5) !important;
}

@media (max-width: 480px) {

    .swal2-popup {
        max-width: 92% !important;
        border-radius: 18px !important;
    }

        .swal2-popup .swal2-title {
            font-size: 1.1rem !important;
        }

        .swal2-popup .swal2-html-container {
            font-size: 0.85rem !important;
            padding: 5px 20px 15px !important;
        }

        .swal2-popup .swal2-confirm,
        .swal2-popup .swal2-cancel {
            padding: 12px 24px !important;
            font-size: 0.8rem !important;
            border-radius: 12px !important;
        }

        .swal2-popup .swal2-icon {
            width: 56px !important;
            height: 56px !important;
            margin: 15px auto 5px !important;
        }

            .swal2-popup .swal2-icon .swal2-icon-content {
                font-size: 2rem !important;
            }

        .swal2-popup .swal2-header {
            padding: 20px 20px 5px !important;
        }

        .swal2-popup .swal2-actions {
            padding: 0 20px 20px !important;
            flex-direction: column !important;
        }

        .swal2-popup .swal2-confirm,
        .swal2-popup .swal2-cancel {
            width: 100% !important;
            justify-content: center !important;
        }
}


/* ==========================================================
   ساختار داخلی تحلیل
   ========================================================== */

.analysis-content {
    direction: rtl;
    text-align: right;
    color: #1e293b;
    font-size: 16px;
    line-height: 2;
}

    .analysis-content .analysis-main-title {
        font-size: 21px;
        font-weight: 800;
        color: #0f172a;
        margin: 5px 0 22px;
        padding: 12px 16px;
        background: #f8fafc;
        border-radius: 10px;
        border-right: 4px solid #f59e0b;
    }

    .analysis-content .analysis-section-title {
        font-size: 18px;
        font-weight: 800;
        color: #334155;
        margin: 28px 0 12px;
        padding: 10px 14px;
        background: #fff7ed;
        border-right: 4px solid #f59e0b;
        border-radius: 8px;
    }

    .analysis-content .analysis-paragraph {
        margin: 0 0 14px;
        line-height: 2.15;
    }

    .analysis-content strong {
        color: #0f172a;
        font-weight: 800;
    }

    .analysis-content .analysis-list {
        margin: 12px 0 20px;
        padding-right: 28px;
        line-height: 2.2;
    }

        .analysis-content .analysis-list li {
            margin-bottom: 8px;
            padding-right: 5px;
        }

    .analysis-content .analysis-divider {
        border: 0;
        border-top: 1px solid #e2e8f0;
        margin: 24px 0;
    }

    .analysis-content .analysis-spacing {
        height: 6px;
    }

@media (max-width: 768px) {

    .analysis-content .analysis-main-title {
        font-size: 19px;
    }

    .analysis-content .analysis-section-title {
        font-size: 17px;
    }
}

.analysis-result-card .card-body {
    max-height: 650px !important;
    overflow-y: auto;
}


/* ==========================================================
   کنترل اندازه فونت تحلیل
   ========================================================== */

.analysis-font-controls {
    direction: rtl;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    margin: 15px auto;
    padding: 8px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 14px;
}

.font-size-title {
    color: #475569;
    font-weight: 600;
}

.font-size-value {
    min-width: 35px;
    text-align: center;
    font-weight: 700;
    color: #0f172a;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 5px 8px;
}

.font-size-unit {
    color: #64748b;
    font-size: 12px;
}

.font-size-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
}

    .font-size-btn:hover {
        background: #f59e0b;
        border-color: #f59e0b;
        color: #ffffff;
        transform: translateY(-1px);
    }

    .font-size-btn:active {
        transform: scale(0.95);
    }

.font-size-reset {
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

    .font-size-reset:hover {
        background: #e2e8f0;
        color: #0f172a;
    }

@media (max-width: 600px) {

    .analysis-font-controls {
        width: calc(100% - 20px);
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .font-size-title {
        width: 100%;
        text-align: center;
        margin-bottom: 3px;
    }
}


/* ==========================================================
   تحلیل فوری - تم سبز
   ========================================================== */

.analysis-result-card.quick-analysis {
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
}

    .analysis-result-card.quick-analysis .analysis-header {
        background: linear-gradient(145deg,#16a34a,#15803d) !important;
        color: #ffffff !important;
        padding: 18px 22px !important;
        border: none !important;
    }

        .analysis-result-card.quick-analysis .analysis-header h3,
        .analysis-result-card.quick-analysis .analysis-header h4,
        .analysis-result-card.quick-analysis .analysis-header .analysis-title {
            color: #ffffff !important;
            font-weight: 800 !important;
            margin: 0 !important;
        }

        .analysis-result-card.quick-analysis .analysis-header i,
        .analysis-result-card.quick-analysis .analysis-header svg {
            color: #ffffff !important;
        }

    .analysis-result-card.quick-analysis .analysis-content {
        direction: rtl;
        text-align: right;
        color: #1e293b;
        font-size: 16px;
        line-height: 2;
        padding: 20px;
    }

    .analysis-result-card.quick-analysis .analysis-main-title {
        font-size: 21px !important;
        font-weight: 800 !important;
        color: #166534 !important;
        margin: 5px 0 22px !important;
        padding: 12px 16px !important;
        background: #f0fdf4 !important;
        border: none !important;
        border-right: 4px solid #22c55e !important;
        border-radius: 10px !important;
    }

    .analysis-result-card.quick-analysis .analysis-section-title {
        font-size: 18px !important;
        font-weight: 800 !important;
        color: #166534 !important;
        margin: 28px 0 12px !important;
        padding: 10px 14px !important;
        background: #f0fdf4 !important;
        border: none !important;
        border-right: 4px solid #22c55e !important;
        border-radius: 8px !important;
    }

    .analysis-result-card.quick-analysis .key-points,
    .analysis-result-card.quick-analysis .key-points-box,
    .analysis-result-card.quick-analysis .analysis-key-points {
        background: #f0fdf4 !important;
        border: 1px solid #bbf7d0 !important;
        border-right: 4px solid #22c55e !important;
        border-radius: 12px !important;
        padding: 16px 18px !important;
        margin: 18px 0 !important;
        color: #166534 !important;
    }

    .analysis-result-card.quick-analysis .key-points-title,
    .analysis-result-card.quick-analysis .analysis-key-points-title {
        color: #15803d !important;
        font-weight: 800 !important;
    }

    .analysis-result-card.quick-analysis .key-points ul,
    .analysis-result-card.quick-analysis .analysis-key-points ul {
        margin: 8px 0 0 !important;
        padding-right: 22px !important;
    }

    .analysis-result-card.quick-analysis .analysis-paragraph {
        margin: 0 0 14px !important;
        line-height: 2.15 !important;
    }

    .analysis-result-card.quick-analysis .analysis-content strong {
        color: #166534 !important;
        font-weight: 800 !important;
    }

    .analysis-result-card.quick-analysis .analysis-list {
        margin: 12px 0 20px !important;
        padding-right: 28px !important;
        line-height: 2.2 !important;
    }

        .analysis-result-card.quick-analysis .analysis-list li {
            margin-bottom: 8px !important;
            padding-right: 5px !important;
        }

    .analysis-result-card.quick-analysis .analysis-divider {
        border: 0 !important;
        border-top: 1px solid #bbf7d0 !important;
        margin: 24px 0 !important;
    }

    .analysis-result-card.quick-analysis .analysis-content h1,
    .analysis-result-card.quick-analysis .analysis-content h2,
    .analysis-result-card.quick-analysis .analysis-content h3,
    .analysis-result-card.quick-analysis .analysis-content h4 {
        color: #166534 !important;
        font-weight: 800 !important;
        margin: 24px 0 12px !important;
    }

    .analysis-result-card.quick-analysis .analysis-content {
        white-space: normal;
    }

    .analysis-result-card.quick-analysis .highlight,
    .analysis-result-card.quick-analysis .analysis-highlight {
        background: #f0fdf4 !important;
        border-right: 4px solid #22c55e !important;
        border-radius: 10px !important;
        padding: 12px 16px !important;
        margin: 14px 0 !important;
        color: #166534 !important;
    }

    .analysis-result-card.quick-analysis .badge-success,
    .analysis-result-card.quick-analysis .bg-success {
        background: #dcfce7 !important;
        color: #15803d !important;
    }

    .analysis-result-card.quick-analysis .card-body {
        max-height: 650px !important;
        overflow-y: auto !important;
    }

        .analysis-result-card.quick-analysis .card-body::-webkit-scrollbar {
            width: 6px;
        }

        .analysis-result-card.quick-analysis .card-body::-webkit-scrollbar-track {
            background: #f8fafc;
            border-radius: 10px;
        }

        .analysis-result-card.quick-analysis .card-body::-webkit-scrollbar-thumb {
            background: #86efac;
            border-radius: 10px;
        }

            .analysis-result-card.quick-analysis .card-body::-webkit-scrollbar-thumb:hover {
                background: #22c55e;
            }

@media (max-width: 768px) {

    .analysis-result-card.quick-analysis .analysis-content {
        font-size: 15px !important;
        padding: 14px !important;
    }

    .analysis-result-card.quick-analysis .analysis-main-title {
        font-size: 19px !important;
    }

    .analysis-result-card.quick-analysis .analysis-section-title {
        font-size: 17px !important;
    }

    .analysis-result-card.quick-analysis .key-points,
    .analysis-result-card.quick-analysis .key-points-box,
    .analysis-result-card.quick-analysis .analysis-key-points {
        padding: 13px 14px !important;
    }
}

@media (max-width: 480px) {

    .analysis-result-card.quick-analysis {
        border-radius: 12px !important;
    }

        .analysis-result-card.quick-analysis .analysis-content {
            font-size: 14px !important;
            line-height: 1.9 !important;
            padding: 12px !important;
        }

        .analysis-result-card.quick-analysis .analysis-main-title {
            font-size: 17px !important;
            padding: 10px 12px !important;
        }

        .analysis-result-card.quick-analysis .analysis-section-title {
            font-size: 15px !important;
            padding: 9px 11px !important;
        }
}


/* ==========================================================
   هایلایت تحلیل فوری
   ========================================================== */

#resultContainer .quick-analysis .analysis-main-title {
    background: #f0fdf4 !important;
    border-right: 4px solid #86efac !important;
    color: #166534 !important;
}

#resultContainer .quick-analysis .analysis-section-title {
    background: #f0fdf4 !important;
    border-right: 4px solid #86efac !important;
    color: #166534 !important;
}


/* ==========================================
   مخفی کردن چک‌بکس ارسال به تراپیست
   ========================================== */

#sendToTherapistCheckbox,
.send-to-therapist-checkbox,
input[name="SendToTherapist"] {
    display: none !important;
}


/* ==========================================================
   آخرین تجربه ثبت‌شده
   نسخه اصلاح‌شده و تمیز
   ========================================================== */

.last-record-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(15,23,42,0.05);
    margin-bottom: 25px;
    transition: all 0.25s ease;
}

    .last-record-card:hover {
        box-shadow: 0 8px 26px rgba(42,108,240,0.08);
    }


/* ==========================================
   Header
   ========================================== */

.last-record-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 17px 20px;
    background: linear-gradient(135deg,#f8fbff 0%,#f1f6ff 100%);
    border-bottom: 1px solid #e5edf9;
}

.last-record-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

    .last-record-title h5 {
        margin: 0;
        color: #0f172a;
        font-size: 16px;
        font-weight: 800;
    }

    .last-record-title span {
        display: block;
        margin-top: 3px;
        color: #64748b;
        font-size: 11px;
    }


/* ==========================================
   آیکون
   ========================================== */

.last-record-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #e8f0ff;
    color: #2a6cf0;
    font-size: 17px;
    box-shadow: inset 0 0 0 1px rgba(42,108,240,0.08);
}


/* ==========================================
   Badge
   ========================================== */

.last-record-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 30px;
    background: #ecfdf5;
    color: #15803d;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
}

    .last-record-badge i {
        font-size: 10px;
    }


/* ==========================================
   Body
   ========================================== */

.last-record-body {
    padding: 18px 20px 20px;
    background: #ffffff;
}


/* ==========================================================
   Wrapper محتوای آخرین نتیجه
   ========================================================== */

.last-record-content-wrapper {
    position: relative;
    width: 100%;
}


/* ==========================================================
   محتوای آخرین نتیجه
   ========================================================== */

.last-record-content {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 17px 58px 17px 18px;
    background: #f8fafc;
    border: 1px solid #e7edf5;
    border-right: 4px solid #2a6cf0;
    border-radius: 12px;
    color: #334155;
    font-size: 14px;
    line-height: 2;
    text-align: right;
    direction: rtl;
    transition: filter 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}


    /* ==========================================
   جلوگیری از به‌هم‌ریختگی HTML
   ========================================== */

    .last-record-content p {
        margin: 0 0 8px;
    }

        .last-record-content p:last-child {
            margin-bottom: 0;
        }

    .last-record-content strong {
        color: #0f172a;
        font-weight: 700;
    }

    .last-record-content ul,
    .last-record-content ol {
        margin-top: 8px;
        margin-bottom: 8px;
        padding-right: 25px;
    }


/* ==========================================================
   Privacy Blur
   ========================================================== */

.last-record-content-wrapper {
    position: relative;
    width: 100%;
}

/* حالت پیش‌فرض: متن تار */
.last-record-content.blurred {
    filter: blur(7px) !important;
    opacity: 0.75;
    user-select: none;
    cursor: default;
    pointer-events: none;
    transition: filter 0.35s ease, opacity 0.35s ease;
}

/* حالت نمایش متن */
.last-record-content.visible {
    filter: blur(0) !important;
    opacity: 1;
    user-select: text;
    cursor: default;
    pointer-events: auto;
    transition: filter 0.35s ease, opacity 0.35s ease;
}


/* ==========================================================
   فاصله و لیست داخل آخرین نتیجه
   ========================================================== */

.last-record-content .analysis-spacing {
    height: 12px;
}

.last-record-content .analysis-list {
    margin: 8px 0 12px;
    padding-right: 25px;
    list-style-type: disc;
}

    .last-record-content .analysis-list li {
        margin-bottom: 6px;
        line-height: 1.8;
    }

.last-record-content .analysis-paragraph {
    margin-bottom: 10px;
    line-height: 2;
}


/* ==========================================================
   عنوان اصلی
   ========================================================== */

.last-record-content .analysis-main-title {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    margin: 16px 0 12px !important;
    padding: 8px 14px !important;
    background: #dbeafe !important;
    border: none !important;
    border-right: 4px solid #2563eb !important;
    border-radius: 8px !important;
}


/* ==========================================================
   عنوان بخش
   ========================================================== */

.last-record-content .analysis-section-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 14px 0 10px !important;
    padding: 6px 12px !important;
    background: #dbeafe !important;
    border: none !important;
    border-right: 4px solid #2563eb !important;
    border-radius: 6px !important;
}


/* ==========================================================
   عنوان سطح چهارم
   ========================================================== */

.last-record-content .analysis-sub-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 12px 0 8px !important;
    padding: 5px 10px !important;
    background: #eff6ff !important;
    border: none !important;
    border-right: 3px solid #60a5fa !important;
    border-radius: 4px !important;
}


/* ==========================================================
   دکمه نمایش / مخفی کردن
   ========================================================== */

.last-result-toggle {
    position: absolute;
    /* جای دکمه */
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe3ee;
    border-radius: 50%;
    background: #ffffff;
    color: #64748b;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
    z-index: 20;
}


    /* ==========================================================
   آیکون داخل دکمه
   ========================================================== */

    .last-result-toggle i {
        font-size: 16px;
        line-height: 1;
        pointer-events: none;
    }


    /* ==========================================================
   Hover
   ========================================================== */

    .last-result-toggle:hover {
        background: #eff6ff;
        color: #2563eb;
        border-color: #bfdbfe;
        transform: translateY(-50%) scale(1.06);
        box-shadow: 0 4px 10px rgba(37, 99, 235, 0.14);
    }


    /* ==========================================================
   کلیک
   ========================================================== */

    .last-result-toggle:active {
        transform: translateY(-50%) scale(0.94);
    }


/* ==========================================================
   وقتی محتوا نمایش داده شده
   ========================================================== */

.last-record-content-wrapper.is-visible .last-result-toggle {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}


/* ==========================================================
   حالت نمایش محتوا
   ========================================================== */

.last-record-content.visible {
    background: #ffffff;
}


/* ==========================================================
   موبایل
   ========================================================== */

@media (max-width: 768px) {

    .last-record-header {
        padding: 14px 15px;
    }

    .last-record-body {
        padding: 15px;
    }

    .last-record-title {
        gap: 9px;
    }

        .last-record-title h5 {
            font-size: 14px;
        }

        .last-record-title span {
            font-size: 10px;
        }

    .last-record-icon {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .last-record-badge {
        font-size: 9px;
        padding: 4px 8px;
    }

    .last-record-content {
        padding: 15px 54px 15px 14px;
        font-size: 13px;
        line-height: 1.9;
    }

    .last-result-toggle {
        right: 10px;
        width: 34px;
        height: 34px;
    }

        .last-result-toggle i {
            font-size: 15px;
        }

    .last-record-content.blurred {
        filter: blur(6px) !important;
    }
}


/* ==========================================================
   موبایل کوچک
   ========================================================== */

@media (max-width: 480px) {

    .last-record-card {
        border-radius: 14px;
    }

    .last-record-header {
        padding: 12px;
    }

    .last-record-body {
        padding: 12px;
    }

    .last-record-title {
        gap: 8px;
    }

        .last-record-title h5 {
            font-size: 13px;
        }

        .last-record-title span {
            font-size: 9px;
        }

    .last-record-icon {
        width: 35px;
        height: 35px;
        border-radius: 9px;
        font-size: 14px;
    }

    .last-record-badge {
        font-size: 8px;
        padding: 4px 7px;
    }

    .last-record-content {
        padding: 14px 50px 14px 12px;
        font-size: 12px;
        line-height: 1.85;
        border-radius: 10px;
    }

    .last-result-toggle {
        right: 8px;
        width: 32px;
        height: 32px;
    }

        .last-result-toggle i {
            font-size: 14px;
        }

    .last-record-content .analysis-main-title {
        font-size: 15px !important;
        margin: 13px 0 10px !important;
        padding: 7px 11px !important;
    }

    .last-record-content .analysis-section-title {
        font-size: 13px !important;
        margin: 12px 0 8px !important;
        padding: 5px 9px !important;
    }

    .last-record-content .analysis-sub-title {
        font-size: 12px !important;
        margin: 10px 0 7px !important;
        padding: 4px 8px !important;
    }
}

 
/* ==========================================
   قدم‌شمار افقی - Sticky + Responsive
   ========================================== */

.horizontal-steps-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #eef2f6;
    margin-bottom: 20px;
    /* ====== STICKY - بهبود برای موبایل ====== */
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 9999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.97);
    transition: all 0.3s ease;
    width: 100%;
    /* ✅ رفع مشکل موبایل */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

    /* سایه بیشتر وقتی اسکرول می‌شه */
    .horizontal-steps-wrapper.is-sticky {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
        border-color: #2A6CF0;
        background: rgba(255, 255, 255, 0.99);
    }

.horizontal-steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

    .horizontal-steps-header .steps-title {
        font-weight: 700;
        font-size: 15px;
        color: #0F172A;
    }

    .horizontal-steps-header .steps-progress {
        font-size: 13px;
        color: #64748b;
        font-weight: 500;
    }

        .horizontal-steps-header .steps-progress #completedSteps {
            color: #2A6CF0;
            font-weight: 800;
        }

.horizontal-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 4px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 2px;
}

    .horizontal-steps::-webkit-scrollbar {
        display: none;
    }

.h-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 0 auto;
    position: relative;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.4s ease;
    min-width: 44px;
    padding: 0 2px;
}

    .h-step-item.active {
        opacity: 1;
    }

    .h-step-item.completed {
        opacity: 0.85;
    }

.h-step-line {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.h-step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f8fafc;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #94a3b8;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.h-step-item.active .h-step-circle {
    background: #2A6CF0;
    border-color: #2A6CF0;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(42, 108, 240, 0.35);
    transform: scale(1.05);
}

.h-step-item.completed .h-step-circle {
    background: #22c55e;
    border-color: #22c55e;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.h-step-number {
    display: block;
}

.h-step-check {
    display: none;
}

.h-step-item.completed .h-step-number {
    display: none;
}

.h-step-item.completed .h-step-check {
    display: block;
}

/* ====== کانکتور (خط بین دایره‌ها) ====== */
.h-step-connector {
    flex: 1;
    height: 3px;
    background: #e2e8f0;
    margin: 0 2px;
    transition: background 0.4s ease;
    border-radius: 4px;
    min-width: 6px;
}

.h-step-item.completed .h-step-connector {
    background: #22c55e;
}

.h-step-item.active .h-step-connector {
    background: #2A6CF0;
}

.h-step-item:last-child .h-step-connector {
    display: none;
}

.h-step-content {
    text-align: center;
    margin-top: 6px;
    min-width: 0;
}

.h-step-title {
    display: block;
    font-weight: 600;
    font-size: 12px;
    color: #94a3b8;
    transition: color 0.3s;
    white-space: nowrap;
}

.h-step-item.active .h-step-title {
    color: #2A6CF0;
}

.h-step-item.completed .h-step-title {
    color: #22c55e;
}

.h-step-desc {
    display: block;
    font-size: 10px;
    color: #cbd5e1;
    font-weight: 400;
    white-space: nowrap;
}

.h-step-item.active .h-step-desc {
    color: #94a3b8;
}

.h-step-item.completed .h-step-desc {
    color: #94a3b8;
}

/* دکمه‌های ناوبری */
.h-step-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #f1f5f9;
}

.h-btn-step-prev,
.h-btn-step-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 20px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .h-btn-step-prev:hover:not(:disabled),
    .h-btn-step-next:hover:not(:disabled) {
        background: #f8fafc;
        border-color: #2A6CF0;
        color: #2A6CF0;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(42, 108, 240, 0.1);
    }

    .h-btn-step-prev:disabled,
    .h-btn-step-next:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

.h-btn-step-next {
    background: #2A6CF0;
    border-color: #2A6CF0;
    color: #ffffff;
}

    .h-btn-step-next:hover:not(:disabled) {
        background: #1a4fa8;
        border-color: #1a4fa8;
        color: #ffffff;
    }

/* ==========================================
   ریسپانسیو - تبلت
   ========================================== */
@media (max-width: 992px) {
    .horizontal-steps-wrapper {
        padding: 14px 16px;
        top: 0;
    }

    .h-step-circle {
        width: 38px;
        height: 38px;
        font-size: 13px;
        border-width: 2.5px;
    }

    .h-step-title {
        font-size: 11px;
    }

    .h-step-desc {
        font-size: 9px;
    }

    .h-btn-step-prev,
    .h-btn-step-next {
        font-size: 12px;
        padding: 6px 14px;
    }

    .horizontal-steps-header .steps-title {
        font-size: 14px;
    }

    .horizontal-steps-header .steps-progress {
        font-size: 12px;
    }

    .h-step-connector {
        height: 2.5px;
        margin: 0 2px;
        min-width: 5px;
    }
}

/* ==========================================
   ریسپانسیو - موبایل (بهبود یافته)
   ========================================== */
@media (max-width: 768px) {
    .horizontal-steps-wrapper {
        padding: 10px 8px;
        border-radius: 12px;
        top: 0;
        margin-bottom: 12px;
        /* ✅ تقویت sticky برای موبایل */
        position: -webkit-sticky;
        position: sticky;
        z-index: 9999;
        background: rgba(255, 255, 255, 0.99);
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        border: 1px solid #eef2f6;
        /* ✅ رفع مشکل موبایل */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }

        /* اطمینان از sticky بودن در موبایل */
        .horizontal-steps-wrapper.is-sticky {
            box-shadow: 0 4px 25px rgba(0, 0, 0, 0.15);
            border-color: #2A6CF0;
            background: rgba(255, 255, 255, 0.995);
            padding: 8px 8px;
        }

    /* مخفی کردن توضیحات در موبایل */
    .h-step-desc {
        display: none;
    }

    .h-step-circle {
        width: 30px;
        height: 30px;
        font-size: 10px;
        border-width: 2px;
    }

    .h-step-title {
        font-size: 8px;
        white-space: nowrap;
    }

    .h-step-connector {
        height: 2px;
        margin: 0 1px;
        min-width: 4px;
    }

    .h-step-content {
        margin-top: 3px;
    }

    .h-btn-step-prev,
    .h-btn-step-next {
        font-size: 10px;
        padding: 4px 10px;
        gap: 4px;
        border-radius: 8px;
    }

    .horizontal-steps-header {
        margin-bottom: 6px;
        padding-bottom: 6px;
    }

        .horizontal-steps-header .steps-title {
            font-size: 11px;
        }

        .horizontal-steps-header .steps-progress {
            font-size: 10px;
        }

    .h-step-navigation {
        margin-top: 8px;
        padding-top: 8px;
        gap: 6px;
    }

    .h-btn-step-prev i,
    .h-btn-step-next i {
        font-size: 10px;
    }

    .horizontal-steps {
        padding: 2px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 1px;
    }

    .h-step-item {
        min-width: 36px;
        flex: 1 0 auto;
        padding: 0 1px;
    }
}

/* ==========================================
   موبایل خیلی کوچک (تا 400px)
   ========================================== */
@media (max-width: 400px) {
    .h-step-circle {
        width: 26px;
        height: 26px;
        font-size: 8px;
        border-width: 1.5px;
    }

    .h-step-title {
        font-size: 7px;
    }

    .h-step-connector {
        height: 1.5px;
        margin: 0 1px;
        min-width: 3px;
    }

    .horizontal-steps-wrapper {
        padding: 6px 4px;
        border-radius: 10px;
        top: 0;
    }

        .horizontal-steps-wrapper.is-sticky {
            padding: 5px 4px;
        }

    .horizontal-steps-header .steps-title {
        font-size: 10px;
    }

    .horizontal-steps-header .steps-progress {
        font-size: 9px;
    }

    .h-btn-step-prev,
    .h-btn-step-next {
        font-size: 9px;
        padding: 3px 8px;
    }

    .h-step-navigation {
        gap: 4px;
    }

    .h-step-item {
        min-width: 30px;
    }
}
/* ==========================================
   دکمه‌های استپ (قبلی و بعدی)
   ========================================== */
/* ==========================================
   دکمه‌های استپ (قبلی و بعدی)
   ========================================== */

.h-step-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f4f8;
}

.h-btn-step-prev,
.h-btn-step-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #475569;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

/* ===== دکمه قبلی ===== */
.h-btn-step-prev {
    background: #ffffff;
    color: #475569;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

    .h-btn-step-prev i {
        font-size: 1.1rem;
        color: #94a3b8;
        transition: all 0.3s ease;
    }

    .h-btn-step-prev span {
        transition: all 0.3s ease;
    }

    .h-btn-step-prev:hover:not(:disabled) {
        background: #f8faff;
        border-color: #2A6CF0;
        color: #2A6CF0;
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(42, 108, 240, 0.12);
    }

        .h-btn-step-prev:hover:not(:disabled) i {
            color: #2A6CF0;
            transform: translateX(-4px);
        }

        .h-btn-step-prev:hover:not(:disabled) span {
            transform: translateX(-2px);
        }

    .h-btn-step-prev:disabled {
        opacity: 0.35;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

        .h-btn-step-prev:disabled i {
            color: #cbd5e1;
        }

/* ===== دکمه بعدی ===== */
.h-btn-step-next {
    background: linear-gradient(135deg, #2A6CF0, #4A8AF4);
    color: #ffffff;
    border-color: #2A6CF0;
    box-shadow: 0 4px 15px rgba(42, 108, 240, 0.3);
}

    .h-btn-step-next i {
        font-size: 1.1rem;
        color: #ffffff;
        transition: all 0.3s ease;
    }

    .h-btn-step-next span {
        transition: all 0.3s ease;
    }

    .h-btn-step-next:hover {
        background: linear-gradient(135deg, #1a56d6, #2A6CF0);
        border-color: #1a56d6;
        transform: translateY(-3px);
        box-shadow: 0 8px 30px rgba(42, 108, 240, 0.4);
    }

        .h-btn-step-next:hover i {
            transform: translateX(4px);
        }

        .h-btn-step-next:hover span {
            transform: translateX(2px);
        }

    .h-btn-step-next:active {
        transform: scale(0.96) !important;
        box-shadow: 0 2px 10px rgba(42, 108, 240, 0.2);
    }

    /* ==========================================
   افکت موج (Ripple) برای دکمه بعدی
   ========================================== */
    .h-btn-step-next::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
        opacity: 0;
        transition: opacity 0.3s ease;
        border-radius: 50px;
        pointer-events: none;
    }

    .h-btn-step-next:hover::after {
        opacity: 1;
    }

/* ==========================================
   ریسپانسیو برای موبایل
   ========================================== */
@media (max-width: 768px) {
    .h-step-navigation {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding-top: 16px;
    }

    .h-btn-step-prev,
    .h-btn-step-next {
        padding: 10px 24px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

        .h-btn-step-prev i,
        .h-btn-step-next i {
            font-size: 1rem;
        }
}

@media (max-width: 480px) {
    .h-step-navigation {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .h-btn-step-prev,
    .h-btn-step-next {
        width: 100%;
        min-width: unset;
        padding: 12px 20px;
        justify-content: center;
        font-size: 0.95rem;
    }
}

.edit-icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #94a3b8;
    margin-right: auto;
}

    .edit-icon-btn:hover {
        background: #f1f5f9;
        color: #2A6CF0;
        transform: scale(1.05);
    }

    .edit-icon-btn:active {
        transform: scale(0.9);
    }

 