/* ============================================================
   theme-shared.css
   استایل‌های مشترک سایت — قابل استفاده در همه فرم‌ها
   ============================================================ */

/* ============================================================
   1) متغیرهای رنگی ثابت
   ============================================================ */
:root {
    /* رنگ اصلی */
    --ts-primary: #7ba5b0;
    --ts-primary-dark: #4d7d8a;
    --ts-primary-light: #cae0e4;
    --ts-primary-lighter: #d8e8ec;
    --ts-primary-bg: #f0f6f8;
    /* متن */
    --ts-text: #2c3e42;
    --ts-text-muted: #6b8189;
    --ts-text-light: #b8c5cb;
    /* پس‌زمینه */
    --ts-bg-header: linear-gradient(135deg, #f8f9fb 0%, #eef1f5 100%);
    --ts-bg-card: #fafbfc;
    --ts-bg-hover: #f0f6f8;
    /* Border */
    --ts-border: #eef1f5;
    --ts-border-strong: #d8e8ec;
    --ts-border-hover: #cae0e4;
    /* سایه */
    --ts-shadow-card: 0 4px 18px rgba(0, 0, 0, 0.06);
    --ts-shadow-hover: 0 4px 14px rgba(77, 125, 138, 0.08);
    --ts-shadow-btn: 0 4px 12px rgba(77, 125, 138, 0.3);
    --ts-shadow-btn-hover: 0 6px 18px rgba(77, 125, 138, 0.4);
}

/* ============================================================
   2) کارت مشترک — .ts-card
   ============================================================ */
.ts-card {
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: var(--ts-shadow-card) !important;
    overflow: hidden;
    background-color: #fff !important;
    margin-bottom: 20px !important;
    height: auto !important;
}

    .ts-card .card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
        padding: 16px 22px !important;
        background: var(--ts-bg-header) !important;
        border-bottom: 1px solid #e9ecef !important;
        border-radius: 14px 14px 0 0 !important;
    }

    .ts-card .card-body {
        padding: 18px 22px !important;
    }

    .ts-card .card-footer {
        padding: 14px 22px !important;
        background: var(--ts-bg-card) !important;
        border-top: 1px solid var(--ts-border) !important;
        border-radius: 0 0 14px 14px !important;
    }

    /* ---- عنوان هدر ---- */
    .ts-card .card-title {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: var(--ts-text);
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

        .ts-card .card-title i {
            color: var(--ts-primary-dark);
        }

/* ============================================================
   3) کارت داخلی — .ts-inner-card
   ============================================================ */
.ts-inner-card {
    background: var(--ts-bg-card) !important;
    border: 1px solid var(--ts-border) !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

    .ts-inner-card:hover {
        background: var(--ts-bg-hover) !important;
        border-color: var(--ts-border-hover) !important;
        box-shadow: var(--ts-shadow-hover) !important;
    }

/* ============================================================
   4) دکمه‌های عمومی سایت — .ts-btn
   ============================================================ */

/* ---- دکمه اصلی (برجسته) ---- */
.ts-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px !important;
    font-size: 12px !important;
    font-weight: 600;
    line-height: 1.4;
    color: #fff !important;
    background: linear-gradient(135deg, var(--ts-primary-dark) 0%, var(--ts-primary) 100%) !important;
    border: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(77, 125, 138, 0.28) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .ts-btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(77, 125, 138, 0.42) !important;
        color: #fff !important;
        text-decoration: none;
    }

    .ts-btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 1px 4px rgba(77, 125, 138, 0.25) !important;
    }

/* ---- دکمه ثانویه (روشن) — نسخه کوچک ---- */
.ts-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px !important;
    font-size: 12px !important;
    font-weight: 600;
    line-height: 1.4;
    color: var(--ts-primary-dark) !important;
    background: var(--ts-primary-bg) !important;
    border: 1px solid var(--ts-border-strong) !important;
    border-radius: 8px !important;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

    .ts-btn-secondary:hover {
        background: #e9f0f2 !important;
        transform: translateY(-1px);
        color: var(--ts-primary-dark) !important;
    }

/* ---- دکمه آیکونی کوچک ---- */
.ts-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px !important;
    border-radius: 8px !important;
    background: var(--ts-primary-bg) !important;
    color: var(--ts-primary-dark) !important;
    border: 1px solid var(--ts-border-strong) !important;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}

    .ts-btn-icon:hover {
        background: linear-gradient(135deg, var(--ts-primary-dark) 0%, var(--ts-primary) 100%) !important;
        color: #fff !important;
        border-color: transparent !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(77, 125, 138, 0.3) !important;
    }
.big-form .ts-btn-primary,
.big-form .ts-btn-secondary {
    padding: 9px 20px !important;
    font-size: 13.5px !important;
    border-radius: 10px !important;
}
/* ============================================================
   5) دکمه‌های رنگی — .badge-action-* (برای badge و btn)
   ============================================================ */

/* 1) پیام صوتی — لاوندر */
.badge-action-audio {
    background: linear-gradient(135deg, #8b7ba8 0%, #a89bc0 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(139, 123, 168, 0.35) !important;
    border: 0 !important;
}

    .badge-action-audio:hover {
        box-shadow: 0 6px 16px rgba(139, 123, 168, 0.55) !important;
        transform: translateY(-1px);
    }

/* 2) پیام — تیل */
.badge-action-message {
    background: linear-gradient(135deg, #4d8a8a 0%, #7ba5a5 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(77, 138, 138, 0.35) !important;
    border: 0 !important;
}

    .badge-action-message:hover {
        box-shadow: 0 6px 16px rgba(77, 138, 138, 0.55) !important;
        transform: translateY(-1px);
    }

/* 3) درخواست — آبی فولادی */
.badge-action-request {
    background: linear-gradient(135deg, #5a7fa5 0%, #7ba0c0 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(90, 127, 165, 0.35) !important;
    border: 0 !important;
}

    .badge-action-request:hover {
        box-shadow: 0 6px 16px rgba(90, 127, 165, 0.55) !important;
        transform: translateY(-1px);
    }

/* 4) ارجاع — کهربایی */
.badge-action-task {
    background: linear-gradient(135deg, #a58a5a 0%, #c0a87b 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(165, 138, 90, 0.35) !important;
    border: 0 !important;
}

    .badge-action-task:hover {
        box-shadow: 0 6px 16px rgba(165, 138, 90, 0.55) !important;
        transform: translateY(-1px);
    }

/* 5) جلسه — رُز */
.badge-action-meeting {
    background: linear-gradient(135deg, #a55a7b 0%, #c07b9b 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(165, 90, 123, 0.35) !important;
    border: 0 !important;
}

    .badge-action-meeting:hover {
        box-shadow: 0 6px 16px rgba(165, 90, 123, 0.55) !important;
        transform: translateY(-1px);
    }

/* 6) گزارش / چاپ — خاکستری آبی */
.badge-action-report {
    background: linear-gradient(135deg, #6b8189 0%, #8fa8b0 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(107, 129, 137, 0.35) !important;
    border: 0 !important;
}

    .badge-action-report:hover {
        box-shadow: 0 6px 16px rgba(107, 129, 137, 0.55) !important;
        transform: translateY(-1px);
    }

/* 7) تایید / ذخیره — سبز اصلی */
.badge-action-success {
    background: linear-gradient(135deg, #4d7d8a 0%, #7ba5b0 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(77, 125, 138, 0.35) !important;
    border: 0 !important;
}

    .badge-action-success:hover {
        box-shadow: 0 6px 16px rgba(77, 125, 138, 0.55) !important;
        transform: translateY(-1px);
    }

/* 8) حذف / انصراف — قرمز ملایم */
.badge-action-danger {
    background: linear-gradient(135deg, #a54a5a 0%, #c07b8a 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(165, 74, 90, 0.35) !important;
    border: 0 !important;
}

    .badge-action-danger:hover {
        box-shadow: 0 6px 16px rgba(165, 74, 90, 0.55) !important;
        transform: translateY(-1px);
    }

/* 9) اطلاعات — آبی آسمانی */
.badge-action-info {
    background: linear-gradient(135deg, #5a8aa5 0%, #7baac0 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(90, 138, 165, 0.35) !important;
    border: 0 !important;
}

    .badge-action-info:hover {
        box-shadow: 0 6px 16px rgba(90, 138, 165, 0.55) !important;
        transform: translateY(-1px);
    }

/* 10) ثانویه — خاکستری */
.badge-action-secondary {
    background: linear-gradient(135deg, #7a7a7a 0%, #a0a0a0 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(122, 122, 122, 0.35) !important;
    border: 0 !important;
}

    .badge-action-secondary:hover {
        box-shadow: 0 6px 16px rgba(122, 122, 122, 0.55) !important;
        transform: translateY(-1px);
    }

/* ============================================================
   6) بج‌های وضعیت — .ts-badge
   ============================================================ */
.ts-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: 600;
    border: 0;
    line-height: 1.4;
}

.ts-badge-primary {
    background: linear-gradient(135deg, var(--ts-primary-dark) 0%, var(--ts-primary) 100%) !important;
    color: #fff !important;
    box-shadow: 0 2px 6px rgba(77, 125, 138, 0.25);
}

.ts-badge-success {
    background: #e7fbe6 !important;
    color: #22a91f !important;
}

.ts-badge-warning {
    background: #fff6e5 !important;
    color: #b87800 !important;
}

.ts-badge-danger {
    background: #fde8ec !important;
    color: #a52a3d !important;
}

.ts-badge-info {
    background: #e6f4f8 !important;
    color: #2b6b7c !important;
}

.ts-badge-dark {
    background: #eef1f5 !important;
    color: var(--ts-text) !important;
}

/* ============================================================
   7) لینک‌ها — .ts-link
   ============================================================ */
.ts-link {
    color: var(--ts-primary-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

    .ts-link:hover {
        color: var(--ts-text);
        text-decoration: underline;
    }

/* ============================================================
   8) dropdown — .ts-dropdown
   ============================================================ */
.ts-dropdown-menu {
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
    padding: 8px;
}

    .ts-dropdown-menu .dropdown-item {
        border-radius: 8px;
        padding: 8px 14px;
        color: var(--ts-text);
        font-size: 13px;
        transition: all 0.15s ease;
    }

        .ts-dropdown-menu .dropdown-item:hover {
            background: var(--ts-bg-hover);
            color: var(--ts-primary-dark);
        }

/* ============================================================
   9) فرم — .ts-form-control
   ============================================================ */
.ts-form-control {
    border: 1px solid var(--ts-border-strong) !important;
    border-radius: 10px !important;
    background: var(--ts-bg-card) !important;
    padding: 10px 14px;
    transition: all 0.2s ease;
    font-size: 13.5px;
    color: var(--ts-text);
}

    .ts-form-control:focus {
        border-color: var(--ts-primary) !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(123, 165, 176, 0.15) !important;
        outline: 0;
    }

    .ts-form-control::placeholder {
        color: var(--ts-text-light);
    }

/* ============================================================
   10) حالت خالی — .ts-empty
   ============================================================ */
.ts-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--ts-text-light);
}

    .ts-empty i {
        font-size: 56px;
        color: var(--ts-border-strong);
        margin-bottom: 14px;
        display: block;
    }

    .ts-empty p {
        font-size: 14px;
        margin-bottom: 18px;
    }

/* ============================================================
   11) لیست گروهی — .ts-list
   ============================================================ */
.ts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .ts-list .ts-list-item {
        background: var(--ts-bg-card);
        border: 1px solid var(--ts-border);
        border-radius: 10px;
        padding: 10px 14px;
        margin-bottom: 6px;
        transition: all 0.2s ease;
    }

        .ts-list .ts-list-item:hover {
            background: var(--ts-bg-hover);
            border-color: var(--ts-border-hover);
        }

/* ============================================================
   12) اسکرول‌بار — .ts-scroll
   ============================================================ */
.ts-scroll {
    padding-right: 6px;
}

    .ts-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .ts-scroll::-webkit-scrollbar-track {
        background: var(--ts-primary-bg);
        border-radius: 10px;
    }

    .ts-scroll::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--ts-primary) 0%, var(--ts-primary-dark) 100%);
        border-radius: 10px;
    }

/* ============================================================
   13) ریسپانسیو عمومی
   ============================================================ */
@media (max-width: 576px) {
    .ts-card .card-header {
        padding: 14px 16px !important;
    }

    .ts-card .card-body,
    .ts-card .card-footer {
        padding: 14px 16px !important;
    }

    .ts-btn-primary,
    .ts-btn-secondary {
        padding: 8px 14px !important;
        font-size: 12.5px !important;
    }
}

/* ============================================================
   13) layout style
   ============================================================ */

/* Optional: CSS for recommended sizes */
.jdp-container {
    z-index: 9999 !important;
}

.material-icons.md-36 {
    font-size: 36px;
}

.material-icons.md-48 {
    font-size: 48px;
}

.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.tooltip-text {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
    /* موقعیت قرارگیری */
    position: absolute;
    z-index: 1;
    bottom: 125%; /* نمایش بالای عنصر */
    left: 50%;
    transform: translateX(-50%);
    /* جلوه ظاهری */
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.selected-row {
    background-color: #d9edf7 !important;
}

.nested-list {
    list-style: none;
    padding-right: 0;
    margin: 0;
}

    /* هر سطح تو رفتگی بیشتری دارد */
    .nested-list .nested-list {
        padding-right: 25px; /* میزان تو رفتگی برای سطوح بعدی */
        border-right: 2px dashed #ddd; /* یک خط راهنما برای نمایش سلسله‌مراتب */
        margin-right: 10px;
    }

    /* هر آیتم لیست */
    .nested-list li {
        margin: 4px 0;
        list-style: none;
    }

/* کانتینر هر آیتم (شامل دکمه و نام) */
.item-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    transition: background-color 0.2s;
    cursor: default;
}

    .item-container:hover {
        background-color: #e9ecef;
    }

/* دکمه +/- */
.toggle-btn {
    background: none;
    border: 1px solid #6c757d;
    border-radius: 4px;
    width: 26px;
    height: 26px;
    font-weight: bold;
    font-size: 16px;
    color: #495057;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

    .toggle-btn:hover {
        background-color: #dee2e6;
        border-color: #495057;
    }

/* جای خالی برای آیتم‌های بدون فرزند */
.no-child {
    display: inline-block;
    width: 26px;
    text-align: center;
    color: #adb5bd;
    font-size: 18px;
}

/* نام آیتم */
.item-name {
    font-size: 16px;
    font-weight: 500;
    color: #212529;
}

.item-Link {
    font-size: 16px;
    font-weight: 500;
    color: #4d7d8a;
    text-decoration: none; /* حذف زیرخط پیش‌فرض */
    transition: color 0.2s;
}

    .item-Link:hover {
        color: #2c3e42; /* تیره‌تر در هاور */
        text-decoration: underline;
    }
/* کانتینر زیرمجموعه‌ها (برای انیمیشن) */
.children-container {
    padding-right: 80px; /* میزان تو رفتگی برای سطوح بعدی */
    overflow: hidden;
    transition: max-height 0.3s ease;
}

    .children-container.collapsed {
        max-height: 0;
    }

    .children-container.expanded {
        max-height: 2000px; /* مقدار کافی برای نمایش همه زیرمجموعه‌ها */
    }

/* انیمیشن پالس برای دکمه ضبط */
.record-btn-recording {
    background: #ff4d4d !important;
    animation: pulse 1.2s infinite;
    box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7) !important;
}

@@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 77, 77, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 77, 77, 0);
    }
}

/* استایل میله‌های آنالوگ */
.bar {
    width: 4px;
    height: 10px;
    background: #0088cc;
    border-radius: 2px;
    animation: wave 0.8s ease-in-out infinite alternate;
}

    .bar:nth-child(1) {
        animation-delay: 0.0s;
        height: 15px;
    }

    .bar:nth-child(2) {
        animation-delay: 0.1s;
        height: 25px;
    }

    .bar:nth-child(3) {
        animation-delay: 0.2s;
        height: 30px;
    }

    .bar:nth-child(4) {
        animation-delay: 0.3s;
        height: 20px;
    }

    .bar:nth-child(5) {
        animation-delay: 0.4s;
        height: 28px;
    }

    .bar:nth-child(6) {
        animation-delay: 0.5s;
        height: 22px;
    }

    .bar:nth-child(7) {
        animation-delay: 0.6s;
        height: 32px;
    }

    .bar:nth-child(8) {
        animation-delay: 0.7s;
        height: 18px;
    }

    .bar:nth-child(9) {
        animation-delay: 0.8s;
        height: 26px;
    }

    .bar:nth-child(10) {
        animation-delay: 0.9s;
        height: 20px;
    }

@@keyframes wave {
    0% {
        height: 8px;
        background: #0088cc;
    }

    100% {
        height: 35px;
        background: #ff4d4d;
    }
}

/* واکنش‌گرایی موبایل */
@@media (max-width: 576px) {
    .recorder-bar .d-flex {
        flex-wrap: nowrap;
        gap: 8px;
    }

    #analogBar {
        width: 60px !important;
    }

    .bar {
        width: 3px;
    }

    #recordBtn {
        width: 48px !important;
        height: 48px !important;
        font-size: 18px !important;
    }

    #sendBtn {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
    }

    .messages-area {
        max-height: 400px;
        overflow-y: auto;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 10px;
    }

    .audio-message-item {
        background: white;
        padding: 10px 15px;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        transition: all 0.2s ease;
    }

        .audio-message-item:hover {
            background: #f0f2f5;
            box-shadow: 0 2px 6px rgba(0,0,0,0.12);
        }

        .audio-message-item audio {
            border-radius: 8px;
            outline: none;
        }
            /* استایل کنترل‌های پلیر در مرورگرهای مختلف */
            .audio-message-item audio::-webkit-media-controls-panel {
                background: #e8ecf1;
            }

    .timeline-panel {
        position: relative !important;
        overflow: hidden !important;
    }

    .ribbon-wrapper {
        position: absolute !important;
        bottom: 15px !important;
        right: -35px !important;
        transform: rotate(-45deg) !important;
        z-index: 999 !important;
        width: 140px !important;
        text-align: center !important;
        background-color: #dc3545 !important; /* قرمز */
        color: #ffffff !important;
        padding: 4px 0 !important;
        font-size: 13px !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
        opacity: 0.9 !important;
        pointer-events: none !important; /* جلوگیری از تداخل کلیک */
        letter-spacing: 1px !important;
    }

    .ribbon {
        display: block !important;
        padding: 2px 0 !important;
    }
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    font-size: 12px !important;
}

/* 2. کوچک‌کردن فونت گزینه‌های لیست (Dropdown Items) */
.select2-container--default .select2-results__option {
    font-size: 12px !important;
}

/* 3. کوچک‌کردن فونت placeholder و متن انتخاب‌شده */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    font-size: 12px !important;
}

/* 4. (اختیاری) کوچک‌کردن فونت خود فیلد input */
.select2-container--default .select2-selection--single {
    font-size: 12px !important;
}

/* 5. اگر از تم bootstrap-5 استفاده می‌کنید، ممکن است کلاس‌ها متفاوت باشند */
.select2-container--bootstrap-5 .select2-selection {
    font-size: 12px !important;
}

.select2-container--bootstrap-5 .select2-search__field {
    font-size: 12px !important;
}

.select2-container--bootstrap-5 .select2-results__option {
    font-size: 12px !important;
}


.select2-container--open {
    pointer-events: auto !important;
    z-index: 9999 !important;
}

    .select2-container--open .select2-search__field {
        pointer-events: auto !important;
        z-index: 10000 !important;
        position: relative !important;
    }

/* حذف هرگونه overlay مزاحم */
.select2-dropdown {
    pointer-events: auto !important;
}

/* ===== کارت با حداقل ارتفاع و flex ===== */
.custom-card {
    min-height: 320px; /* حداقل ارتفاع کارت */
    display: flex;
    flex-direction: column;
}

    .custom-card .card-body {
        flex: 1; /* پر کردن فضای خالی */
        display: flex;
        flex-direction: column;
    }

    /* ===== table-responsive ===== */
    .custom-card .table-responsive {
        flex: 1; /* پر کردن فضای خالی */
        min-height: 200px; /* حداقل ارتفاع برای جدول */
        overflow-y: auto; /* در صورت نیاز اسکرول عمودی */
    }

/* ===== dropdown-wrapper (اختیاری) ===== */
.dropdown-wrapper {
    margin-top: auto;
    align-self: flex-end;
}

@@media print {
    .no-print {
        display: none !important;
    }

    @@page {
        size: A4 landscape;
        margin: 0.5cm;
    }

    body {
        direction: rtl;
        font-size: 10px;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    th, td {
        border: 1px solid #000;
        padding: 3px;
        font-size: 9px;
    }

    thead {
        display: table-header-group;
    }

    tr {
        page-break-inside: avoid;
    }
}


/* =========================================================
                   LOGIN PAGE
                   ========================================================= */


/* صفحه اصلی */


.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(0, 136, 204, 0.12), transparent 35%), radial-gradient(circle at bottom left, rgba(255, 77, 77, 0.10), transparent 35%), linear-gradient(135deg, #f4f7fa 0%, #e8edf2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
}


    /* افکت‌های پس‌زمینه */

    .login-page::before {
        content: "";
        position: absolute;
        width: 500px;
        height: 500px;
        top: -250px;
        right: -180px;
        border-radius: 50%;
        background: rgba(0, 136, 204, 0.08);
        border: 1px solid rgba(0, 136, 204, 0.12);
    }

    .login-page::after {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        bottom: -230px;
        left: -160px;
        border-radius: 50%;
        background: rgba(255, 77, 77, 0.06);
        border: 1px solid rgba(255, 77, 77, 0.10);
    }

/* محتوای اصلی */

.login-wrapper {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 430px;
}

/* کارت */

.login-card {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 18px;
    padding: 35px 35px 25px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35), 0 5px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: loginCardShow 0.6s ease;
}

    /* نوار بالای کارت */

    .login-card::before {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 5px;
        background: linear-gradient( 90deg, #ff4d4d, #0088cc );
    }

@@keyframes loginCardShow {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* لوگو */

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 18px;
}

.login-logo-image {
    max-width: 250px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* در صورتی که لوگو موجود نباشد */

.login-logo-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    background: linear-gradient( 135deg, #0088cc, #006fa8 );
    box-shadow: 0 10px 25px rgba(0, 136, 204, 0.30);
}

/* عنوان */

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

    .login-header h2 {
        margin: 0 0 8px;
        color: #28323f;
        font-size: 23px;
        font-weight: 700;
    }

    .login-header p {
        margin: 0;
        color: #7b8490;
        font-size: 14px;
    }

/* فرم */

.login-form-group {
    margin-bottom: 20px;
}

.login-label {
    display: block;
    margin-bottom: 8px;
    color: #394351;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

/* ورودی */

.login-input-wrapper {
    position: relative;
    width: 100%;
}

.login-input {
    width: 100%;
    height: 50px;
    padding: 0 48px 0 45px;
    border: 1px solid #e1e5ea;
    border-radius: 10px;
    background: #f8f9fb;
    color: #333;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 14px;
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

    .login-input::placeholder {
        color: #a2a8b0;
    }

    .login-input:focus {
        border-color: #0088cc;
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.10);
    }

/* آیکون ورودی */

.login-input-icon {
    position: absolute;
    top: 50%;
    right: 17px;
    transform: translateY(-50%);
    color: #89929d;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.25s ease;
}

.login-input-wrapper:focus-within
.login-input-icon {
    color: #0088cc;
}

/* نمایش رمز */

.password-toggle {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #9aa1aa;
    cursor: pointer;
    padding: 5px;
    font-size: 15px;
}

    .password-toggle:hover {
        color: #0088cc;
    }

/* خطای اعتبارسنجی */

.login-validation {
    display: block;
    margin-top: 6px;
    color: #dc3545;
    font-size: 12px;
    text-align: right;
}

/* فراموشی رمز */

.login-options {
    display: flex;
    justify-content: flex-start;
    margin-top: 3px;
    margin-bottom: 25px;
}

.forgot-password {
    color: #0088cc;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .forgot-password:hover {
        color: #ff4d4d;
        text-decoration: none;
    }

/* دکمه ورود */

.login-button {
    position: relative;
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 10px;
    background: linear-gradient( 135deg, #0088cc, #006fa8 );
    color: #ffffff;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 136, 204, 0.25);
    transition: all 0.25s ease;
}

    .login-button:hover {
        transform: translateY(-2px);
        background: linear-gradient( 135deg, #0079b5, #005f91 );
        box-shadow: 0 12px 25px rgba(0, 136, 204, 0.35);
    }

    .login-button:active {
        transform: translateY(0);
    }

    .login-button:disabled {
        cursor: not-allowed;
        opacity: 0.8;
    }

/* Loading */

.login-button-loading {
    display: none;
}

.login-button.loading
.login-button-text {
    display: none;
}

.login-button.loading
.login-button-loading {
    display: inline-block;
}

/* فوتر */

.login-footer {
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #eeeeee;
    text-align: center;
    color: #9aa1aa;
    font-size: 11px;
}

/* موبایل */

@@media (max-width: 576px) {

    .login-page {
        padding: 20px 12px;
    }

    .login-card {
        padding: 30px 22px 22px;
        border-radius: 15px;
    }

    .login-header h2 {
        font-size: 20px;
    }

    .login-logo-image {
        max-width: 210px;
    }

    .login-input {
        height: 48px;
    }

    .login-button {
        height: 50px;
    }
}

/* موبایل بسیار کوچک */

@@media (max-width: 360px) {

    .login-card {
        padding: 25px 18px 20px;
    }

    .login-header {
        margin-bottom: 22px;
    }

        .login-header h2 {
            font-size: 18px;
        }
}

/* ============================================================
   مودال عضو جدید — ارتفاع یکسان کارت‌ها
   ============================================================ */

/* ردیف اصلی که دو کارت کنار هم هستند */
#InserMemberModal .row > div > .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

/* هر دو کارت (col-md-6) کشیده شوند */
#InserMemberModal .col-md-6 {
    display: flex;
    flex-direction: column;
}

    /* کارت داخل col-md-6 پرکننده ارتفاع */
    #InserMemberModal .col-md-6 > .card {
        flex: 1;
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }

        /* بدنه کارت هم پرکننده فضای باقی‌مانده */
        #InserMemberModal .col-md-6 > .card > .card-body {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

/* لیست کاربران انتخاب‌شده — حداقل ارتفاع برای دیده‌شدن پیام خالی */
#InserMemberModal #selectedMembersList {
    min-height: 60px;
    margin-bottom: 0;
}

    /* آیتم «هیچ کاربری انتخاب نشده» — ظاهر ملایم */
    #InserMemberModal #selectedMembersList .list-group-item.text-muted {
        background: transparent;
        border: 1px dashed #d8e8ec;
        color: #8fa8b0 !important;
        text-align: center;
        font-size: 12.5px;
        border-radius: 8px;
        padding: 14px 10px;
    }


    /* ============================================================
   دکمه ➕ مودال عضو جدید — موقعیت و ظاهر
   ============================================================ */

#addMemberBtn,
#addUserBtn {
    /* ظاهر گرد */
    /*width: 35px;
    height: 35px;
    border-radius: 50% !important;*/ /* ← دایره کامل */
    /*display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;*/
    /* موقعیت کمی پایین‌تر */
    margin-top: 8px;
    /* هماهنگی با پالت سایت */
    background: linear-gradient(135deg, #4d7d8a 0%, #7ba5b0 100%) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 4px 10px rgba(77, 125, 138, 0.35) !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

    #addMemberBtn:hover,
    #addUserBtn:hover {
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 16px rgba(77, 125, 138, 0.5) !important;
    }

    #addMemberBtn:active,
    #addUserBtn:active {
        transform: translateY(0) scale(0.98);
    }

/* ردیفِ حاوی select و دکمه — برای تراز عمودی */
#InserMemberModal .col-md-9 {
    display: flex;
    align-items: flex-start;
}

#InserMemberModal .col-md-2 {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* مودال ارجاع جدید (که #addUserBtn در آن است) */
#NewTaskModal .col-md-9 {
    display: flex;
    align-items: flex-start;
}

#NewTaskModal .col-md-2 {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ============================================================
           ظاهر شیک کارت موضوعات + دکمه برجسته
           ============================================================ */
.topics-card {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

/* هدر */
.topics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 22px;
    background: linear-gradient(135deg, #f8f9fb 0%, #eef1f5 100%);
    border-bottom: 1px solid #e9ecef;
}

    .topics-header .card-title {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: #2c3e42;
        display: inline-flex;
        align-items: center;
    }

        .topics-header .card-title i {
            color: #4d7d8a;
        }

/* دکمه برجسته موضوع جدید */
.btn-create-topic {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    font-size: 13.5px;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, #4d7d8a 0%, #7ba5b0 100%);
    border: 0;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(77, 125, 138, 0.35);
    text-decoration: none;
    transition: all 0.25s ease;
}

    .btn-create-topic:hover {
        transform: translateY(-2px);
        box-shadow: 0 7px 20px rgba(77, 125, 138, 0.45);
        color: #fff !important;
        text-decoration: none;
    }

    .btn-create-topic:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(77, 125, 138, 0.3);
    }

    .btn-create-topic i {
        font-size: 12px;
    }

/* بدنه */
.topics-card .card-body {
    padding: 18px 22px 22px 22px;
}

/* بهبود ظاهر درخت */
.topics-card .item-container {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: #fafbfc;
    border: 1px solid #eef1f5;
    border-radius: 10px;
    transition: all 0.2s ease;
}

    .topics-card .item-container:hover {
        background: #f0f6f8;
        border-color: #cae0e4;
        box-shadow: 0 3px 10px rgba(77, 125, 138, 0.08);
    }

.topics-card .toggle-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4d7d8a 0%, #7ba5b0 100%);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(77, 125, 138, 0.25);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

    .topics-card .toggle-btn:hover {
        transform: scale(1.08);
        box-shadow: 0 4px 12px rgba(77, 125, 138, 0.4);
    }

.topics-card .no-child {
    width: 28px;
    text-align: center;
    color: #b8c5cb;
    font-size: 16px;
    flex-shrink: 0;
}

.topics-card .item-name {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e42;
    flex: 1;
}

.topics-card .item-Link {
    font-size: 14px;
    font-weight: 600;
    color: #4d7d8a;
    text-decoration: none;
    flex: 1;
    transition: color 0.2s ease;
}

    .topics-card .item-Link:hover {
        color: #2c3e42;
        text-decoration: underline;
    }

.topics-card .nested-list {
    list-style: none;
    padding-right: 0;
    margin: 0;
}

    .topics-card .nested-list .nested-list {
        padding-right: 30px;
        border-right: 2px dashed #d8e8ec;
        margin-right: 14px;
        margin-top: 6px;
    }

    .topics-card .nested-list li {
        margin: 6px 0;
        list-style: none;
    }

/* موبایل */
@@media (max-width: 576px) {
    .topics-header {
        padding: 14px 16px;
    }

    .topics-card .card-body {
        padding: 14px 16px 18px 16px;
    }

    .btn-create-topic {
        padding: 8px 14px;
        font-size: 12.5px;
    }
}

/* ============================================================
   14) سایدبار — عادی پیش‌فرض، انتخاب سبز (بدون تغییر فلش)
   ============================================================ */

/* ---------- نام کاربر: مشکی ---------- */
.deznav .header-profile .header-info span,
.deznav .header-profile .header-info span b {
    color: #000 !important;
}

/* ---------- سمت کاربر: سبز ---------- */
.deznav .header-profile .header-info small,
.deznav .header-profile .header-info small b {
    color: var(--ts-primary) !important;
}

/* ============================================================
   حالت انتخاب (mm-active) — فقط سایه/پس‌زمینه سبز
   ============================================================ */

/* پس‌زمینه سبز ملایم */
.deznav .metismenu > li.mm-active > a,
.deznav .metismenu > li > a[aria-expanded="true"],
.deznav .metismenu > li > a.active,
.deznav .metismenu ul li a.active {
    background-color: var(--ts-primary-bg) !important;
    color: var(--ts-primary-dark) !important;
}

    /* ============================================================
   تبدیل رنگ آبی (#2258BF) به سبز — فقط رنگ
   بدون تغییر border، بدون تغییر شکل فلش
   ============================================================ */

    /* آیکون منو در حالت انتخاب */
    .deznav .metismenu > li.mm-active > a > i,
    .deznav .metismenu > li.mm-active > a > i::before,
    .deznav .metismenu > li > a[aria-expanded="true"] > i,
    .deznav .metismenu > li > a[aria-expanded="true"] > i::before,
    .deznav .metismenu > li > a.active > i,
    .deznav .metismenu > li > a.active > i::before {
        color: var(--ts-primary-dark) !important;
    }

    /* متن در حالت انتخاب */
    .deznav .metismenu > li.mm-active > a .nav-text,
    .deznav .metismenu > li.mm-active > a .nav-text strong,
    .deznav .metismenu > li > a[aria-expanded="true"] .nav-text,
    .deznav .metismenu > li > a[aria-expanded="true"] .nav-text strong {
        color: var(--ts-primary-dark) !important;
    }

/* ============================================================
   hover ملایم — سبز روشن
   ============================================================ */

.deznav .metismenu > li > a:hover {
    background-color: var(--ts-primary-lighter) !important;
}

    .deznav .metismenu > li > a:hover,
    .deznav .metismenu > li > a:hover .nav-text,
    .deznav .metismenu > li > a:hover .nav-text strong,
    .deznav .metismenu > li > a:hover > i,
    .deznav .metismenu > li > a:hover > i::before {
        color: var(--ts-primary-dark) !important;
    }

/* ============================================================
   حذف آبی تیره از سایدبار در حالت انتخاب
   فقط رنگ — بدون تغییر شکل، اندازه یا موقعیت
   ============================================================ */

/* ---------- 1) فلش منوی باز شده (mm-active) ---------- */
.deznav .metismenu > li.mm-active > a.has-arrow::after,
.deznav .metismenu > li > a[aria-expanded="true"].has-arrow::after {
    border-top-color: var(--ts-primary-dark) !important;
    border-left-color: var(--ts-primary-dark) !important;
}

/* ---------- 2) مارکر کنار زیرمنوها (الماس/مربع کوچک) ---------- */
/* این همان «خطوط آبی» است که می‌بینید */
.deznav .metismenu ul a:before {
    border-color: var(--ts-primary-dark) !important;
}

.deznav .metismenu ul a:hover:before,
.deznav .metismenu ul a:focus:before,
.deznav .metismenu ul a.mm-active:before {
    border-color: var(--ts-primary-dark) !important;
    background-color: transparent !important;
}

/* ---------- 3) متن زیرمنو در حالت hover/active ---------- */
.deznav .metismenu ul a:hover,
.deznav .metismenu ul a:focus,
.deznav .metismenu ul a.mm-active {
    color: var(--ts-primary-dark) !important;
}

/* ---------- 4) اگر متن منو در mm-active آبی بود ---------- */
.deznav .metismenu > li.mm-active > a,
.deznav .metismenu > li.mm-active > a .nav-text,
.deznav .metismenu > li.mm-active > a .nav-text strong {
    color: var(--ts-primary-dark) !important;
}

    /* ---------- 5) آیکون منو در mm-active ---------- */
    .deznav .metismenu > li.mm-active > a > i,
    .deznav .metismenu > li.mm-active > a > i::before {
        color: var(--ts-primary-dark) !important;
    }

/* ---------- 6) اگر رنگ background یک آبی روشن بود ---------- */
.deznav .metismenu > li.mm-active > a {
    background: var(--ts-primary-bg) !important;
}

/* ============================================================
   Pagination — Previous/Next با گرادیان‌زدایی کامل
   ============================================================ */

/* ---------- پایه همه دکمه‌ها ---------- */
.dataTables_wrapper .dataTables_paginate a.paginate_button {
    color: var(--ts-primary-dark) !important;
    background-color: var(--ts-primary-bg) !important;
    background-image: none !important; /* ← کلید حل مشکل */
    border: 1px solid var(--ts-border-strong) !important;
    padding: 4px 10px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    min-width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
    margin: 0 2px !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

    /* ---------- Previous / Next ---------- */
    .dataTables_wrapper .dataTables_paginate a.paginate_button.previous,
    .dataTables_wrapper .dataTables_paginate a.paginate_button.next {
        color: var(--ts-primary-dark) !important;
        background-color: var(--ts-primary-bg) !important;
        background-image: none !important;
        border: 1px solid var(--ts-border-strong) !important;
        padding: 4px 12px !important;
        height: 30px !important;
        min-width: auto !important;
    }

        /* ---------- Hover — Previous/Next و بقیه ---------- */
        .dataTables_wrapper .dataTables_paginate a.paginate_button:hover,
        .dataTables_wrapper .dataTables_paginate a.paginate_button.previous:hover,
        .dataTables_wrapper .dataTables_paginate a.paginate_button.next:hover {
            color: #fff !important;
            background-color: var(--ts-primary-dark) !important;
            background-image: none !important; /* ← خنثی کردن گرادیان آبی */
            border-color: var(--ts-primary-dark) !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 10px rgba(77, 125, 138, 0.3) !important;
        }

        /* ---------- Active (لحظه کلیک) ---------- */
        .dataTables_wrapper .dataTables_paginate a.paginate_button:active,
        .dataTables_wrapper .dataTables_paginate a.paginate_button.previous:active,
        .dataTables_wrapper .dataTables_paginate a.paginate_button.next:active {
            color: #fff !important;
            background-color: var(--ts-primary-dark) !important;
            background-image: none !important;
            transform: translateY(0);
        }

        /* ---------- Focus (پس از کلیک) ---------- */
        .dataTables_wrapper .dataTables_paginate a.paginate_button:focus,
        .dataTables_wrapper .dataTables_paginate a.paginate_button.previous:focus,
        .dataTables_wrapper .dataTables_paginate a.paginate_button.next:focus {
            background-image: none !important;
            box-shadow: 0 0 0 3px rgba(123, 165, 176, 0.2) !important;
            outline: 0 !important;
        }

    /* ---------- صفحه جاری ---------- */
    .dataTables_wrapper .dataTables_paginate a.paginate_button.current,
    .dataTables_wrapper .dataTables_paginate a.paginate_button.current:hover {
        color: #fff !important;
        background-color: var(--ts-primary-dark) !important;
        background-image: linear-gradient(135deg, var(--ts-primary-dark) 0%, var(--ts-primary) 100%) !important;
        border: 0 !important;
        box-shadow: 0 3px 8px rgba(77, 125, 138, 0.35) !important;
        font-weight: 600;
    }

    /* ---------- Disabled (قبل/بعد غیرفعال) ---------- */
    .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled,
    .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:hover,
    .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:active,
    .dataTables_wrapper .dataTables_paginate a.paginate_button.disabled:focus,
    .dataTables_wrapper .dataTables_paginate a.paginate_button.previous.disabled,
    .dataTables_wrapper .dataTables_paginate a.paginate_button.next.disabled {
        color: #b8c5cb !important;
        background-color: #f4f6f8 !important;
        background-image: none !important;
        border: 1px solid #eef1f5 !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
        transform: none !important;
        opacity: 0.85 !important;
    }

/* ---------- کانتینر در RTL: شروع از راست ---------- */
.dataTables_wrapper .dataTables_paginate {
    padding: 8px 0 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    direction: rtl;
}

    .dataTables_wrapper .dataTables_paginate span {
        display: inline-flex !important;
        align-items: center;
        gap: 3px;
        direction: rtl;
    }

/* ============================================================
   آیکون‌های عملیات وظیفه — بزرگ‌تر و سبز تم
   ============================================================ */

/* پایه آیکون‌ها */
.details-page .tooltip-container .lg-icon,
.col-xl-12 .tooltip-container .lg-icon,
.card.ts-card .tooltip-container .lg-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    font-size: 18px !important; /* ← بزرگ‌تر */
    color: var(--ts-primary-dark, #4d7d8a) !important;
    background: var(--ts-primary-bg, #f0f6f8);
    border: 1px solid var(--ts-border-strong, #d8e8ec);
    border-radius: 10px;
    transition: all 0.2s ease;
    margin: 0 3px;
    vertical-align: middle;
}

/* hover — سبز پررنگ */
.details-page .tooltip-container:hover .lg-icon,
.col-xl-12 .tooltip-container:hover .lg-icon,
.card.ts-card .tooltip-container:hover .lg-icon {
    color: #fff !important;
    background: linear-gradient(135deg, var(--ts-primary-dark, #4d7d8a) 0%, var(--ts-primary, #7ba5b0) 100%);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(77, 125, 138, 0.35);
}

/* tooltip-text داخل این آیکون‌ها هم کوچک‌تر و مرتب‌تر شود */
.details-page .tooltip-container .tooltip-text {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
}

/* ============================================================
   Override کردن پس‌زمینه Autofill مرورگر (Chrome / Edge / Safari)
   ============================================================ */

/* وقتی مرورگر به‌صورت خودکار فیلد را پر می‌کند */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
    /* پس‌زمینه سفید (یا رنگ تم) به‌جای آبی Chrome */
    -webkit-box-shadow: 0 0 0 1000px #f0f6f8 inset !important;
    box-shadow: 0 0 0 1000px #f0f6f8 inset !important;
    /* رنگ متن */
    -webkit-text-fill-color: #2c3e42 !important;
    color: #2c3e42 !important;
    /* جلوگیری از تغییر ناگهانی رنگ */
    transition: background-color 5000s ease-in-out 0s;
    /* فونت حفظ شود */
    font-family: inherit !important;
    font-size: inherit !important;
}

    /* حالت focus — رنگ تم */
    input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3px rgba(123, 165, 176, 0.15) !important;
        box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 3px rgba(123, 165, 176, 0.15) !important;
        border-color: var(--ts-primary, #7ba5b0) !important;
    }

/* برای فیلدهای داخل ts-card */
.ts-card input:-webkit-autofill,
.ts-card textarea:-webkit-autofill,
.ts-card select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #fafbfc inset !important;
    box-shadow: 0 0 0 1000px #fafbfc inset !important;
    -webkit-text-fill-color: #2c3e42 !important;
}
/* ============================================================
   چک‌باکس .check-box — Override نهایی
   ============================================================ */

/* حالت انتخاب‌شده */
input.check-box:checked,
.check-box:checked,
.checkbox .check-box:checked,
.checkbox input[type="checkbox"]:checked {
    background-color: #4d7d8a !important;
    border-color: #4d7d8a !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e") !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-shadow: none !important;
}

/* Hover */
input.check-box:hover,
.check-box:hover {
    border-color: #7ba5b0 !important;
}

input.check-box:checked:hover,
.check-box:checked:hover {
    background-color: #7ba5b0 !important;
    border-color: #7ba5b0 !important;
}

/* Focus */
input.check-box:focus,
.check-box:focus {
    border-color: #7ba5b0 !important;
    box-shadow: 0 0 0 3px rgba(123, 165, 176, 0.25) !important;
    outline: none !important;
}

/* حالت خالی (بدون انتخاب) — کادر خاکستری */
input.check-box,
.check-box {
    width: 18px !important;
    height: 18px !important;
    border: 2px solid #c8c8c8 !important;
    border-radius: 4px !important;
    background-color: #fff !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    vertical-align: middle;
    transition: all 0.15s ease;
}


/* ============================================================
   سوییچ بایگانی — فقط گوی سبز، پس‌زمینه خاکستری
   ============================================================ */

#archiveToggle {
    width: 40px !important;
    height: 20px !important;
    cursor: pointer;
    background-color: #e9ecef !important; /* پس‌زمینه روشن (غیرفعال) */
    border: 1px solid #d8e8ec !important;
    border-radius: 20px !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e") !important;
    background-position: left center !important;
    background-size: 16px 16px !important;
    background-repeat: no-repeat !important;
    transition: all 0.25s ease;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
}

    /* حالت تیک‌خورده — پس‌زمینه هم خاکستری می‌ماند */
    #archiveToggle:checked {
        background-color: #e9ecef !important; /* ← پس‌زمینه خاکستری همان‌طور */
        border-color: #d8e8ec !important;
        /* گوی به سمت راست + رنگ سبز */
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%234d7d8a'/%3e%3c/svg%3e") !important;
        background-position: right center !important;
    }

    /* hover */
    #archiveToggle:hover {
        border-color: #cae0e4 !important;
    }

    #archiveToggle:checked:hover {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%237ba5b0'/%3e%3c/svg%3e") !important;
    }

    /* focus */
    #archiveToggle:focus {
        border-color: #7ba5b0 !important;
        box-shadow: 0 0 0 3px rgba(123, 165, 176, 0.25) !important;
        outline: none !important;
    }

.tooltip-inner {
    white-space: pre-wrap !important;
    word-break: break-word !important;
    text-align: right !important;
    direction: rtl !important;
    font-size: 0.75rem !important;
    max-width: 300px;
}

/* ============================================================
   2) کارت مشترک — .Command-card
   ============================================================ */
.Command-card {
    border: 0 !important;
    border-radius: 14px !important;
    box-shadow: var(--ts-shadow-card) !important;
    overflow: hidden;
    background-color: #fff !important;
    margin-bottom: 20px !important;
    height: auto !important;
}

    .Command-card .card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
        padding: 5px 5px !important;
        background: var(--ts-bg-header) !important;
        border-bottom: 1px solid #e9ecef !important;
        border-radius: 14px 14px 0 0 !important;
    }

    .Command-card .card-body {
        padding: 5px 5px !important;
    }

    .Command-card .card-footer {
        padding: 5px 5px !important;
        background: var(--ts-bg-card) !important;
        border-top: 1px solid var(--ts-border) !important;
        border-radius: 0 0 14px 14px !important;
    }

    /* ---- عنوان هدر ---- */
    .Command-card .card-title {
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        color: var(--ts-text);
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

        .Command-card .card-title i {
            color: var(--ts-primary-dark);
        }


/* ===== فلش‌های سورت DataTables: دو مثلث کوچک سمت راست ===== */

/* حذف پس‌زمینه پیش‌فرض DataTables */
table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc {
    background-image: none !important;
    cursor: pointer;
    position: relative;
    padding-right: 16px !important; /* فضا برای مثلث‌ها سمت راست */
}

    /* ---------- مثلث بالایی (::before) ---------- */
    table.dataTable thead th.sorting::before,
    table.dataTable thead th.sorting_asc::before,
    table.dataTable thead th.sorting_desc::before {
        content: "";
        position: absolute;
        right: 5px;
        top: calc(50% - 5px);
        width: 0;
        height: 0;
        border-left: 3px solid transparent;
        border-right: 3px solid transparent;
        border-bottom: 4px solid #c8c8c8;
        transition: border-bottom-color 0.15s ease;
    }

    /* ---------- مثلث پایینی (::after) ---------- */
    table.dataTable thead th.sorting::after,
    table.dataTable thead th.sorting_asc::after,
    table.dataTable thead th.sorting_desc::after {
        content: "";
        position: absolute;
        right: 5px;
        top: calc(50% + 1px);
        width: 0;
        height: 0;
        border-left: 3px solid transparent;
        border-right: 3px solid transparent;
        border-top: 4px solid #c8c8c8;
        transition: border-top-color 0.15s ease;
    }

    /* ---------- حالت صعودی: فقط مثلث بالا روشن ---------- */
    table.dataTable thead th.sorting_asc::before {
        border-bottom-color: #0d6efd;
    }

    table.dataTable thead th.sorting_asc::after {
        border-top-color: #dadada;
    }

    /* ---------- حالت نزولی: فقط مثلث پایین روشن ---------- */
    table.dataTable thead th.sorting_desc::before {
        border-bottom-color: #dadada;
    }

    table.dataTable thead th.sorting_desc::after {
        border-top-color: #0d6efd;
    }

/* ---------- ستون‌های غیرقابل سورت: بدون مثلث ---------- */
table.dataTable thead th.sorting_disabled::before,
table.dataTable thead th.sorting_disabled::after {
    display: none !important;
}

table.dataTable thead th.sorting_disabled {
    padding-right: 0 !important;
}
    /* ---------- ستون‌های غیرقابل سورت: بدون مثلث و بدون cursor ---------- */
    /* ستون‌های غیرقابل سورت: بدون مثلث و بدون cursor */
    table.dataTable thead th.no-sort::before,
    table.dataTable thead th.no-sort::after,
    table.dataTable thead th.sorting_disabled::before,
    table.dataTable thead th.sorting_disabled::after {
        display: none !important;
        content: none !important;
    }

table.dataTable thead th.no-sort,
table.dataTable thead th.sorting_disabled {
    padding-right: 0 !important;
    cursor: default !important;
    background-image: none !important;
}
.badge.icon-alert-red {
    border: 2px solid #891723 !important;
    border-radius: 6px;
    padding: 2px 6px;
    animation: pulseRed 1.4s infinite;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(137, 23, 35, 0.6);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(137, 23, 35, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(137, 23, 35, 0);
    }
}