/* استایل‌های اصلی پلاگین نوتریپل بالینی - نسخه گرافیکی و جذاب */
:root {
    --calorito-primary: #2E7D32;
    --calorito-primary-dark: #1B5E20;
    --calorito-secondary: #4CAF50;
    --calorito-light: #E8F5E9;
    --calorito-lighter: #F1F8E9;
    --calorito-text: #212121;
    --calorito-light-text: #757575;
    --calorito-border: #C8E6C9;
    --calorito-error: #E53935;
    --calorito-success: #43A047;
    --calorito-warning: #FB8C00;
    --calorito-gradient: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    --calorito-shadow: 0 4px 20px rgba(46, 125, 50, 0.15);
    --calorito-shadow-hover: 0 8px 30px rgba(46, 125, 50, 0.25);
}

/* استایل‌های فرم */
.calorito-form-container {
    background: linear-gradient(180deg, var(--calorito-light) 0%, var(--calorito-lighter) 100%);
    border-radius: 20px;
    padding: 35px;
    margin: 20px 0;
    box-shadow: var(--calorito-shadow);
    direction: rtl;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--calorito-border);
}

.calorito-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--calorito-gradient);
}

.calorito-form-title {
    color: var(--calorito-primary);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    display: inline-block;
    width: 100%;
}

.calorito-form-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--calorito-gradient);
    margin: 12px auto 0;
    border-radius: 2px;
}

.calorito-form-description {
    color: var(--calorito-text);
    font-size: 15px;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.8;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 12px;
    border: 1px dashed var(--calorito-border);
}

.calorito-form-description strong {
    color: var(--calorito-primary);
    font-size: 17px;
}

.calorito-form-group {
    margin-bottom: 25px;
}

.calorito-form-label {
    display: block;
    color: var(--calorito-primary);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 17px;
    position: relative;
    padding-right: 15px;
}

.calorito-form-label::before {
    content: '📝';
    position: absolute;
    right: -5px;
    top: 0;
}

.calorito-form-textarea {
    width: 100%;
    min-height: 180px;
    padding: 18px;
    border: 2px solid var(--calorito-border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    background: white;
    line-height: 1.6;
}

.calorito-form-textarea:focus {
    border-color: var(--calorito-secondary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}

.calorito-form-textarea::placeholder {
    color: #9E9E9E;
    font-style: italic;
}

.calorito-form-button {
    background: var(--calorito-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 30px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.calorito-form-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.calorito-form-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--calorito-shadow-hover);
}

.calorito-form-button:hover::before {
    left: 100%;
}

.calorito-form-button:active {
    transform: translateY(-1px);
}

.calorito-form-button:disabled {
    background: #BDBDBD;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* استایل دکمه در حالت شمارش معکوس */
.calorito-form-button.calorito-cooldown {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    animation: cooldown-pulse 1s ease-in-out infinite;
}

@keyframes cooldown-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.calorito-countdown-icon {
    display: inline-block;
    margin-left: 8px;
    animation: countdown-rotate 1s linear infinite;
}

@keyframes countdown-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.calorito-countdown-text {
    font-size: 15px;
    font-weight: 600;
}

/* ============================================================
 * استایل باکس لودینگ حرفه‌ای (نسخه ۳.۹.۱۳)
 * ============================================================ */

.calorito-loading {
    display: none;
    margin: 30px 0;
    animation: caloritoFadeIn 0.4s ease;
}

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

.calorito-loading-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFCFA 100%);
    border: 2px solid var(--calorito-border, #C8E6C9);
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 10px 40px rgba(46, 125, 50, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

/* نوار رنگی بالای کارت */
.calorito-loading-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2E7D32, #4CAF50, #66BB6A, #4CAF50, #2E7D32);
    background-size: 200% 100%;
    animation: caloritoShimmer 2s linear infinite;
}

@keyframes caloritoShimmer {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* هدر باکس لودینگ */
.calorito-loading-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.calorito-loading-icon-wrap {
    position: relative;
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calorito-loading-svg {
    width: 70px;
    height: 70px;
    transform: rotate(-90deg);
}

.calorito-loading-svg-bg {
    stroke: #E8F5E9;
    opacity: 0.5;
}

.calorito-loading-svg-progress {
    stroke: var(--calorito-primary, #2E7D32);
    stroke-linecap: round;
    stroke-dasharray: 125.6;
    stroke-dashoffset: 125.6;
    transition: stroke-dashoffset 0.6s ease;
}

.calorito-loading-percent {
    position: absolute;
    font-size: 18px;
    font-weight: 700;
    color: var(--calorito-primary-dark, #1B5E20);
}

.calorito-loading-title-wrap {
    flex: 1;
}

.calorito-loading-title {
    font-size: 20px;
    font-weight: 700;
    color: #1B5E20;
    margin-bottom: 4px;
    line-height: 1.4;
}

.calorito-loading-eta {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* مراحل پردازش */
.calorito-loading-stages {
    background: #F8FBF8;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 18px;
    border: 1px solid #E8F5E9;
}

.calorito-stage {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: #999;
    font-size: 14px;
    transition: all 0.4s ease;
    opacity: 0.5;
}

.calorito-stage + .calorito-stage {
    border-top: 1px dashed #E0E0E0;
}

.calorito-stage-icon {
    font-size: 18px;
    line-height: 1;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.calorito-stage-text {
    flex: 1;
}

/* مرحله فعال */
.calorito-stage.is-active {
    color: #1B5E20;
    opacity: 1;
    font-weight: 600;
}

.calorito-stage.is-active .calorito-stage-icon {
    animation: caloritoPulse 1.2s ease-in-out infinite;
}

@keyframes caloritoPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}

/* مرحله تکمیل شده */
.calorito-stage.is-done {
    color: #2E7D32;
    opacity: 1;
}

.calorito-stage.is-done .calorito-stage-icon::after {
    content: ' ✓';
    color: #2E7D32;
}

/* تایمر */
.calorito-loading-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: #FFF8E1;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px solid #FFE082;
    font-size: 13px;
    color: #5D4037;
}

.calorito-timer-icon {
    font-size: 16px;
}

.calorito-timer-label {
    color: #795548;
}

.calorito-timer-value {
    font-weight: 700;
    color: #E65100;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    direction: ltr;
}

/* v3.17.0: کد پیگیری درخواست — شناسهٔ انسانی برای پشتیبانی/ازسرگیری */
.calorito-track-code {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: #E8F5E9;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px dashed #A5D6A7;
    font-size: 12.5px;
    color: #2E7D32;
}

.calorito-track-code b {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    letter-spacing: 1.5px;
    color: #1B5E20;
    background: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #C8E6C9;
}

/* نکته راهنما */
.calorito-loading-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(33, 150, 243, 0.06);
    border-radius: 10px;
    border-right: 3px solid #2196F3;
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}

/* v3.17.0: کد پیگیری در جعبهٔ خطا — مرجع پشتیبانی */
.calorito-error-track {
    padding: 8px 12px;
    margin-bottom: 10px;
    background: #F1F8E9;
    border: 1px dashed #AED581;
    border-radius: 8px;
    font-size: 12.5px;
    color: #33691E;
    direction: rtl;
}

.calorito-error-track b {
    font-family: 'Courier New', monospace;
    letter-spacing: 1.5px;
    color: #1B5E20;
}

.calorito-tip-icon {
    flex-shrink: 0;
    font-size: 14px;
}

/* حالت هشدار (وقتی طول می‌کشد) */
.calorito-loading.is-slow .calorito-loading-card {
    border-color: #FFB74D;
}

.calorito-loading.is-slow .calorito-loading-card::before {
    background: linear-gradient(90deg, #FF9800, #FFC107, #FF9800);
    background-size: 200% 100%;
}

.calorito-loading.is-slow .calorito-loading-eta {
    color: #E65100;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 600px) {
    .calorito-loading-card {
        padding: 20px 18px;
    }

    .calorito-loading-header {
        gap: 14px;
    }

    .calorito-loading-icon-wrap {
        width: 56px;
        height: 56px;
    }

    .calorito-loading-svg {
        width: 56px;
        height: 56px;
    }

    .calorito-loading-percent {
        font-size: 14px;
    }

    .calorito-loading-title {
        font-size: 16px;
    }

    .calorito-loading-eta {
        font-size: 12px;
    }

    .calorito-stage {
        font-size: 13px;
    }

    .calorito-stage-icon {
        font-size: 16px;
    }
}

/* ============================================================
 * استایل Toast Notifications (نسخه ۳.۹.۱۳)
 * جایگزین پیام‌های موقت قدیمی
 * ============================================================ */

#calorito-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90vw;
    width: 480px;
}

.calorito-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-right: 4px solid #2196F3;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

.calorito-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.calorito-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.calorito-toast-success {
    border-right-color: #2E7D32;
}
.calorito-toast-success .calorito-toast-icon {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
}

.calorito-toast-error {
    border-right-color: #D32F2F;
}
.calorito-toast-error .calorito-toast-icon {
    background: linear-gradient(135deg, #D32F2F, #EF5350);
}

.calorito-toast-warning {
    border-right-color: #FF9800;
}
.calorito-toast-warning .calorito-toast-icon {
    background: linear-gradient(135deg, #FF9800, #FFC107);
}

.calorito-toast-info {
    border-right-color: #2196F3;
}
.calorito-toast-info .calorito-toast-icon {
    background: linear-gradient(135deg, #2196F3, #64B5F6);
}

.calorito-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.calorito-toast-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.calorito-toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

@media (max-width: 600px) {
    #calorito-toast-container {
        top: 10px;
        width: calc(100vw - 20px);
    }

    .calorito-toast {
        padding: 12px 14px;
    }

    .calorito-toast-message {
        font-size: 13px;
    }
}

/* استایل‌های پاسخ */
.calorito-response-container {
    background: white;
    border-radius: 20px;
    padding: 35px;
    margin: 25px 0;
    box-shadow: var(--calorito-shadow);
    direction: rtl;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    display: none;
    border: 1px solid var(--calorito-border);
    position: relative;
}

.calorito-response-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--calorito-gradient);
    border-radius: 20px 20px 0 0;
}

.calorito-response-title {
    color: var(--calorito-primary);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--calorito-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.calorito-response-title::before {
    content: '🩺';
    margin-left: 10px;
}

.calorito-response-content {
    color: var(--calorito-text);
    font-size: 15px;
    line-height: 1.65; /* v3.16.31: ۱.۸ → ۱.۶۵ — فشرده‌سازی متن گزارش */
}

.calorito-response-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--calorito-lighter);
    border-radius: 12px;
    border-right: 4px solid var(--calorito-primary);
}

.calorito-response-section-title {
    color: var(--calorito-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* v3.16.24: بخش‌های بدون سرتیتر متنی (مثل بخش ۱ که کلش یک خطِ محتواست) —
   نوار عنوان خالی نمایش داده نشود؛ خود باکس و بدنه پابرجا هستند */
.calorito-response-section-title:empty {
    display: none;
}

/* ═══ v3.16.25 (دستور کاربر — «در نمایش گزارش دو باکس سبز شود: یکی مداخلات
   و مکمل‌ها، یکی رژیم و گزارش زیرش»): قاب سبز گروه + کارت‌های سفید داخلی ═══ */
.calorito-report-group {
    margin-bottom: 30px;
    padding: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-right: 5px solid #16a34a;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(22, 163, 74, 0.10);
}
.calorito-report-group-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.28);
    letter-spacing: 0.2px;
}
/* کارت‌های داخلی — سفید روی قاب سبز */
.calorito-report-group .calorito-response-section {
    background: #ffffff;
    margin-bottom: 14px;
    border-right: 4px solid #16a34a;
    padding: 14px;
}
.calorito-report-group .calorito-response-section:last-child {
    margin-bottom: 0;
}
.calorito-report-group .calorito-response-section-title {
    color: #15803d;
    background: #f0fdf4;
    font-size: 15px;
    margin-bottom: 10px;
    padding: 8px 12px;
    box-shadow: none;
    border: 1px solid #dcfce7;
}

/* استایل جدول گرافیکی و جذاب */
.calorito-response-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 10px 0; /* v3.16.31: ۱۵ → ۱۰ — فشرده‌سازی */
    font-size: 12.5px; /* v3.16.31: ۱۳ → ۱۲.۵ */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* جلوگیری از شکستن کلمات فارسی - بحرانی */
    table-layout: fixed;
    word-break: keep-all;
    overflow-wrap: normal;
    hyphens: none;
}

.calorito-response-table th,
.calorito-response-table td {
    border: 1px solid var(--calorito-border);
    /* v3.16.31 (دستور کاربر — «فاصله جملات را کم کن که فضا کمتر اشغال
       شود و ارتفاع جداول کم بشه»): padding ۱۰/۸ → ۵/۶ و line-height
       ۱.۷ → ۱.۴۵ — ارتفاع جدول هفتگی ~۳۵-۴۰٪ کم می‌شود */
    padding: 5px 6px;
    text-align: right;
    vertical-align: top;
    color: var(--calorito-text);
    /* جلوگیری از شکستن کلمات - کلمه کامل بمونه */
    word-break: keep-all;
    overflow-wrap: break-word;
    line-height: 1.45;
}

.calorito-response-table th {
    background: var(--calorito-gradient);
    color: white !important;
    font-weight: 700;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.3px;
    /* عناوین ستون‌ها وسط چین و بدون شکستن */
    white-space: normal;
    word-break: keep-all;
}

/* عرض ستون‌ها برای جدول ۸ ستونه (هفتگی) - v3.10.21:
   روز | صبحانه | میان‌وعده صبح | میان‌وعده بعدازظهر | ناهار | میان‌وعده عصر | شام | میان‌وعده ۲۲:۰۰
   **همه روزها برابر (۱۳.۷٪)**، ستون وعده‌ها ثابت (۶٪)
   ارتفاع ردیف‌ها بر اساس محتوا تنظیم می‌شود (صبحانه/ناهار/شام بلندتر) */
.calorito-response-table th:nth-child(1),
.calorito-response-table td:nth-child(1) { width: 6%; }   /* وعده */
.calorito-response-table th:nth-child(2),
.calorito-response-table td:nth-child(2) { width: 13.4%; } /* شنبه */
.calorito-response-table th:nth-child(3),
.calorito-response-table td:nth-child(3) { width: 13.4%; } /* یکشنبه */
.calorito-response-table th:nth-child(4),
.calorito-response-table td:nth-child(4) { width: 13.4%; } /* دوشنبه */
.calorito-response-table th:nth-child(5),
.calorito-response-table td:nth-child(5) { width: 13.4%; } /* سه‌شنبه */
.calorito-response-table th:nth-child(6),
.calorito-response-table td:nth-child(6) { width: 13.4%; } /* چهارشنبه */
.calorito-response-table th:nth-child(7),
.calorito-response-table td:nth-child(7) { width: 13.4%; } /* پنجشنبه */
.calorito-response-table th:nth-child(8),
.calorito-response-table td:nth-child(8) { width: 13.6%; } /* جمعه */

.calorito-response-table th:first-child {
    border-top-right-radius: 12px;
}

.calorito-response-table th:last-child {
    border-top-left-radius: 12px;
}

.calorito-response-table td:first-child {
    background: linear-gradient(180deg, var(--calorito-light) 0%, #D7ECD9 100%);
    font-weight: 700;
    text-align: center;
    color: var(--calorito-primary-dark);
    white-space: normal;  /* v3.10.31: changed from nowrap to allow wrapping */
    word-break: keep-all;
    font-size: 13px;
}

/* v3.10.21: ارتفاع ردیف‌های وعده‌های اصلی (صبحانه/ناهار/شام) بلندتر است
   چون محتوای بیشتری دارند (۲ گزینه کامل با مواد متعدد).
   میان‌وعده‌ها کوتاه‌تر (۱-۲ ماده).
   ردیف‌ها بر اساس محتوای داخل سلول‌ها به‌طور طبیعی بلند می‌شوند،
   ولی min-height حداقل تضمین می‌کند. */
.calorito-response-table tr {
    /* ارتفاع ردیف بر اساس بلندترین سلول تنظیم می‌شود (رفتار پیش‌فرض table) */
}
.calorito-response-table tr td {
    /* حداقل ارتفاع برای خوانایی بهتر */
    min-height: 60px;
}

.calorito-response-table tr:nth-child(even) td:not(:first-child) {
    background-color: #FAFFFE;
}

.calorito-response-table tr:nth-child(odd) td:not(:first-child) {
    background-color: white;
}

.calorito-response-table tr:hover td {
    background-color: #E8F5E9 !important;
}

.calorito-response-table tr:last-child td:first-child {
    border-bottom-right-radius: 12px;
}

.calorito-response-table tr:last-child td:last-child {
    border-bottom-left-radius: 12px;
}

/* استایل برای "گزینه" */
.calorito-option-label {
    color: var(--calorito-primary);
    font-weight: 700;
    background: rgba(46, 125, 50, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
}

/* استایل برای جداکننده "یا" بین گزینه‌های غذایی */
/* v3.16.31: نوار ابزار بخش 🍖 برنامهٔ غذایی — دکمهٔ «اصلاح رژیم فعلی» +
   شخصی‌سازی + چاپ جدول، کنار هم برای دسترسی آسان (دستور کاربر) */
.calorito-diet-tools-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0 10px;
    padding: 8px 10px;
    background: #FAFAF7;
    border: 1px solid #E4E2DC;
    border-radius: 8px;
}
.calorito-diet-tools-spacer {
    flex: 1 1 auto;
}
.calorito-repeat-fix-btn {
    background: #FFF8E1;
    border: 1px solid #F9A825;
    color: #795548;
    border-radius: 6px;
    padding: 6px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.calorito-repeat-fix-btn:hover:not(:disabled) {
    background: #FFF3CD;
}
.calorito-repeat-fix-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}
.calorito-repeat-fix-hint {
    font-size: 12px;
    color: #8D6E63;
}
.calorito-diet-tool-btn {
    background: white;
    border: 1px solid var(--calorito-border);
    color: var(--calorito-primary-dark);
    border-radius: 6px;
    padding: 6px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.calorito-diet-tool-btn:hover {
    background: var(--calorito-light);
}
@media (max-width: 600px) {
    .calorito-diet-tools-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .calorito-diet-tools-bar > button {
        width: 100%;
    }
    .calorito-diet-tools-spacer {
        display: none;
    }
}

.calorito-or-separator {
    display: inline-block;
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    font-weight: 700;
    font-size: 11px;
    padding: 1px 8px;   /* v3.16.31: فشرده‌سازی */
    border-radius: 12px;
    margin: 1px 2px;    /* v3.16.31: ۴ → ۱ */
    box-shadow: 0 1px 3px rgba(245, 124, 0, 0.3);
    vertical-align: middle;
}

/* استایل بدنه بخش پاسخ */
.calorito-response-section-body {
    margin-top: 10px;
    line-height: 1.8;
}

/* بهبود نمایش سلول‌های جدول رژیم غذایی */
.calorito-diet-table td {
    line-height: 1.7;
    font-size: 12.5px;
}

.calorito-diet-table td strong.calorito-option-label {
    display: inline-block;
    margin-bottom: 4px;
    margin-top: 4px;
}

/* اطمینان از اینکه محتوای جدول به‌خوبی نمایش داده می‌شود */
.calorito-diet-table td br {
    display: block;
    content: '';
    margin-top: 4px;
}

/* ============================================================
 * استایل دکمه سوییچ رژیم هفتگی / کلی (نسخه ۳.۹.۰)
 * ============================================================ */

.calorito-mode-switch-wrapper {
    margin: 0 auto 20px auto;
    max-width: 480px;
    text-align: center;
}

.calorito-mode-switch {
    position: relative;
    display: inline-flex;
    width: 100%;
    max-width: 440px;
    background: #F1F8E9;
    border: 2px solid var(--calorito-border, #C8E6C9);
    border-radius: 999px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.08);
    overflow: hidden;
}

.calorito-mode-switch-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: calc(50% - 4px);
    background: var(--calorito-gradient, linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%));
    border-radius: 999px;
    transition: right 0.35s cubic-bezier(0.4, 0.0, 0.2, 1), left 0.35s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 6px rgba(46, 125, 50, 0.25);
}

/*
 * در RTL: دکمه weekly در سمت راست و دکمه general در سمت چپ قرار دارند.
 * اسلایدر با استفاده از right/left در دو حالت جابه‌جا می‌شود.
 */
.calorito-mode-switch[data-active-mode="weekly"] .calorito-mode-switch-slider {
    right: 4px;
    left: auto;
}

.calorito-mode-switch[data-active-mode="general"] .calorito-mode-switch-slider {
    right: auto;
    left: 4px;
}

.calorito-mode-btn {
    position: relative;
    z-index: 2;
    flex: 1 1 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 700;
    color: #2E7D32;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    outline: none;
}

.calorito-mode-btn .calorito-mode-icon {
    font-size: 18px;
    line-height: 1;
}

.calorito-mode-btn .calorito-mode-text {
    line-height: 1;
}

/* وقتی دکمه فعال است، رنگ متن آن سفید می‌شود (روی اسلایدر گرادینت) */
.calorito-mode-btn.is-active {
    color: #ffffff;
}

.calorito-mode-btn:not(.is-active):hover {
    color: #1B5E20;
    background: rgba(46, 125, 50, 0.06);
    border-radius: 999px;
}

.calorito-mode-btn:focus-visible {
    outline: 2px solid #2E7D32;
    outline-offset: 2px;
}

.calorito-mode-description {
    margin: 10px 0 0 0;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    min-height: 20px;
    transition: color 0.2s ease;
}

/* ============================================================
 * استایل جدول رژیم کلی (۲ ستونه) - نسخه ۳.۹.۰
 * ============================================================ */

/* جدول کلی (۲ ستونه): عرض ستون‌ها متفاوت و فونت کوچک‌تر - v3.10.25 */
.calorito-diet-table-general {
    table-layout: fixed;
}

.calorito-diet-table-general th:first-child,
.calorito-diet-table-general td:first-child {
    width: 25%;
    white-space: normal;
    vertical-align: middle;
}

.calorito-diet-table-general th:not(:first-child),
.calorito-diet-table-general td:not(:first-child) {
    width: 75%;
}

.calorito-diet-table-general td {
    font-size: 13px;  /* v3.10.29: reverted to normal size (was 11px too small) */
    line-height: 1.5;
}

/* بولد کردن عناوین «یکی از غذاهای زیر» و «+ تمام غذاهای زیر» در جدول کلی
   با فاصله کمتر بین خطوط */
.calorito-diet-table-general td:last-child strong {
    display: block;
    color: #1B5E20;
    font-size: 13.5px;  /* v3.10.29: reverted to normal size */
    margin-top: 4px;
    margin-bottom: 2px;
    padding-top: 2px;
    border-top: 1px dashed rgba(46, 125, 50, 0.25);
}

.calorito-diet-table-general td:last-child strong:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* فشرده‌سازی <br> داخل سلول‌های جدول کلی تا فاصله بین خطوط کمتر شود */
.calorito-diet-table-general td br {
    display: block;
    content: '';
    margin-top: 0;
    margin-bottom: 0;
    line-height: 0.3;
}

/* Responsive: سوییچ روی موبایل */
@media (max-width: 480px) {
    .calorito-mode-switch-wrapper {
        max-width: 100%;
    }

    .calorito-mode-btn {
        font-size: 13px;
        padding: 9px 8px;
    }

    .calorito-mode-btn .calorito-mode-icon {
        font-size: 16px;
    }

    .calorito-mode-description {
        font-size: 12px;
    }
}

/* ============================================================
 * استایل باکس خطای پایدار (نسخه ۳.۹.۲)
 * ============================================================ */

.calorito-error-box {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF0F0 100%);
    border: 2px solid #F5C2C2;
    border-right: 6px solid #D63638;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(214, 54, 56, 0.1);
}

.calorito-error-timeout {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFF3CD 100%);
    border-color: #FFE082;
    border-right-color: #F57C00;
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.1);
}

.calorito-error-server {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border-color: #FFCC80;
    border-right-color: #E65100;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.1);
}

.calorito-error-network {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border-color: #90CAF9;
    border-right-color: #1565C0;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.1);
}

.calorito-error-auth {
    background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
    border-color: #BA68C8;
    border-right-color: #6A1B9A;
    box-shadow: 0 4px 12px rgba(106, 27, 154, 0.1);
}

.calorito-error-rate-limited {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border-color: #FFE082;
    border-right-color: #FF9800;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.15);
}

.calorito-error-rate-limited .calorito-error-title {
    color: #E65100;
}

/* خطای تکراری - قرمز تیره برای هشدار جدی */
.calorito-error-repeated {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    border-color: #EF9A9A;
    border-right-color: #B71C1C;
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.15);
}

.calorito-error-repeated .calorito-error-title {
    color: #B71C1C;
}

/* خطای connection reset - بنفش برای تمایز */
.calorito-error-connection_reset {
    background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
    border-color: #F48FB1;
    border-right-color: #AD1457;
    box-shadow: 0 4px 12px rgba(173, 20, 87, 0.15);
}

.calorito-error-connection_reset .calorito-error-title {
    color: #AD1457;
}

/* ============================================================
 * استایل هشدار انتقال به مدل fallback (نسخه ۳.۹.۹)
 * ============================================================ */

.calorito-fallback-notice {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    border: 2px solid #64B5F6;
    border-right: 6px solid #1565C0;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 0 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.12);
}

.calorito-fallback-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
}

.calorito-fallback-content {
    flex: 1;
}

.calorito-fallback-title {
    font-size: 15px;
    font-weight: 700;
    color: #0D47A1;
    margin-bottom: 6px;
}

.calorito-fallback-text {
    font-size: 13px;
    line-height: 1.7;
    color: #37474F;
}

.calorito-fallback-text code {
    background: rgba(21, 101, 192, 0.12);
    color: #0D47A1;
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 480px) {
    .calorito-fallback-notice {
        padding: 11px 14px;
        gap: 10px;
    }
    .calorito-fallback-icon {
        font-size: 22px;
    }
    .calorito-fallback-title {
        font-size: 14px;
    }
    .calorito-fallback-text {
        font-size: 12px;
    }
}

/* ============================================================
 * استایل هشدار پاسخ ناقص (نسخه ۳.۹.۶)
 * ============================================================ */

.calorito-truncation-warning {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    border: 2px solid #FFB74D;
    border-right: 6px solid #E65100;
    border-radius: 12px;
    padding: 16px 20px;
    margin: 0 0 20px 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.12);
}

.calorito-truncation-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.calorito-truncation-content {
    flex: 1;
}

.calorito-truncation-title {
    font-size: 16px;
    font-weight: 700;
    color: #BF360C;
    margin-bottom: 6px;
}

.calorito-truncation-text {
    font-size: 13px;
    line-height: 1.7;
    color: #5D4037;
}

@media (max-width: 480px) {
    .calorito-truncation-warning {
        padding: 12px 14px;
        gap: 10px;
    }
    .calorito-truncation-icon {
        font-size: 24px;
    }
    .calorito-truncation-title {
        font-size: 14px;
    }
    .calorito-truncation-text {
        font-size: 12px;
    }
}

.calorito-error-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1B5E20;
}

.calorito-error-timeout .calorito-error-title { color: #E65100; }
.calorito-error-server .calorito-error-title { color: #BF360C; }
.calorito-error-network .calorito-error-title { color: #0D47A1; }
.calorito-error-auth .calorito-error-title { color: #4A148C; }

.calorito-error-message {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 16px;
}

.calorito-error-message small {
    color: #666;
    font-size: 12px;
}

.calorito-error-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calorito-retry-btn {
    background: linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.calorito-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.calorito-retry-btn:active {
    transform: translateY(0);
}

/* placeholder برای جدول در حال بارگذاری - نسخه ۳.۱۰.۲ */
.calorito-diet-loading {
    text-align: center;
    padding: 30px;
    background: #F1F8E9;
    border-radius: 12px;
    margin: 15px 0;
    border: 2px dashed #C8E6C9;
}

.calorito-diet-loading .calorito-spinner {
    margin: 0 auto 15px;
}

.calorito-diet-loading p {
    color: #2E7D32;
    font-size: 14px;
    font-weight: 600;
}

/* دکمه لغو درخواست - نسخه ۳.۹.۲۰ */
.calorito-cancel-job-btn {
    background: linear-gradient(135deg, #D32F2F 0%, #EF5350 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.calorito-cancel-job-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.calorito-cancel-job-btn:active {
    transform: translateY(0);
}

.calorito-cancel-job-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* روی موبایل error box هم بهینه شود */
@media (max-width: 480px) {
    .calorito-error-box {
        padding: 16px 18px;
    }
    .calorito-error-title {
        font-size: 16px;
    }
    .calorito-error-message {
        font-size: 13px;
    }
}

/* دکمه‌های عملیات (کپی و پرینت) */
.calorito-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.calorito-copy-diet-btn,
.calorito-print-diet-btn {
    background: var(--calorito-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.25);
}

.calorito-copy-diet-btn:hover,
.calorito-print-diet-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--calorito-shadow-hover);
}

.calorito-copy-diet-btn::before {
    content: '📋';
}

.calorito-print-diet-btn::before {
    content: '🖨️';
}

/* استایل دکمه کپی با رنگ متمایز */
.calorito-copy-diet-btn {
    background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
    box-shadow: 0 3px 10px rgba(25, 118, 210, 0.25);
}

.calorito-copy-diet-btn:hover {
    box-shadow: 0 8px 30px rgba(25, 118, 210, 0.35);
}

/* استایل لیست‌ها */
.calorito-response-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.calorito-response-list li {
    padding: 12px 15px 12px 35px;
    margin: 8px 0;
    background: white;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    border-right: 3px solid var(--calorito-secondary);
}

.calorito-response-list li::before {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--calorito-secondary);
    font-weight: bold;
    font-size: 16px;
}

/* استایل واکنش‌گرا */
@media (max-width: 768px) {
    .calorito-form-container {
        padding: 20px;
        border-radius: 16px;
    }
    
    .calorito-form-title {
        font-size: 22px;
    }
    
    .calorito-form-description {
        font-size: 13px;
        padding: 15px;
    }
    
    .calorito-form-textarea {
        min-height: 140px;
        font-size: 14px;
        padding: 15px;
    }
    
    .calorito-form-button {
        font-size: 15px;
        padding: 14px 25px;
    }
    
    .calorito-response-container {
        padding: 20px;
        border-radius: 16px;
        overflow-x: auto;
    }

    /* جدول در موبایل: scroll افقی + فونت کوچک‌تر */
    .calorito-response-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calorito-response-table {
        min-width: 700px;
        font-size: 11px;
    }

    .calorito-response-table th,
    .calorito-response-table td {
        padding: 6px 5px;
        font-size: 11px;
        line-height: 1.5;
    }

    .calorito-response-table th {
        font-size: 10px;
    }
    
    .calorito-response-title {
        font-size: 18px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .calorito-response-content {
        font-size: 13px;
    }
    
    /* v3.16.25: گروه سبز روی موبایل — پدینگ فشرده‌تر، عنوان یک‌خطی */
    .calorito-report-group {
        padding: 8px;
        margin-bottom: 18px;
        border-right-width: 4px;
    }
    
    .calorito-report-group-title {
        font-size: 15px;
        padding: 8px 12px;
        margin-bottom: 8px;
        text-align: center;
    }
    
    .calorito-report-group .calorito-response-section {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .calorito-response-section-title {
        font-size: 15px;
    }

    .calorito-action-buttons {
        width: 100%;
    }
    
    .calorito-copy-diet-btn,
    .calorito-print-diet-btn {
        flex: 1;
        justify-content: center;
        font-size: 13px;
        padding: 8px 15px;
    }

}

/* استایل‌های پیام‌ها */
.calorito-message {
    padding: 18px 20px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

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

.calorito-message::before {
    font-size: 20px;
}

.calorito-message-error {
    background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
    color: var(--calorito-error);
    border: 1px solid #EF9A9A;
}

.calorito-message-error::before {
    content: '❌';
}

.calorito-message-success {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--calorito-success);
    border: 1px solid #A5D6A7;
}

.calorito-message-success::before {
    content: '✅';
}

.calorito-message-warning {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    color: var(--calorito-warning);
    border: 1px solid #FFE082;
}

.calorito-message-warning::before {
    content: '⚠️';
}

/* ========================================
   استایل‌های چاپ A4 - بهینه شده
   ======================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm;
    }
    
    body {
        font-size: 9pt !important;
        line-height: 1.25 !important;
        background: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* مخفی کردن عناصر غیرضروری */
    .calorito-form-container,
    .calorito-loading,
    .calorito-form-button,
    .calorito-print-diet-btn,
    .calorito-copy-diet-btn,
    .calorito-action-buttons,
    .calorito-message {
        display: none !important;
    }
    
    .calorito-response-container {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        background: white !important;
        display: block !important;
    }
    
    .calorito-response-container::before {
        display: none !important;
    }
    
    .calorito-response-title {
        font-size: 14pt !important;
        margin-bottom: 8mm !important;
        padding-bottom: 3mm !important;
        border-bottom: 1px solid #333 !important;
        color: #000 !important;
    }
    
    .calorito-response-content {
        font-size: 9pt !important;
    }
    
    .calorito-response-section {
        margin-bottom: 5mm !important;
        padding: 3mm !important;
        background: none !important;
        border-right: 3px solid #333 !important;
        page-break-inside: avoid;
    }
    
    .calorito-response-section-title {
        font-size: 11pt !important;
        margin-bottom: 3mm !important;
        padding: 2mm !important;
        background: none !important;
        color: #000 !important;
        border-bottom: 1px solid #999 !important;
        border-radius: 0 !important;
    }
    
    /* جدول رژیم - بهینه برای A4 - v3.10.25: font size +20% (8.4pt -> 10pt) */
    .calorito-response-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 10pt !important;
        margin: 3mm 0 !important;
        page-break-inside: auto;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .calorito-response-table th,
    .calorito-response-table td {
        border: 1px solid #333 !important;
        padding: 2mm 3mm !important;
        text-align: right !important;
        vertical-align: top !important;
        color: #000 !important;
        background: white !important;
        font-size: 10pt !important;  /* v3.10.25: +20% from 8.4pt */
        line-height: 1.4 !important;
    }
    
    .calorito-response-table th {
        background: #2E7D32 !important;
        color: white !important;
        font-weight: bold !important;
        text-align: center !important;
        font-size: 11pt !important;  /* v3.10.25: headers slightly larger */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .calorito-response-table td:first-child {
        background: #E8F5E9 !important;
        font-weight: bold !important;
        text-align: center !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .calorito-response-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    /* استایل "گزینه" در چاپ */
    .calorito-option-label {
        font-weight: bold !important;
        color: #2E7D32 !important;
    }
    
    .calorito-response-list {
        padding-right: 5mm !important;
    }
    
    .calorito-response-list li {
        padding: 2mm !important;
        margin: 1mm 0 !important;
        background: none !important;
        box-shadow: none !important;
        border-right: 2px solid #333 !important;
    }
    
    /* v3.10.31: جدول رژیم کلی در پرینت — فونت 9pt + فاصله صفر بین گزینه‌ها */
    .calorito-diet-table-general {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 9pt !important;  /* v3.10.31: reduced from 10pt */
        margin: 1mm 0 !important;
        page-break-inside: auto;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .calorito-diet-table-general th,
    .calorito-diet-table-general td {
        border: 1px solid #333 !important;
        padding: 1mm 2mm !important;
        text-align: right !important;
        vertical-align: top !important;
        color: #000 !important;
        background: white !important;
        font-size: 9pt !important;  /* v3.10.31: reduced from 10pt */
        line-height: 1.2 !important;  /* v3.10.31: reduced from 1.25 */
    }
    
    .calorito-diet-table-general th {
        background: #2E7D32 !important;
        color: white !important;
        font-weight: bold !important;
        text-align: center !important;
        font-size: 9.5pt !important;  /* v3.10.31: reduced from 10.5pt */
        padding: 1mm 2mm !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .calorito-diet-table-general td:first-child {
        background: #E8F5E9 !important;
        font-weight: bold !important;
        text-align: center !important;
        white-space: normal !important;  /* v3.10.31: allow wrapping */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .calorito-diet-table-general td:last-child strong {
        color: #1B5E20 !important;
        font-size: 9pt !important;  /* v3.10.31: reduced from 10pt */
        margin-top: 0 !important;  /* v3.10.31: zero spacing */
        margin-bottom: 0 !important;
        padding-top: 0 !important;  /* v3.10.31: zero spacing */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* v3.10.32: فاصله صفر بین گزینه‌ها — parent line-height به جای br line-height:0 */
    .calorito-diet-table-general td {
        line-height: 1.15 !important;  /* v3.10.32: tight but safe */
    }
    
    .calorito-diet-table-general td br {
        margin: 0 !important;
        padding: 0 !important;
        /* v3.10.32: removed display:block + line-height:0 which caused overlap in Firefox */
    }
    
    .calorito-diet-table-general td br + br {
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* انیمیشن‌های اضافی برای جذابیت */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calorito-response-container {
    animation: fadeInUp 0.5s ease;
}

.calorito-response-section {
    animation: fadeInUp 0.5s ease backwards;
}

.calorito-response-section:nth-child(1) { animation-delay: 0.1s; }
.calorito-response-section:nth-child(2) { animation-delay: 0.15s; }
.calorito-response-section:nth-child(3) { animation-delay: 0.2s; }
.calorito-response-section:nth-child(4) { animation-delay: 0.25s; }
.calorito-response-section:nth-child(5) { animation-delay: 0.3s; }
.calorito-response-section:nth-child(6) { animation-delay: 0.35s; }
.calorito-response-section:nth-child(7) { animation-delay: 0.4s; }

/* ============================================================
 * استایل‌های مرحله ۳: پروفایل کاربر، شمارشگر ماهانه، هشدارها
 * ============================================================ */

/* پیام هشدار (warning) */
.calorito-message-warning {
    background: linear-gradient(135deg, #FF9800, #F57C00) !important;
    color: white;
    border-right: 4px solid #E65100 !important;
}

/* پیام موفقیت */
.calorito-message-success {
    background: linear-gradient(135deg, #43A047, #2E7D32) !important;
    color: white;
    border-right: 4px solid #1B5E20 !important;
}

/* فرم پروفایل (اولین استفاده) */
.calorito-profile-required-notice {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border-right: 4px solid #1976D2;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.calorito-profile-required-notice h3 {
    color: #1565C0;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.calorito-profile-form {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.calorito-profile-form-group {
    margin-bottom: 18px;
}

.calorito-profile-form-group label {
    display: block;
    font-weight: 600;
    color: var(--calorito-primary-dark, #1B5E20);
    margin-bottom: 8px;
    font-size: 14px;
}

.calorito-profile-form-group input,
.calorito-profile-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--calorito-border, #C8E6C9);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
    box-sizing: border-box;
}

.calorito-profile-form-group input:focus,
.calorito-profile-form-group select:focus {
    outline: none;
    border-color: var(--calorito-primary, #2E7D32);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* شمارشگر سقف ماهانه */
.calorito-monthly-counter {
    background: white;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--calorito-border, #C8E6C9);
}

.calorito-counter-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.calorito-counter-label {
    color: var(--calorito-light-text, #757575);
    font-weight: 500;
}

.calorito-counter-value {
    color: var(--calorito-primary, #2E7D32);
    font-weight: 700;
    font-size: 16px;
}

.calorito-counter-info.calorito-counter-warning .calorito-counter-value {
    color: #d63638;
}

.calorito-counter-bar {
    height: 8px;
    background: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
}

.calorito-counter-progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #2E7D32);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.calorito-counter-warning .calorito-counter-progress {
    background: linear-gradient(90deg, #FF9800, #d63638);
}

/* دکمه حالت "اشتراک به پایان رسیده" */
.calorito-form-button.calorito-limit-reached {
    background: linear-gradient(135deg, #9E9E9E, #757575) !important;
    cursor: not-allowed;
    opacity: 0.85;
}

.calorito-form-button.calorito-limit-reached:hover {
    transform: none !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* استایل ریسپانسیو برای پروفایل و شمارشگر */
@media (max-width: 768px) {
    .calorito-profile-form {
        padding: 18px;
    }

    .calorito-monthly-counter {
        padding: 12px 14px;
    }

    .calorito-counter-info {
        font-size: 13px;
    }

    .calorito-counter-value {
        font-size: 14px;
    }
}

/* ============================================================
 * استایل‌های مرحله ۴: پاپ‌آپ نام متقاضی برای پرینت
 * ============================================================ */

/* پس‌زمینه تیره پاپ‌آپ */
.calorito-applicant-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: caloritoFadeIn 0.2s ease;
}

@keyframes caloritoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* خود پاپ‌آپ */
.calorito-applicant-modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: caloritoSlideUp 0.3s ease;
}

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

/* هدر پاپ‌آپ */
.calorito-applicant-modal-header {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calorito-applicant-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.calorito-applicant-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    border-radius: 50%;
    transition: background 0.2s;
}

.calorito-applicant-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* بدنه پاپ‌آپ */
.calorito-applicant-modal-body {
    padding: 24px;
}

.calorito-applicant-prompt {
    color: #555;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.calorito-applicant-form-group {
    margin-bottom: 8px;
}

.calorito-applicant-form-group label {
    display: block;
    font-weight: 600;
    color: #2E7D32;
    margin-bottom: 8px;
    font-size: 14px;
}

.calorito-applicant-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #C8E6C9;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.calorito-applicant-input:focus {
    outline: none;
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* فوتر پاپ‌آپ */
.calorito-applicant-modal-footer {
    padding: 16px 24px;
    background: #F8F9FA;
    border-top: 1px solid #E0E0E0;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-direction: row-reverse;
}

.calorito-applicant-modal-footer .button {
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    font-size: 14px;
}

.calorito-applicant-modal-footer .button-primary {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
}

.calorito-applicant-modal-footer .button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.calorito-applicant-modal-footer .button:not(.button-primary) {
    background: #E0E0E0;
    color: #555;
}

.calorito-applicant-modal-footer .button:not(.button-primary):hover {
    background: #BDBDBD;
}

/* ریسپانسیو */
@media (max-width: 600px) {
    .calorito-applicant-modal {
        width: 95%;
        margin: 10px;
    }

    .calorito-applicant-modal-header h3 {
        font-size: 16px;
    }

    .calorito-applicant-modal-body,
    .calorito-applicant-modal-footer {
        padding: 16px;
    }

    .calorito-applicant-modal-footer {
        flex-direction: column-reverse;
    }

    .calorito-applicant-modal-footer .button {
        width: 100%;
    }
}

/* شمارنده کاراکتر textarea */
.calorito-char-counter {
    text-align: left;
    font-size: 12px;
    color: #757575;
    margin-top: 5px;
    font-weight: 500;
}

.calorito-char-counter #calorito-char-count {
    color: #2E7D32;
    font-weight: 700;
}

.calorito-char-counter.warning #calorito-char-count {
    color: #FF9800;
}

.calorito-char-counter.danger #calorito-char-count {
    color: #d63638;
}

/* استایل مثال رژیم در توضیحات */
.calorito-example-régimen {
    display: inline-block;
    background: linear-gradient(135deg, #1565C0, #1976D2);
    color: white;
    padding: 3px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    margin: 0 4px;
}

.calorito-example-separator {
    color: #999;
    font-weight: 500;
    margin: 0 4px;
}

.calorito-example-text {
    color: #555;
}

/* ============================== */
/* اطلاعیه دسترسی تخصصی + فرآیند تأیید (نسخه ۳.۷.۰) */
/* ============================== */
.calorito-access-notice {
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 1px solid #FFC107;
    border-right: 4px solid #FF8F00;
    padding: 18px 22px;
    border-radius: 14px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(255, 143, 0, 0.08);
}

.calorito-access-notice-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.calorito-access-notice-icon {
    font-size: 24px;
    line-height: 1;
}

.calorito-access-notice-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #BF6900;
}

.calorito-access-notice p {
    color: #5D4037;
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 12px 0;
}

.calorito-access-notice-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calorito-access-notice-list li {
    position: relative;
    padding-right: 22px;
    color: #5D4037;
    font-size: 13.5px;
    line-height: 1.9;
    margin-bottom: 6px;
}

.calorito-access-notice-list li::before {
    content: '✓';
    position: absolute;
    right: 0;
    top: 0;
    color: #FF8F00;
    font-weight: 700;
}

/* ============================== */
/* اطلاعیه‌های وضعیت تأیید (pending / rejected) */
/* ============================== */
.calorito-approval-notice {
    padding: 36px 28px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.calorito-approval-notice .calorito-approval-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 16px;
}

.calorito-approval-notice h3 {
    margin: 0 0 14px 0;
    font-size: 20px;
    font-weight: 700;
}

.calorito-approval-notice p {
    font-size: 14.5px;
    line-height: 1.9;
    margin: 0 auto 14px auto;
    max-width: 620px;
}

.calorito-approval-notice .calorito-approval-footer {
    font-size: 13px;
    color: #888;
    margin-top: 18px;
    font-style: italic;
}

/* حالت «در انتظار تأیید» */
.calorito-approval-pending {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border: 1px solid #64B5F6;
}

.calorito-approval-pending h3 {
    color: #0D47A1;
}

.calorito-approval-pending p {
    color: #1565C0;
}

/* حالت «رد شده» */
.calorito-approval-rejected {
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    border: 1px solid #EF9A9A;
}

.calorito-approval-rejected h3 {
    color: #B71C1C;
}

.calorito-approval-rejected p {
    color: #C62828;
}

/* حالت «معلق» (تعلیق دسترسی) */
.calorito-approval-suspended {
    background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
    border: 1px solid #BA68C8;
}

.calorito-approval-suspended h3 {
    color: #6A1B9A;
}

.calorito-approval-suspended p {
    color: #7B1FA2;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .calorito-access-notice {
        padding: 14px 16px;
    }

    .calorito-approval-notice {
        padding: 28px 18px;
    }

    .calorito-approval-notice .calorito-approval-icon {
        font-size: 44px;
    }

    .calorito-approval-notice h3 {
        font-size: 17px;
    }

    .calorito-approval-notice p {
        font-size: 13.5px;
    }
}

/* ============================================================
 * v3.10.31: استایل حالت شخصی‌سازی (شروع محتوا)
 * ============================================================ */

.calorito-editing-mode {
    cursor: text !important;
}

.calorito-editing-mode td,
.calorito-editing-mode th {
    cursor: text !important;
}

.calorito-editing-mode td:focus,
.calorito-editing-mode th:focus {
    outline: 2px solid #2196F3 !important;
    outline-offset: -2px;
    background-color: #FFFDE7 !important;
}

.calorito-personalize-toolbar {
    animation: fadeInUp 0.3s ease;
}

.calorito-personalize-toolbar button {
    cursor: pointer;
}

/* در پرینت، حالت ویرایش و نوار ابزار پنهان شود */
@media print {
    .calorito-personalize-toolbar {
        display: none !important;
    }
    
    .calorito-editing-mode {
        outline: none !important;
        background-color: white !important;
    }
    
    .calorito-editing-mode td,
    .calorito-editing-mode th {
        outline: none !important;
    }
    
    /* v3.10.32: override :focus styles in print */
    .calorito-editing-mode td:focus,
    .calorito-editing-mode th:focus {
        outline: none !important;
        background-color: #E8F5E9 !important;
    }
}

/* ══════════════════════════════════════════════════════════════════
   v3.15.0 — لایه بازطراحی UI/UX (override layer)
   بهبود ظاهر بدون تغییر مکانیزم ورود داده
   ══════════════════════════════════════════════════════════════════ */

/* ── تایپوگرافی: وزیرمتن ── */
.calorito-form-container,
.calorito-response-container,
.calorito-loading-card,
.calorito-toast,
.calorito-diet-table,
table.calorito-response-table,
table.calorito-diet-table,
table.calorito-diet-table-general {
    font-family: 'Vazirmatn', Vazir, 'IRANSans', Tahoma, 'Segoe UI', sans-serif;
}

/* ── کانتینر اصلی: سایه نرم‌تر + شعاع بیشتر ── */
.calorito-form-container {
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -8px rgba(46, 125, 50, .14);
    border: 1px solid rgba(46, 125, 50, .08);
    padding: 32px 30px 26px;
    position: relative;
    overflow: hidden;
}

/* هدر hero جدید */
.calorito-hero {
    text-align: center;
    margin-bottom: 22px;
}
.calorito-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(46, 125, 50, .08);
    color: var(--calorito-primary, #2E7D32);
    border: 1px solid rgba(46, 125, 50, .18);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}
.calorito-hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--calorito-secondary, #4CAF50);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, .18);
    animation: caloritoPulse 2.2s ease-in-out infinite;
}
@keyframes caloritoPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(76, 175, 80, .18); }
    50% { box-shadow: 0 0 0 6px rgba(76, 175, 80, .08); }
}
.calorito-form-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px;
    background: linear-gradient(135deg, var(--calorito-primary, #2E7D32), var(--calorito-secondary, #4CAF50));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.calorito-form-title .calorito-title-icon {
    color: var(--calorito-secondary, #4CAF50);
    -webkit-text-fill-color: var(--calorito-secondary, #4CAF50);
    animation: none;
}
.calorito-hero-subtitle {
    color: #5f6b63;
    font-size: 13.5px;
    margin: 0;
    line-height: 1.9;
}

/* ── چیپ‌های نمونه (quick fill) ── */
.calorito-example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}
.calorito-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: #3d4a41;
    background: #f6f8f6;
    border: 1.5px solid #e2e8e3;
    border-radius: 999px;
    padding: 6px 13px;
    cursor: pointer;
    transition: all .2s ease;
    line-height: 1.6;
}
.calorito-chip:hover {
    border-color: var(--calorito-secondary, #4CAF50);
    background: rgba(76, 175, 80, .07);
    color: var(--calorito-primary-dark, #1B5E20);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px -4px rgba(46, 125, 50, .25);
}
.calorito-chip:active { transform: translateY(0); }
.calorito-chip:focus-visible {
    outline: 2px solid var(--calorito-secondary, #4CAF50);
    outline-offset: 2px;
}
.calorito-chip-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    color: #fff;
}
.calorito-chip-tag-complex { background: #d9534f; }
.calorito-chip-tag-medium { background: #f0ad4e; }
.calorito-chip-tag-simple { background: #5cb85c; }

/* ── textarea: ظاهر مدرن‌تر ── */
.calorito-form-textarea {
    border-radius: 14px;
    border: 1.8px solid #e3e9e4;
    background: #fbfdfb;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 2;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: inset 0 1px 3px rgba(16, 24, 40, .03);
}
.calorito-form-textarea:hover { border-color: #c9d6cb; }
.calorito-form-textarea:focus {
    border-color: var(--calorito-secondary, #4CAF50);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, .13);
}

/* ── شمارنده کاراکتر ── */
.calorito-char-counter {
    font-size: 11.5px;
    color: #93a39a;
    margin-top: 7px;
    text-align: left;
    font-weight: 500;
}

/* ── دکمه اصلی: گرادیانت + انیمیشن ── */
.calorito-form-button {
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 24px;
    box-shadow: 0 8px 20px -6px rgba(46, 125, 50, .45);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.calorito-form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -6px rgba(46, 125, 50, .55);
    filter: brightness(1.04);
}
.calorito-form-button:active { transform: translateY(0); }
.calorito-form-button .btn-icon { display: inline-flex; }

/* ── hint های زیر فرم ── */
.calorito-input-hints {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 18px 0 6px;
}
.calorito-hint {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: #f7faf7;
    border: 1px solid #e6efe7;
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 12px;
    color: #55655c;
    line-height: 1.8;
}
.calorito-hint-icon { font-size: 15px; line-height: 1.4; }
@media (max-width: 600px) {
    .calorito-input-hints { grid-template-columns: 1fr; }
}

/* ── سوییچ حالت: پیل گرادیانتی ── */
.calorito-mode-switch {
    border-radius: 14px;
    padding: 4px;
    box-shadow: inset 0 1px 3px rgba(16, 24, 40, .06);
}
.calorito-mode-switch-slider {
    border-radius: 11px;
    box-shadow: 0 3px 10px -2px rgba(46, 125, 50, .4);
}
.calorito-mode-btn { border-radius: 11px; }
.calorito-mode-btn.is-active {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

/* ── کارت لودینگ ── */
.calorito-loading-card {
    border-radius: 20px;
    box-shadow: 0 16px 40px -12px rgba(46, 125, 50, .22);
}
.calorito-stage {
    border-radius: 10px;
    transition: background .25s ease, opacity .25s ease;
}

/* ═══ کارت تحلیل بالینی (جدید — بالای نتیجه) ═══ */
/* v3.15.1: حالت مخفی اولیه با CSS — بدون اتریبیوت hidden
   (سازگار با قالب‌هایی که [hidden]{display:none!important} دارند) */
.calorito-analysis-card {
    display: none;
    background: linear-gradient(135deg, rgba(46, 125, 50, .05), rgba(76, 175, 80, .08));
    border: 1px solid rgba(46, 125, 50, .16);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 18px;
    animation: caloritoFadeIn .45s ease both;
}
@keyframes caloritoFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.calorito-analysis-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--calorito-primary-dark, #1B5E20);
    margin-bottom: 12px;
}
.calorito-analysis-card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.calorito-analysis-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e0e9e2;
    color: #3d4a41;
}
.calorito-analysis-chip-disease {
    background: #fff5f5;
    border-color: #f5d0cf;
    color: #a94442;
}
.calorito-analysis-chip-rules {
    background: #f0f7ff;
    border-color: #cfe3f8;
    color: #2b6cb0;
}
.calorito-analysis-chip-complexity {
    background: #fff8e8;
    border-color: #f3e2b3;
    color: #9a7b1e;
}
.calorito-analysis-chip-repaired {
    background: #eefaf0;
    border-color: #c4e8cc;
    color: #2e7d32;
}
.calorito-analysis-chip-calorie {
    background: #f5f0fa;
    border-color: #ddcdec;
    color: #6b3fa0;
}
.calorito-analysis-note {
    margin-top: 10px;
    font-size: 11.5px;
    color: #7c8a81;
    line-height: 1.8;
}

/* ── کانتینر نتیجه ── */
/* v3.15.1: حالت مخفی اولیه فقط از طریق قانون اصلی (display:none خط ۶۱۶) —
   کلاس calorito-initially-hidden صرفاً نشانه‌گذاری است و هیچ قاعده‌ای نیاز ندارد.
   کانتینر با .show() جی‌کوئری (inline display:block) نمایان می‌شود که
   از هر قانون [hidden] قالب قوی‌تر است. */
.calorito-response-container {
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -8px rgba(46, 125, 50, .12);
    border: 1px solid rgba(46, 125, 50, .08);
    padding: 26px 26px 22px;
}

/* ── جدول رژیم: پولیش نهایی ── */
table.calorito-response-table,
table.calorito-diet-table,
table.calorito-diet-table-general {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px -4px rgba(16, 24, 40, .12);
    border-collapse: separate;
    border-spacing: 0;
}
.calorito-response-table th {
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .2px;
}
.calorito-response-table tr:hover td {
    transition: background .15s ease;
}

/* استیکی هدر جدول هفتگی در دسکتاپ */
@media (min-width: 769px) {
    .calorito-table-scroll-wrapper {
        max-height: 560px;
        overflow-y: auto;
        border-radius: 14px;
        position: relative;
    }
    .calorito-table-scroll-wrapper thead th {
        position: sticky;
        top: 0;
        z-index: 5;
    }
}

/* ── بخش‌های پاسخ ── */
.calorito-response-section {
    border-radius: 14px;
    transition: box-shadow .2s ease;
}
.calorito-response-section:hover {
    box-shadow: 0 6px 18px -8px rgba(46, 125, 50, .2);
}

/* ── ریسپانسیو ── */
@media (max-width: 600px) {
    .calorito-form-container { padding: 22px 18px 20px; border-radius: 16px; }
    .calorito-form-title { font-size: 20px; }
    .calorito-hero-subtitle { font-size: 12.5px; }
    .calorito-chip { font-size: 11px; padding: 5px 11px; }
    .calorito-form-button { font-size: 14px; padding: 13px 20px; width: 100%; }
    .calorito-response-container { padding: 18px 14px 16px; border-radius: 16px; }
}

/* ── کاهش حرکت برای کاربران حساس ── */
@media (prefers-reduced-motion: reduce) {
    .calorito-hero-badge-dot,
    .calorito-title-icon,
    .calorito-loading-svg-progress { animation: none !important; }
    .calorito-form-button,
    .calorito-chip { transition: none !important; }
}


/* ═══ v3.16.19: دکمهٔ «🔧 اصلاح نهایی رژیم» (فاز ۴ دستی) — کنار شخصی‌سازی ═══ */
.calorito-action-buttons .calorito-manual-fix-btn {
    background: #2E7D32;
    color: #FFFFFF;
    border: 1px solid #1B5E20;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.25);
}
.calorito-action-buttons .calorito-manual-fix-btn:hover:not(:disabled) {
    background: #1B5E20;
}
.calorito-action-buttons .calorito-manual-fix-btn:disabled {
    opacity: 0.65;
    cursor: progress;
}

/* v3.16.19: دکمهٔ «بررسی وضعیت درخواست» در باکس خطای تایم‌اوت */
.calorito-error-actions .calorito-recheck-btn {
    background: #1565C0;
    color: #FFFFFF;
    border: 1px solid #0D47A1;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.calorito-error-actions .calorito-recheck-btn:hover {
    background: #0D47A1;
}

/* ═══ v3.16.21: کارت «نکتهٔ بالینی برای متخصص» (بازبینی نهایی) ═══
   ظاهرِ نکته/یادداشت — نه بخشی از جواب AI. مقادیر عین inline styles داخل
   PHP (rebuild_final_warning) هستند؛ این بلوک برای قالب‌های مضاعف-الأثر
   (تم‌های تیره/بوت‌استرپی) شفافیت و ثبات ظاهری می‌دهد. */
.calorito-clinical-note {
    margin: 14px 0 2px;
    padding: 12px 14px;
    border: 1px solid #ead9b0;
    border-right: 4px solid #d69e2e;
    border-radius: 10px;
    background: #fffaf0;
    font-size: 12.5px;
    line-height: 2;
    color: #5f4b24;
    text-align: right;
    max-width: 100%;
    box-sizing: border-box;
}
.calorito-clinical-note ul,
.calorito-clinical-note ol { margin: 2px 0; padding-right: 18px; }

/* v3.16.22: حالت ظرفیت منصفانه — دکمه فعال می‌ماند (مدل سبک‌تر)، فقط نشانگر */
#calorito-submit.calorito-quota-fallback {
    background: linear-gradient(135deg, #F57C00, #FFA726) !important;
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.35);
}


/* ═══════════════════════════════════════════════════════════════
   v3.18.0 — جریان پله‌ای: کارت دروازه + انصراف + بازیابی با کد پیگیری
   ═══════════════════════════════════════════════════════════════ */

/* کارت دروازه (اعلام قوانین/مکمل یا رژیم/ارزیابی) */
.calorito-gate-card {
    margin: 0 0 18px;
    padding: 18px 20px;
    border: 1px solid #c8e6c9;
    border-right: 5px solid #2E7D32;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(46, 125, 50, 0.08);
}
.calorito-gate-header {
    font-size: 16px;
    font-weight: 700;
    color: #1B5E20;
    margin-bottom: 8px;
    line-height: 1.8;
}
.calorito-gate-track {
    font-size: 12.5px;
    color: #555;
    background: #F1F8E9;
    border: 1px dashed #AED581;
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 10px;
    display: inline-block;
}
.calorito-gate-summary {
    font-size: 13px;
    color: #33413a;
    margin-bottom: 10px;
    line-height: 2;
}
.calorito-gate-section {
    margin-top: 12px;
    border-top: 1px solid #e8f0e9;
    padding-top: 10px;
}
.calorito-gate-section-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #2E7D32;
    margin-bottom: 6px;
}
.calorito-gate-body {
    font-size: 13px;
    line-height: 2.1;
    color: #333;
    max-height: 340px;
    overflow-y: auto;
    padding-left: 6px;
}
.calorito-gate-body ul,
.calorito-gate-body ol { margin: 4px 0; padding-right: 20px; }
.calorito-gate-empty {
    color: #777;
    font-size: 12.5px;
    margin: 4px 0;
}
.calorito-gate-eval {
    font-size: 13px;
    line-height: 2;
    color: #7a4f01;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-right: 4px solid #F9A825;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 10px 0;
}
.calorito-gate-eval ul { margin: 6px 0 2px; padding-right: 20px; }
.calorito-gate-eval li { margin-bottom: 2px; }
.calorito-gate-eval-ok {
    color: #1B5E20;
    background: #E8F5E9;
    border-color: #A5D6A7;
    border-right-color: #43A047;
}
.calorito-gate-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}
.calorito-advance-btn {
    flex: 1 1 220px;
    min-height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.calorito-advance-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(46, 125, 50, 0.45);
}
.calorito-advance-btn:disabled { opacity: 0.6; cursor: wait; }
.calorito-gate-cancel-btn {
    flex: 0 1 170px;
    min-height: 48px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    background: #fafafa;
    color: #b71c1c;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.calorito-gate-cancel-btn:hover { background: #fdecea; border-color: #ef9a9a; }
.calorito-gate-note {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    line-height: 1.9;
}
.calorito-gate-diet { margin-top: 6px; }

/* تا نسخهٔ نهایی، دکمه‌های عملیات نتیجه مخفی */
.calorito-response-container.calorito-gate-pending .calorito-action-buttons { display: none; }

/* دکمهٔ انصراف داخل کارت لودینگ */
.calorito-loading-cancel-btn {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 9px 12px;
    border: 1.5px solid #ef9a9a;
    border-radius: 10px;
    background: #fff5f5;
    color: #b71c1c;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}
.calorito-loading-cancel-btn:hover { background: #fdecea; }

/* ═══ v3.18.1: کارت تایم‌اوت + دکمهٔ بررسی وضعیت + یادداشت صندوق ═══ */
.calorito-stage-timeout-card {
    border: 1.5px solid #FFCC80;
    background: #FFF8E1;
}
.calorito-retry-stage-btn {
    flex: 1 1 220px;
    min-height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #E65100, #F57C00);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(230, 81, 0, 0.30);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.calorito-retry-stage-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(230, 81, 0, 0.40);
}
.calorito-retry-stage-btn:disabled { opacity: 0.6; cursor: wait; }
.calorito-loading-check-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1.5px solid #A5D6A7;
    border-radius: 10px;
    background: #F1F8E9;
    color: #1B5E20;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}
.calorito-loading-check-btn:hover { background: #E8F5E9; }
.calorito-loading-inbox-note {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #FFFDE7;
    border: 1px dashed #FBC02D;
    font-size: 11.5px;
    color: #795548;
    line-height: 1.9;
}


/* باکس بازیابی با کد پیگیری */
.calorito-recover-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0 4px;
    padding: 10px 14px;
    background: #F1F8E9;
    border: 1px dashed #AED581;
    border-radius: 12px;
}
.calorito-recover-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #33691E;
}
#calorito-recover-code {
    flex: 0 1 150px;
    padding: 8px 10px;
    border: 1px solid #c5e1a5;
    border-radius: 8px;
    font-size: 14px;
    letter-spacing: 1.5px;
    font-family: monospace, monospace;
    background: #fff;
    color: #1B5E20;
    outline: none;
}
#calorito-recover-code:focus { border-color: #2E7D32; box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.15); }
.calorito-recover-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #2E7D32;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}
.calorito-recover-btn:hover { background: #1B5E20; }

@media (max-width: 480px) {
    .calorito-gate-actions { flex-direction: column; }
    .calorito-advance-btn, .calorito-gate-cancel-btn, .calorito-retry-stage-btn { flex: 1 1 auto; width: 100%; }
    .calorito-recover-box { flex-direction: column; align-items: stretch; text-align: center; }
    #calorito-recover-code { flex: 1 1 auto; width: 100%; }
}

/* ═══ v3.18.3 — گزارش تب‌بندی‌شده + نوار خلاصه (محیط دریافت جواب فرندلی‌تر) ═══ */

/* نوار خلاصه: مهم‌ترین اعداد در یک نگاه + کد رژیم */
.calorito-report-shell { margin-top: 14px; }
.calorito-report-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.07), rgba(76, 175, 80, 0.12));
    border: 1px solid #C8E6C9;
    border-radius: 12px;
}
.calorito-sum-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #C8E6C9;
    color: #1B5E20;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.8;
}
.calorito-sum-chip-kcal { background: #E8F5E9; }
.calorito-sum-chip-prot { background: #F1F8E9; }
.calorito-sum-chip-dis  { background: #FFF8E1; border-color: #FFE082; color: #795548; }
.calorito-sum-chip-code { background: #E3F2FD; border-color: #90CAF9; color: #1565C0; }
.calorito-sum-chip-code b { letter-spacing: 1.5px; }

/* تب‌بار */
.calorito-tabs-bar {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}
.calorito-tab-btn {
    flex: 0 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border: 1px solid #C8E6C9;
    border-radius: 999px;
    background: #fff;
    color: #33691E;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.calorito-tab-btn:hover { background: #F1F8E9; }
.calorito-tab-btn.is-active {
    background: var(--calorito-gradient, linear-gradient(135deg, #2E7D32 0%, #4CAF50 100%));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(46, 125, 50, 0.35);
}

/* پنل‌ها */
.calorito-tab-panel { display: none; padding-top: 4px; }
.calorito-tab-panel.is-active { display: block; }
.calorito-tab-panel .calorito-report-group { margin-top: 10px; }

/* «جزئیات کنترل کیفیت» — کارت تحلیل (روندهای پردازش) جمع‌شونده */
.calorito-qa-details {
    margin-top: 12px;
    border: 1px dashed #C8E6C9;
    border-radius: 10px;
    background: #FAFFF7;
    overflow: hidden;
}
.calorito-qa-details summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: #2E7D32;
    padding: 11px 14px;
    user-select: none;
    list-style-position: inside;
}
.calorito-qa-details[open] summary { border-bottom: 1px dashed #C8E6C9; }
.calorito-qa-details .calorito-analysis-card {
    margin: 10px 14px 12px;
    border: none;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 600px) {
    .calorito-sum-chip { font-size: 11.5px; padding: 4px 10px; }
    .calorito-tab-btn { padding: 8px 12px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   v3.18.9 — بازخورد UI کاربر: باکس ماندگار مکمل‌ها (تاشو)، کارت
   ویژهٔ هشدار اعتبارسنجی بالینی (بعد از جدول رژیم + دکمهٔ اصلاح)،
   تب مکمل‌های جمع‌شونده و تقویت ظاهری کارت نکتهٔ بالینی.
   ═══════════════════════════════════════════════════════════════ */

/* ۱) باکس ماندگار «💊 مداخلات و مکمل‌ها» — جریان پله‌ای (دروازه ۱ →
      تولید رژیم → دروازه ۲). عنوان = دکمهٔ تاشو؛ بدنه در حالت جمع‌شده
      مخفی می‌شود. */
.calorito-supp-persist {
    /* v3.18.10 (دستور کاربر — «رنگشو عوض کن جذاب بشه»): تم فیروزه‌ای-زمردی
       با گرادیان ملایم و سایهٔ رنگی — متمایز از کارت‌های سبز معمولی گزارش */
    margin: 0 0 16px;
    border: 1px solid #B2DFDB;
    border-right: 5px solid #00897B;
    border-radius: 16px;
    background: linear-gradient(180deg, #E0F7FA 0%, #FFFFFF 42%);
    box-shadow: 0 4px 18px rgba(0, 137, 123, 0.14);
    overflow: hidden;
}
.calorito-supp-toggle-v3189 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 13px 16px;
    border: none;
    background: transparent;
    color: #00695C;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    text-align: right;
    transition: background 0.15s ease;
}
.calorito-supp-toggle-v3189:hover { background: rgba(0, 137, 123, 0.07); }
.calorito-supp-toggle-v3189 .calorito-supp-chevron {
    font-size: 13px;
    color: #00897B;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}
/* v3.18.10: نشان آیکن 💊 کنار عنوان باکس */
.calorito-supp-icon-badge-v31810 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 9px;
    margin-left: 9px;
    background: linear-gradient(135deg, #26A69A, #00897B);
    box-shadow: 0 2px 7px rgba(0, 137, 123, 0.4);
    font-size: 14px;
    vertical-align: middle;
}
.calorito-supp-persist.is-collapsed .calorito-supp-chevron { transform: rotate(-90deg); }
.calorito-supp-persist-body {
    padding: 2px 16px 14px;
    font-size: 13px;
    line-height: 2.1;
    color: #263238;
    max-height: 460px;
    overflow-y: auto;
    border-top: 1px solid #B2DFDB;
}
.calorito-supp-persist.is-collapsed .calorito-supp-persist-body { display: none; }
.calorito-supp-persist-body ul,
.calorito-supp-persist-body ol { margin: 4px 0; padding-right: 20px; }

/* ═══════════════════════════════════════════════════════════════
   v3.18.14 (دستور کاربر) — ۱) کارت «ارزیابی عملکرد مدل در تولید
   رژیم» (دروازهٔ ۲) تاشو  ۲) گروه «🍽️ برنامهٔ غذایی و گزارش» تاشو
   ۳) ریل ۵ دکمهٔ گرد شناور — سمت راست باکس‌های نوشتاری افزونه
   ═══════════════════════════════════════════════════════════════ */

/* ۱) کارت ارزیابی دروازهٔ ۲ — عنوان = دکمهٔ تاشو (رفتار باکس 💊) */
.calorito-gateeval-toggle-v31814 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 0 0 10px;
    margin-bottom: 10px;
    border: none;
    border-bottom: 1px solid #e8f0e9;
    background: transparent;
    color: #1B5E20;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-align: right;
    line-height: 1.8;
    transition: background 0.15s ease;
}
.calorito-gateeval-toggle-v31814:hover { background: rgba(46, 125, 50, 0.05); }
.calorito-gateeval-chevron-v31814 {
    font-size: 13px;
    color: #2E7D32;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}
.calorito-gateeval-box-v31814.is-collapsed .calorito-gateeval-chevron-v31814 { transform: rotate(-90deg); }
.calorito-gateeval-box-v31814.is-collapsed .calorito-gateeval-body-v31814 { display: none; }
.calorito-gateeval-box-v31814.is-collapsed .calorito-gateeval-toggle-v31814 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ۲) گروه 🍽️ گزارش نهایی — عنوان = دکمهٔ تاشو (همان پوستهٔ سبز عنوان) */
.calorito-rgroup-toggle-v31814 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    border: none;
    border-radius: 9px;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.28);
    letter-spacing: 0.2px;
    font-family: inherit;
    cursor: pointer;
    text-align: right;
    transition: filter 0.15s ease;
}
.calorito-rgroup-toggle-v31814:hover { filter: brightness(1.06); }
.calorito-rgroup-chevron-v31814 {
    font-size: 14px;
    color: #ffffff;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}
.calorito-rgroup-box-v31814.is-collapsed .calorito-rgroup-chevron-v31814 { transform: rotate(-90deg); }
.calorito-rgroup-box-v31814.is-collapsed .calorito-rgroup-body-v31814 { display: none; }
.calorito-rgroup-box-v31814.is-collapsed .calorito-rgroup-toggle-v31814 { margin-bottom: 0; }

/* ۳) ریل شناور — ۵ دکمهٔ گرد زیر هم، سمت راست باکس‌های نوشتاری */
.calorito-float-rail-v31814 {
    position: fixed;
    top: 45%;
    right: 8px;
    z-index: 99990;
    display: flex;
    flex-direction: column;
    gap: 10px;
    direction: rtl;
}
.calorito-float-rail-v31814.is-hidden { display: none; }
.calorito-float-btn-v31814 {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(46, 125, 50, 0.28);
    background: linear-gradient(135deg, #ffffff, #F1F8E9);
    color: #1B5E20;
    font-size: 20px;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(46, 125, 50, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.calorito-float-btn-v31814:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 16px rgba(46, 125, 50, 0.3);
    background: #E8F5E9;
}
.calorito-float-btn-v31814.is-hidden { display: none; }
/* دکمهٔ انصراف/بیمار جدید — تم قرمز ملایم، متمایز از ناوبری */
.calorito-float-btn-cancel-v31814 {
    border-color: #ef9a9a;
    background: linear-gradient(135deg, #ffffff, #FFEBEE);
    color: #b71c1c;
}
.calorito-float-btn-cancel-v31814:hover {
    background: #FFCDD2;
    box-shadow: 0 5px 16px rgba(183, 28, 28, 0.28);
}
@media (max-width: 782px) {
    .calorito-float-btn-v31814 { width: 40px; height: 40px; font-size: 17px; }
    .calorito-float-rail-v31814 { gap: 8px; }
}

/* ۲) کارت ویژهٔ «هشدار اعتبارسنجی بالینی» — بعد از جدول رژیم رندر
      می‌شود (دروازه ۲ و نتیجهٔ نهایی). طراحی متمایز قرمز-کهربایی برای
      جلب توجه متخصص + دکمهٔ اصلاح رژیم داخل خود کارت. */
.calorito-diet-warning-card {
    margin: 16px 0 4px;
    padding: 14px 16px;
    border: 2px solid #EF9A9A;
    border-right: 6px solid #C62828;
    border-radius: 14px;
    background: linear-gradient(180deg, #FFF5F5 0%, #FFF8F8 100%);
    box-shadow: 0 3px 14px rgba(198, 40, 40, 0.12);
}
.calorito-diet-warning-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}
.calorito-diet-warning-icon {
    font-size: 22px;
    line-height: 1;
    flex: 0 0 auto;
    animation: calorito-warn-pulse-v3189 2.2s ease-in-out infinite;
}
@keyframes calorito-warn-pulse-v3189 {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
    .calorito-diet-warning-icon { animation: none; }
}
.calorito-diet-warning-title {
    font-size: 15px;
    font-weight: 800;
    color: #B71C1C;
    line-height: 1.7;
}
.calorito-diet-warning-sub {
    font-size: 12.5px;
    color: #8d5555;
    margin-top: 2px;
    line-height: 1.9;
}
.calorito-diet-warning-intro {
    font-size: 13px;
    color: #5d4037;
    line-height: 2;
    margin: 4px 0 6px;
}
.calorito-diet-warning-list {
    margin: 6px 0 10px;
    padding-right: 22px;
    list-style: none;
    counter-reset: calorito-warn-v3189;
}
.calorito-diet-warning-list li {
    position: relative;
    font-size: 13px;
    color: #7f2c2c;
    line-height: 2.1;
    padding: 3px 10px 3px 8px;
    margin-bottom: 4px;
    background: #FDECEA;
    border: 1px solid #F5C6C6;
    border-radius: 8px;
    counter-increment: calorito-warn-v3189;
}
.calorito-diet-warning-list li::before {
    content: counter(calorito-warn-v3189);
    position: absolute;
    right: -8px;
    top: 9px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #C62828;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 20px;
}
.calorito-diet-warning-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #EFBDBD;
}
.calorito-diet-warn-fix-btn {
    padding: 9px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #C62828 0%, #E53935 100%);
    color: #fff;
    font-size: 13.5px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(198, 40, 40, 0.3);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    flex: 0 0 auto;
}
.calorito-diet-warn-fix-btn:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(198, 40, 40, 0.4); }
.calorito-diet-warn-fix-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.calorito-diet-warn-hint {
    font-size: 12px;
    color: #8d5555;
    line-height: 1.9;
}

/* ۳) تب «💊 مکمل‌ها و تداخلات» جمع‌شونده — کلیک روی تب فعال، پنل را
      جمع/باز می‌کند؛ نشانگر جهت‌دار وضعیت را نشان می‌دهد. */
.calorito-tab-chevron-v3189 {
    font-size: 11px;
    display: inline-block;
    transition: transform 0.2s ease;
}
.calorito-tab-btn.is-collapsed-v3189 .calorito-tab-chevron-v3189 { transform: rotate(-90deg); }
.calorito-tab-panel.is-collapsed-v3189 { display: none; }
.calorito-tab-panel.is-collapsed-v3189.is-active { display: none; }

/* ۴) تقویت ظاهری کارت «نکتهٔ بالینی برای متخصص» — حالا بعد از جدول
      رژیم در تب 🍽️ می‌نشیند و دکمهٔ اصلاح دارد. */
.calorito-note-enhanced-v3189 {
    border-width: 2px !important;
    border-right-width: 6px !important;
    border-color: #E6C068 !important;
    border-right-color: #B8860B !important;
    box-shadow: 0 3px 14px rgba(184, 134, 11, 0.14) !important;
    margin-top: 14px !important;
}
.calorito-note-enhanced-v3189 .calorito-note-fix-btn-v3189 {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #B8860B 0%, #D4A017 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(184, 134, 11, 0.28);
}
.calorito-note-enhanced-v3189 .calorito-note-fix-btn-v3189:hover { box-shadow: 0 5px 12px rgba(184, 134, 11, 0.38); }

/* موبایل — کارت هشدار و باکس مکمل */
@media (max-width: 600px) {
    .calorito-supp-toggle-v3189 { font-size: 13.5px; padding: 12px 13px; }
    .calorito-diet-warning-card { padding: 12px 12px; }
    .calorito-diet-warning-title { font-size: 13.5px; }
    .calorito-diet-warning-list li { font-size: 12px; }
    .calorito-diet-warn-fix-btn { width: 100%; text-align: center; }
    .calorito-diet-warn-hint { width: 100%; }
}

/* ۵) کارت «موارد قابل بهبود کیفیت و تنوع» — بلوک نرم پس از تفکیک
      بالینی/کیفیت (v3.18.9). طراحی ملایم سبز-آبی؛ برخلاف کارت هشدار،
      این موارد ایراد بالینی ندارند. */
.calorito-quality-card-v3189 {
    margin: 12px 0 4px;
    padding: 12px 16px;
    border: 1px solid #B2DFDB;
    border-right: 5px solid #00796B;
    border-radius: 12px;
    background: #F0FDFA;
}
.calorito-quality-card-head-v3189 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.calorito-quality-card-icon-v3189 { font-size: 17px; line-height: 1; }
.calorito-quality-card-title-v3189 {
    font-size: 13.5px;
    font-weight: 800;
    color: #00695C;
}
.calorito-quality-card-intro-v3189 {
    font-size: 12.5px;
    color: #4f6d6a;
    line-height: 2;
    margin: 2px 0 6px;
}
.calorito-quality-card-list-v3189 {
    margin: 4px 0 8px;
    padding-right: 20px;
    list-style: disc;
}
.calorito-quality-card-list-v3189 li {
    font-size: 12.5px;
    color: #37474F;
    line-height: 2;
    margin-bottom: 2px;
}
.calorito-quality-card-actions-v3189 {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px dashed #B2DFDB;
}
.calorito-quality-fix-btn-v3189 {
    padding: 7px 14px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #00796B 0%, #26A69A 100%);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 121, 107, 0.25);
}
.calorito-quality-fix-btn-v3189:hover { box-shadow: 0 4px 10px rgba(0, 121, 107, 0.35); }
.calorito-quality-card-hint-v3189 {
    font-size: 11.5px;
    color: #4f6d6a;
    line-height: 1.9;
}


/* ═══════════════════════════════════════════════════════════════
   v3.18.10 — بازخورد UI کاربر: باکس گرافیکی 📊 شاخص‌های بیمار، بلوک
   تداخل/دیسکلیمر باکس 💊، تب‌ها با جایگاه درست کارت هشدار.
   ═══════════════════════════════════════════════════════════════ */

/* ۱) باکس «📊 شاخص‌های بیمار و هدف‌گذاری رژیم» — مستقل و تاشو */
.calorito-metrics-box {
    margin: 0 0 16px;
    border: 1px solid #C5CAE9;
    border-right: 5px solid #3949AB;
    border-radius: 16px;
    background: linear-gradient(180deg, #E8EAF6 0%, #FFFFFF 42%);
    box-shadow: 0 4px 18px rgba(57, 73, 171, 0.12);
    overflow: hidden;
}
.calorito-metrics-toggle-v31810 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 13px 16px;
    border: none;
    background: transparent;
    color: #283593;
    font-size: 15px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    text-align: right;
    transition: background 0.15s ease;
}
.calorito-metrics-toggle-v31810:hover { background: rgba(57, 73, 171, 0.07); }
.calorito-metrics-toggle-v31810 .calorito-metrics-chevron {
    font-size: 13px;
    color: #3949AB;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
}
.calorito-metrics-box.is-collapsed .calorito-metrics-chevron { transform: rotate(-90deg); }
.calorito-metrics-body {
    padding: 14px 16px 16px;
    border-top: 1px solid #C5CAE9;
}
.calorito-metrics-box.is-collapsed .calorito-metrics-body { display: none; }

/* شبکهٔ کارت‌های عددی */
.calorito-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 10px;
}
.calorito-metric-card {
    background: #FFFFFF;
    border: 1px solid #E3E6F5;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 2px 8px rgba(40, 53, 147, 0.06);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.calorito-metric-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #5C6BC0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calorito-metric-value {
    font-size: 19px;
    font-weight: 900;
    color: #283593;
    line-height: 1.35;
}
.calorito-metric-value small {
    font-size: 11.5px;
    font-weight: 600;
    color: #7986CB;
}
.calorito-metric-sub {
    font-size: 11px;
    color: #78909C;
    line-height: 1.7;
}

/* نوار ظرفیت استفادهٔ منصفانه */
.calorito-quota-track {
    height: 9px;
    border-radius: 6px;
    background: #ECEFF1;
    overflow: hidden;
    display: block;
}
.calorito-quota-fill {
    display: block;
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}
.calorito-quota-fill.is-quota-green { background: linear-gradient(90deg, #66BB6A, #43A047); }
.calorito-quota-fill.is-quota-amber { background: linear-gradient(90deg, #FFB74D, #FB8C00); }
.calorito-quota-fill.is-quota-red { background: linear-gradient(90deg, #EF5350, #E53935); }

/* نوار BMI چهارمنطقه‌ای (راست = کم‌وزن) */
.calorito-bmi-track {
    position: relative;
    height: 9px;
    border-radius: 6px;
    margin-top: 3px;
    background: linear-gradient(to left,
        #64B5F6 0%, #64B5F6 12.5%,
        #66BB6A 12.5%, #66BB6A 32%,
        #FFA726 32%, #FFA726 47%,
        #EF5350 47%, #EF5350 100%);
}
.calorito-bmi-marker {
    position: absolute;
    top: -3.5px;
    width: 4px;
    height: 16px;
    border-radius: 3px;
    background: #283593;
    box-shadow: 0 0 0 2px #FFFFFF, 0 1px 4px rgba(0, 0, 0, 0.35);
    transform: translateX(50%);
}

/* کارت الگوی غذایی */
.calorito-metric-pattern { grid-column: 1 / -1; }
.calorito-metric-pattern-body {
    font-size: 12.5px;
    line-height: 2;
    color: #37474F;
}

/* نمودار میله‌ای انرژی BMR/TDEE/هدف */
.calorito-energy-chart {
    margin-top: 12px;
    background: #FFFFFF;
    border: 1px solid #E3E6F5;
    border-radius: 12px;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.calorito-energy-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.calorito-energy-lbl {
    flex: 0 0 168px;
    font-size: 11px;
    font-weight: 700;
    color: #546E7A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calorito-energy-track {
    flex: 1 1 auto;
    height: 13px;
    background: #ECEFF1;
    border-radius: 7px;
    overflow: hidden;
    display: block;
}
.calorito-energy-fill {
    display: block;
    height: 100%;
    border-radius: 7px;
    transition: width 0.45s ease;
}
.calorito-energy-fill.is-bar-bmr { background: linear-gradient(90deg, #7986CB, #5C6BC0); }
.calorito-energy-fill.is-bar-tdee { background: linear-gradient(90deg, #FFB74D, #FB8C00); }
.calorito-energy-fill.is-bar-goal { background: linear-gradient(90deg, #4DB6AC, #00897B); }
.calorito-energy-val {
    flex: 0 0 52px;
    font-size: 12px;
    font-weight: 800;
    color: #283593;
    text-align: left;
}

/* جزئیات محاسبات عددی (تاشو) */
.calorito-metrics-details {
    margin-top: 10px;
    border-top: 1px dashed #C5CAE9;
    padding-top: 8px;
}
.calorito-metrics-details summary {
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    color: #3949AB;
    padding: 4px 0 6px;
    user-select: none;
}
.calorito-metrics-details-body {
    font-size: 12.5px;
    line-height: 2;
    color: #37474F;
}

/* ۲) بلوک تداخل + دیسکلیمر داخل باکس 💊 */
.calorito-supp-inter-v31810 {
    margin-top: 10px;
    border-top: 1px dashed #80CBC4;
    padding-top: 8px;
}
.calorito-supp-inter-title-v31810 {
    font-weight: 800;
    color: #00695C;
    font-size: 13.5px;
    margin-bottom: 4px;
}
.calorito-supp-inter-body-v31810 {
    font-size: 13px;
    line-height: 2.05;
    color: #263238;
}
.calorito-supp-disclaimer-v31810 {
    margin-top: 10px;
    padding: 8px 12px;
    background: #E0F2F1;
    border: 1px solid #B2DFDB;
    border-radius: 10px;
    color: #00695C;
    font-size: 12.5px;
    line-height: 1.95;
}

/* ۳) عنوان گروه تکراری داخل باکس‌ها مخفی می‌شود (خروجی formatResponse
      بخش‌های ۳/۵ را داخل پوستهٔ «💊 مداخلات و مکمل‌ها» می‌پیچد — داخل خود
      باکس/جزئیات، این عنوان زائد است) */
.calorito-supp-persist-body .calorito-report-group-interventions,
.calorito-supp-inter-body-v31810 .calorito-report-group-interventions,
.calorito-metric-pattern-body .calorito-report-group-interventions,
.calorito-metrics-details-body .calorito-report-group-interventions {
    border: none;
    box-shadow: none;
    background: transparent;
    margin: 0;
    padding: 0;
}
.calorito-supp-persist-body .calorito-report-group-interventions > .calorito-report-group-title,
.calorito-supp-inter-body-v31810 .calorito-report-group-interventions > .calorito-report-group-title,
.calorito-metric-pattern-body .calorito-report-group-interventions > .calorito-report-group-title,
.calorito-metrics-details-body .calorito-report-group-interventions > .calorito-report-group-title {
    display: none;
}
.calorito-supp-persist-body .calorito-response-section,
.calorito-metrics-details-body .calorito-response-section {
    margin: 6px 0;
}

/* ۴) ریسپانسیو */
@media (max-width: 600px) {
    .calorito-metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .calorito-energy-lbl { flex: 0 0 118px; font-size: 10px; }
    .calorito-energy-val { flex: 0 0 44px; font-size: 11px; }
    .calorito-metric-value { font-size: 17px; }
}

/* ۵) چاپ — باکس‌های بالینی در خروجی چاپ هم دیده شوند */
@media print {
    .calorito-metrics-box,
    .calorito-supp-persist {
        box-shadow: none;
        break-inside: avoid;
    }
    .calorito-metrics-body { max-height: none; overflow: visible; }
    .calorito-supp-persist-body { max-height: none; overflow: visible; }
}


/* ════════════════════════════════════════════════════════════════
   v3.18.16 — U3) دکمهٔ کپی کد پیگیری + U4b) کارت خطای اصلاح رژیم
   ════════════════════════════════════════════════════════════════ */

/* دکمهٔ کپی — در همهٔ خطوط کد پیگیری (لودینگ/خطا/دروازه/کارت اصلاح) */
.calorito-track-copy-btn-v31816 {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    margin-inline-start: 6px;
    border: 1px solid #A5D6A7;
    border-radius: 8px;
    background: #ffffff;
    color: #1B5E20;
    font-size: 11.5px;
    font-family: inherit;
    line-height: 1.6;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.calorito-track-copy-btn-v31816:hover {
    background: #E8F5E9;
    border-color: #81C784;
    transform: translateY(-1px);
}
.calorito-track-copy-btn-v31816:focus-visible {
    outline: 2px solid #2E7D32;
    outline-offset: 2px;
}
.calorito-track-copy-btn-v31816.is-copied {
    background: #C8E6C9;
    border-color: #66BB6A;
    color: #1B5E20;
    cursor: default;
}
.calorito-track-copy-btn-v31816:disabled {
    opacity: 1;
}

/* کارت خطای اصلاح رژیم — ماندگار، غیرمخرب (رژیم روی صفحه می‌ماند) */
.calorito-manualfix-error-card {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #FFF8E1;
    border: 1px solid #FFCC80;
    border-right: 4px solid #EF6C00;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(239, 108, 0, 0.08);
}
.calorito-manualfix-error-title {
    font-weight: 700;
    font-size: 14px;
    color: #E65100;
    margin-bottom: 6px;
}
.calorito-manualfix-error-msg {
    font-size: 13px;
    color: #5D4037;
    line-height: 1.9;
    margin-bottom: 6px;
}
.calorito-manualfix-error-note {
    font-size: 12px;
    color: #795548;
    line-height: 1.9;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
}
.calorito-manualfix-track-line {
    font-size: 12.5px;
    color: #4E342E;
    margin-bottom: 10px;
}
.calorito-manualfix-track-line b {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    letter-spacing: 1.5px;
    color: #1B5E20;
    background: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid #C8E6C9;
}
.calorito-manualfix-error-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.calorito-mf-recheck-btn-v31816 {
    padding: 8px 16px;
    border: 1px solid #EF6C00;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #FFF3E0);
    color: #E65100;
    font-size: 12.5px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.calorito-mf-recheck-btn-v31816:hover {
    background: #FFE0B2;
    transform: translateY(-1px);
}
.calorito-mf-recheck-btn-v31816:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

/* ═══ v3.18.17 (J1 — دستور کاربر: «وقتی اصلاح رژیم اجرا میشه یک مکانیسم
       بصری بده، مثل انیمیشن»): بنر پیشرفت «در حال اصلاح رژیم» + حالت
       محو/پالس محتوای فعلی — کاربر همیشه می‌داند سیستم در حال تغییر است ═══ */
.calorito-fix-banner-v31817 {
    margin: 0 0 14px;
    padding: 14px 16px 12px;
    border: 1px solid #90CAF9;
    border-right: 4px solid #1565C0;
    border-radius: 12px;
    background: linear-gradient(135deg, #E3F2FD, #E8F4FD);
    direction: rtl;
    box-shadow: 0 3px 14px rgba(21, 101, 192, 0.14);
}
.calorito-fix-banner-head-v31817 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.calorito-fix-banner-gear-v31817 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #BBDEFB;
    font-size: 18px;
    animation: caloritoFixSpinV31817 2.4s ease-in-out infinite;
}
@keyframes caloritoFixSpinV31817 {
    0%   { transform: rotate(0deg) scale(1); }
    30%  { transform: rotate(120deg) scale(1.08); }
    60%  { transform: rotate(240deg) scale(1); }
    100% { transform: rotate(360deg) scale(1); }
}
.calorito-fix-banner-title-v31817 {
    font-weight: 700;
    font-size: 14.5px;
    color: #0D47A1;
}
.calorito-fix-banner-eta-v31817 {
    font-size: 11.5px;
    color: #1976D2;
    background: #fff;
    border: 1px dashed #90CAF9;
    border-radius: 999px;
    padding: 2px 10px;
}
.calorito-fix-banner-track-v31817 {
    position: relative;
    height: 8px;
    margin: 10px 0 8px;
    border-radius: 999px;
    background: #BBDEFB;
    overflow: hidden;
}
.calorito-fix-banner-fill-v31817 {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1976D2, #42A5F5, #90CAF9, #1976D2);
    background-size: 220% 100%;
    animation: caloritoFixSweepV31817 2.2s linear infinite;
}
@keyframes caloritoFixSweepV31817 {
    0%   { background-position: 0% 0; left: -40%; width: 45%; }
    50%  { background-position: 100% 0; left: 25%; width: 60%; }
    100% { background-position: 0% 0; left: 100%; width: 45%; }
}
.calorito-fix-banner-steps-v31817 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
}
.calorito-fix-step-v31817 {
    font-size: 11.5px;
    color: #78909C;
    background: #fff;
    border: 1px solid #CFD8DC;
    border-radius: 999px;
    padding: 2px 10px;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.calorito-fix-step-v31817.is-active {
    color: #0D47A1;
    border-color: #64B5F6;
    background: #E3F2FD;
    animation: caloritoFixStepPulseV31817 1.6s ease-in-out infinite;
}
@keyframes caloritoFixStepPulseV31817 {
    0%, 100% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.35); }
    50%      { box-shadow: 0 0 0 5px rgba(33, 150, 243, 0); }
}

/* حالت «در حال اصلاح» — محتوای فعلی محو + پالس لطیف (تغییر در جریان است) */
.calorito-response-container.calorito-fixing-v31817 .calorito-response-content > *:not(.calorito-fix-banner-v31817) {
    opacity: 0.55;
    transition: opacity 0.4s ease;
    animation: caloritoFixContentPulseV31817 2.6s ease-in-out infinite;
}
@keyframes caloritoFixContentPulseV31817 {
    0%, 100% { opacity: 0.55; }
    50%      { opacity: 0.8; }
}
/* بنر و خودش نباید تحت‌تأثیر قرار بگیرد */
.calorito-response-container.calorito-fixing-v31817 .calorito-fix-banner-v31817 {
    opacity: 1;
    animation: caloritoFixBannerInV31817 0.35s ease-out;
}
@keyframes caloritoFixBannerInV31817 {
    from { transform: translateY(-8px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@media (max-width: 782px) {
    .calorito-fix-banner-v31817 { padding: 10px 12px 10px; }
    .calorito-fix-banner-title-v31817 { font-size: 13px; }
    .calorito-fix-banner-eta-v31817 { font-size: 10.5px; }
    .calorito-fix-step-v31817 { font-size: 10.5px; }
}

/* ═══ v3.18.17 (J2): ناحیهٔ رژیم نهایی — همان الگوی کشویی دروازهٔ ۲ ═══ */
.calorito-final-diet-area { margin-top: 4px; }
.calorito-final-diet-area .calorito-rgroup-box-v31814 + .calorito-clinical-note { margin-top: 0; }
