/* =====================================================================
   توصيلة — شكل لوحة التحكم (AppBar + السايد بار)
   الألوان من HelpColors بتاعة تطبيق الموبايل
   كل الكلاسات بتبدأ بـ tsl- عشان ماتتعارضش مع Bootstrap أو MudBlazor
   ===================================================================== */
:root {
    --tsl-primary: #49BFEB;
    --tsl-primary-deep: #1A8FBF;
    --tsl-primary-dark: #13709C;
    --tsl-primary-soft: #EAF5FB;
    --tsl-selected: #F2F9FD;
    --tsl-soft-border: #D3E9F6;
    --tsl-ink: #12263F;
    --tsl-text: #334155;
    --tsl-label: #4B5D68;
    --tsl-muted: #6B7385;
    --tsl-faint: #94A3B8;
    --tsl-border: #E3E8EF;
    --tsl-divider: #EEF1F5;
    --tsl-field: #F1F4F8;
    --tsl-page: #F3F6F9;
    --tsl-green: #1E8E4A;
    --tsl-green-soft: #E5F6EB;
    --tsl-green-bg: #EFFAF3;
    --tsl-green-dark: #14532D;
    --tsl-green-border: #D3EEDD;
    --tsl-red: #D32F2F;
    --tsl-red-soft: #FEF6F6;
    --tsl-red-border: #F6CDCD;
    --tsl-appbar-h: 64px;
    --tsl-side-w: 272px;
    --tsl-mini-w: 76px;
}

/* ===== الإطار العام ===== */
.tsl-shell {
    min-height: 100vh;
    background: var(--tsl-page);
}

/* ===== AppBar ===== */
.tsl-appbar {
    position: fixed;
    top: 0;
    inset-inline: 0;
    height: var(--tsl-appbar-h);
    background: #fff;
    border-bottom: 1px solid var(--tsl-border);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    z-index: 1100;
}

.tsl-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(var(--tsl-side-w) - 46px);
    flex: none;
    text-decoration: none;
    transition: width .2s ease;
}

.tsl-mini .tsl-brand {
    width: auto;
}

.tsl-logo {
    width: 50px;
    height: 50px;
    /*    border-radius: 50%;*/
    /*    background: linear-gradient(135deg, var(--tsl-primary), var(--tsl-primary-deep));*/
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    /*    box-shadow: 0 4px 12px rgba(26, 143, 191, .3);*/
    overflow: hidden;
}

    .tsl-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.tsl-brand-name {
    font-size: 19px;
    font-weight: 700;
    color: var(--tsl-primary-dark);
    white-space: nowrap;
}

.tsl-toggle {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 0;
    background: var(--tsl-field);
    color: var(--tsl-label);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .tsl-toggle:hover,
    .tsl-mini .tsl-toggle {
        background: var(--tsl-primary-soft);
        color: var(--tsl-primary-deep);
    }

.tsl-crumb {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--tsl-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .tsl-crumb b {
        color: var(--tsl-ink);
    }

.tsl-user {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--tsl-border);
    border-radius: 999px;
    padding: 4px;
    padding-inline-end: 14px;
    cursor: pointer;
    background: #fff;
    transition: border-color .15s;
}

    .tsl-user:hover {
        border-color: var(--tsl-soft-border);
    }

    .tsl-user img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
    }

    .tsl-user b {
        font-size: 13.5px;
        color: var(--tsl-ink);
    }

    .tsl-user i {
        font-size: 11px;
        color: var(--tsl-faint);
    }

/* ===== السايد بار ===== */
.tsl-sidebar {
    position: fixed;
    top: var(--tsl-appbar-h);
    bottom: 0;
    inset-inline-start: 0;
    width: var(--tsl-side-w);
    background: #fff;
    border-inline-end: 1px solid var(--tsl-border);
    display: flex;
    flex-direction: column;
    z-index: 1090;
    transition: width .2s ease;
}

.tsl-mini .tsl-sidebar {
    width: var(--tsl-mini-w);
}

.tsl-nav-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px 12px;
    scrollbar-width: thin;
    scrollbar-color: #D5DDE3 transparent;
}

.tsl-mini .tsl-nav-scroll {
    padding: 8px 10px;
}

.tsl-nav-scroll::-webkit-scrollbar {
    width: 6px;
}

.tsl-nav-scroll::-webkit-scrollbar-thumb {
    background: #D5DDE3;
    border-radius: 3px;
}

/* عنوان المنتج (توصيلة / طازة) */
.tsl-sec {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 12px 10px 6px;
    color: var(--tsl-primary-deep);
}

    .tsl-sec i {
        flex: 1;
        height: 1px;
        background: var(--tsl-divider);
    }

    .tsl-sec.tsl-green {
        color: var(--tsl-green);
    }

.tsl-mini .tsl-sec {
    padding: 10px 4px 6px;
}

    .tsl-mini .tsl-sec span {
        display: none;
    }

/* القسم */
.tsl-group {
    margin-bottom: 2px;
}

.tsl-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font: inherit;
    font-size: 13.5px;
    color: var(--tsl-text);
    text-align: start;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .tsl-item:hover {
        background: var(--tsl-selected);
    }

.tsl-ic {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--tsl-primary-soft);
    color: var(--tsl-primary-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex: none;
    transition: background .15s, color .15s;
}

.tsl-txt {
    flex: 1;
    min-width: 0;
    line-height: 1.5;
}

.tsl-ch {
    font-size: 10px;
    color: var(--tsl-faint);
    transition: transform .2s;
}

/* القسم المفتوح / الحالي — توصيلة (أزرق) */
.tsl-item.tsl-open,
.tsl-item.tsl-current {
    background: var(--tsl-selected);
    color: var(--tsl-primary-dark);
    font-weight: 700;
}

    .tsl-item.tsl-open .tsl-ic,
    .tsl-item.tsl-current .tsl-ic {
        background: var(--tsl-primary);
        color: #fff;
    }

    .tsl-item.tsl-open .tsl-ch {
        transform: rotate(180deg);
        color: inherit;
    }

/* طازة (أخضر) */
.tsl-green .tsl-item:hover {
    background: var(--tsl-green-bg);
}

.tsl-green .tsl-ic {
    background: var(--tsl-green-soft);
    color: var(--tsl-green);
}

.tsl-green .tsl-item.tsl-open,
.tsl-green .tsl-item.tsl-current {
    background: var(--tsl-green-bg);
    color: var(--tsl-green-dark);
}

    .tsl-green .tsl-item.tsl-open .tsl-ic,
    .tsl-green .tsl-item.tsl-current .tsl-ic {
        background: var(--tsl-green);
        color: #fff;
    }

/* الروابط الفرعية */
.tsl-subs {
    margin: 2px 0 6px;
    margin-inline-start: 26px;
    border-inline-start: 2px solid var(--tsl-soft-border);
    padding-inline-start: 12px;
}

.tsl-green .tsl-subs {
    border-inline-start-color: var(--tsl-green-border);
}

a.tsl-sub {
    display: block;
    position: relative;
    font-size: 13px;
    color: var(--tsl-label);
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    line-height: 1.5;
    transition: background .15s, color .15s;
}

    a.tsl-sub:hover {
        background: var(--tsl-selected);
        color: var(--tsl-primary-dark);
    }

    a.tsl-sub.tsl-active {
        background: var(--tsl-primary-soft);
        color: var(--tsl-primary-dark);
        font-weight: 700;
    }

.tsl-subs a.tsl-sub.tsl-active::before {
    content: "";
    position: absolute;
    inset-inline-start: -15px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--tsl-primary);
}

.tsl-green a.tsl-sub:hover {
    background: var(--tsl-green-bg);
    color: var(--tsl-green-dark);
}

.tsl-green a.tsl-sub.tsl-active {
    background: var(--tsl-green-soft);
    color: var(--tsl-green-dark);
}

.tsl-green .tsl-subs a.tsl-sub.tsl-active::before {
    background: var(--tsl-green);
}

/* ===== وضع الأيقونات بس (mini) ===== */
.tsl-mini .tsl-item {
    justify-content: center;
    padding: 6px 0;
}

.tsl-mini .tsl-txt,
.tsl-mini .tsl-ch,
.tsl-mini .tsl-subs {
    display: none;
}

.tsl-mini .tsl-item.tsl-current {
    box-shadow: inset 0 0 0 1.5px #B9D9EA;
}

.tsl-mini .tsl-green .tsl-item.tsl-current {
    box-shadow: inset 0 0 0 1.5px #8FD3A8;
}

/* اسم القسم لما تقف على الأيقونة (mini)
   بيترسم برا منطقة السكرول ومكانه من مكان الماوس، عشان مايتقصش */
.tsl-tip {
    position: fixed;
    inset-inline-start: calc(var(--tsl-mini-w) + 8px);
    transform: translateY(-50%);
    background: var(--tsl-ink);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    pointer-events: none;
    z-index: 1200;
}

/* روابط القسم في قايمة صغيرة جنبه (mini) */
.tsl-fly {
    position: fixed;
    inset-inline-start: calc(var(--tsl-mini-w) + 8px);
    width: 240px;
    max-height: calc(100vh - var(--tsl-appbar-h) - 24px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(18, 38, 63, .18);
    padding: 8px;
    z-index: 1200;
}

.tsl-fly-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tsl-primary-dark);
    padding: 6px 6px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--tsl-divider);
}

    .tsl-fly-title .tsl-ic {
        width: 30px;
        height: 30px;
        font-size: 13px;
        background: var(--tsl-primary);
        color: #fff;
    }

.tsl-green .tsl-fly-title {
    color: var(--tsl-green-dark);
}

    .tsl-green .tsl-fly-title .tsl-ic {
        background: var(--tsl-green);
    }

.tsl-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1150;
    background: transparent;
}

/* ===== المستخدم وزرار الخروج تحت ===== */
.tsl-foot {
    border-top: 1px solid var(--tsl-border);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .tsl-foot img {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        object-fit: cover;
        flex: none;
    }

    .tsl-foot b {
        flex: 1;
        min-width: 0;
        font-size: 13.5px;
        color: var(--tsl-ink);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.tsl-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: var(--tsl-red-soft);
    color: var(--tsl-red);
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    flex: none;
}

    .tsl-logout:hover {
        background: #FDECEC;
    }

.tsl-mini .tsl-foot {
    justify-content: center;
    padding: 12px 8px;
}

    .tsl-mini .tsl-foot img,
    .tsl-mini .tsl-foot b,
    .tsl-mini .tsl-logout span {
        display: none;
    }

.tsl-mini .tsl-logout {
    padding: 0 11px;
}

/* ===== المحتوى ===== */
.tsl-main {
    padding-top: var(--tsl-appbar-h);
    padding-inline-start: var(--tsl-side-w);
    transition: padding .2s ease;
    min-width: 0;
}

.tsl-mini .tsl-main {
    padding-inline-start: var(--tsl-mini-w);
}

.tsl-main-inner {
    padding: 16px 8px 24px;
}

/* ===== شاشات صغيرة: السايد بار بيبقى فوق المحتوى ===== */
.tsl-overlay {
    display: none;
}

@media (max-width: 900px) {
    .tsl-brand {
        width: auto;
    }

    .tsl-brand-name,
    .tsl-crumb,
    .tsl-user b {
        display: none;
    }

    .tsl-crumb {
        display: block;
        visibility: hidden;
    }

    .tsl-main,
    .tsl-mini .tsl-main {
        padding-inline-start: 0;
    }

    .tsl-shell:not(.tsl-mini) .tsl-sidebar {
        box-shadow: 0 0 40px rgba(18, 38, 63, .25);
    }

    .tsl-shell:not(.tsl-mini) .tsl-overlay {
        display: block;
        position: fixed;
        inset: var(--tsl-appbar-h) 0 0 0;
        background: rgba(11, 30, 42, .35);
        z-index: 1080;
    }

    .tsl-mini .tsl-sidebar {
        width: 0;
        border: 0;
        overflow: hidden;
    }
}

/* ===== قايمة المستخدم (MudMenu) ===== */
/* بنشيل الإطار والمسافات اللي MudBlazor بيحطها — للقايمة دي بس (عن طريق :has) */
.mud-popover:has(.tsl-umenu) {
    padding: 0 !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: 0 18px 44px rgba(18, 38, 63, .18) !important;
    border: 1px solid var(--tsl-border);
    margin-top: 6px;
}

.mud-list:has(> .tsl-umenu),
.mud-list:has(.tsl-umenu) {
    padding: 0 !important;
}

.tsl-umenu {
    width: 270px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
}

.tsl-umenu-head {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 16px;
    background: linear-gradient(135deg, var(--tsl-primary), var(--tsl-primary-deep));
}

    .tsl-umenu-head::before {
        content: "";
        position: absolute;
        width: 160px;
        height: 160px;
        border-radius: 50%;
        background: rgba(255, 255, 255, .1);
        top: -80px;
        inset-inline-end: -40px;
    }

    .tsl-umenu-head img {
        position: relative;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        object-fit: cover;
        background: #fff;
        border: 3px solid #fff;
        box-shadow: 0 6px 14px rgba(5, 40, 70, .25);
        flex: none;
    }

    .tsl-umenu-head b {
        position: relative;
        min-width: 0;
        color: #fff;
        font-size: 15px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.tsl-umenu-body {
    padding: 10px;
}

.tsl-umenu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    text-align: start;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}

.tsl-umenu-ic {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.tsl-umenu-txt {
    flex: 1;
}

.tsl-umenu-out {
    color: var(--tsl-red);
    background: var(--tsl-red-soft);
}

    .tsl-umenu-out .tsl-umenu-ic {
        background: #FDE4E4;
    }

    .tsl-umenu-out:hover {
        background: #FDECEC;
        box-shadow: inset 0 0 0 1.5px var(--tsl-red-border);
    }


/* =====================================================================
   مكونات الصفحات المشتركة — كل صفحة بتستخدمها من غير أي CSS خاص بيها
   كلها جوه .tsl-page عشان ماتأثرش على الصفحات اللي لسه ماتحولتش

   الهيكل:
   <div class="tsl-page">
     <div class="tsl-page-head"> .tsl-page-icon · .tsl-page-title > h1 · .tsl-page-actions </div>
     <div class="tsl-card">
       <div class="tsl-card-body"> فلاتر (row g-3 + .tsl-label + form-control/form-select) </div>
       <div class="tsl-table-wrap"><table class="tsl-table tsl-table-cards"> ... </table></div>
     </div>
   </div>
   - كل <td> عليه data-label="اسم العمود" ومحتواه جوه <div class="tsl-cell"> (للموبايل)
   - زرار العمليات: <td class="tsl-col-actions"> + .tsl-icon-btn + dropdown بتاع Bootstrap
   - التحميل: .tsl-loading > .tsl-loading-bar + .tsl-skel
   - مفيش بيانات: <tr class="tsl-empty-row"><td colspan="عدد الأعمدة" class="tsl-empty">
   ===================================================================== */
.tsl-page {
    padding: 4px 4px 32px;
    color: var(--tsl-ink);
}

/* ===== هيدر الصفحة ===== */
.tsl-page-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tsl-page-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: #529FFF;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex: none;
    box-shadow: 0 6px 16px rgba(82, 159, 255, .3);
}

.tsl-page-title {
    flex: 1;
    min-width: 0;
}

    .tsl-page-title h1 {
        font-size: 21px;
        font-weight: 700;
        margin: 0;
        color: var(--tsl-ink);
        line-height: 1.4;
    }

.tsl-page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== كارت ===== */
.tsl-card {
    background: #fff;
    border: 1px solid var(--tsl-border);
    border-radius: 20px;
    box-shadow: 0 4px 18px rgba(18, 38, 63, .04);
}

    .tsl-card + .tsl-card {
        margin-top: 16px;
    }

.tsl-card-body {
    padding: 18px;
}

/* ===== الفلاتر ===== */
.tsl-page .tsl-label,
.tsl-modal .tsl-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--tsl-label);
    margin-bottom: 6px;
}

.tsl-page .form-control,
.tsl-page .form-select,
.tsl-modal .form-control,
.tsl-modal .form-select {
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid var(--tsl-border);
    background-color: #fff;
    font-size: 14px;
    color: var(--tsl-ink);
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}

    .tsl-page .form-control:focus,
    .tsl-page .form-select:focus,
    .tsl-modal .form-control:focus,
    .tsl-modal .form-select:focus {
        border-color: var(--tsl-primary);
        box-shadow: 0 0 0 4px rgba(73, 191, 235, .15);
    }

.tsl-page .form-select,
.tsl-modal .form-select {
    background-position: left .9rem center;
    padding-left: 2.25rem;
    padding-right: .9rem;
}

.tsl-input-icon {
    position: relative;
}

    .tsl-input-icon > i {
        position: absolute;
        top: 50%;
        inset-inline-start: 14px;
        transform: translateY(-50%);
        color: var(--tsl-faint);
        font-size: 14px;
        pointer-events: none;
    }

    .tsl-input-icon > .form-control {
        padding-inline-start: 40px;
    }

/* ===== الزراير ===== */
.tsl-btn {
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: filter .15s, box-shadow .15s, background .15s;
}

.tsl-btn-primary {
    color: #fff;
    background: linear-gradient(90deg, #2EC8FF, #529FFF);
    box-shadow: 0 3px 0 #3489E9;
}

    .tsl-btn-primary:hover {
        filter: brightness(1.04);
        color: #fff;
    }

.tsl-btn-soft {
    color: var(--tsl-primary-dark);
    background: var(--tsl-primary-soft);
}

    .tsl-btn-soft:hover {
        background: #DDF0F9;
    }

.tsl-btn-block {
    width: 100%;
}

/* زرار مقفول (مثلًا وقت التحميل) */
.tsl-btn:disabled,
.tsl-btn.disabled {
    cursor: not-allowed;
    filter: none;
    opacity: .75;
}

.tsl-btn-primary:disabled {
    box-shadow: none;
}

/* دايرة تحميل صغيرة جوه الزرار — بتاخد لون نص الزرار */
.tsl-spinner {
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    animation: tsl-spin .7s linear infinite;
}

@keyframes tsl-spin {
    to {
        transform: rotate(360deg);
    }
}

.tsl-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1.5px solid var(--tsl-border);
    background: #fff;
    color: var(--tsl-primary-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .tsl-icon-btn:hover,
    .tsl-icon-btn.show {
        background: var(--tsl-primary-soft);
        border-color: var(--tsl-soft-border);
    }

/* ===== قايمة العمليات (Bootstrap dropdown) ===== */
/* القايمة بتترسم على الشاشة نفسها (strategy: fixed في data-bs-popper-config) عشان الجدول ما يقصهاش،
   فلازم تبقى فوق الـ AppBar والسايد بار (1100 / 1090) وتحت النوافذ (1300) */
.tsl-page .dropdown-menu {
    z-index: 1110;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(18, 38, 63, .14);
    padding: 6px;
    min-width: 170px;
    text-align: start;
}

.tsl-page .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tsl-text);
    cursor: pointer;
}

    .tsl-page .dropdown-item i {
        width: 18px;
        text-align: center;
        color: var(--tsl-primary-deep);
    }

    .tsl-page .dropdown-item:hover,
    .tsl-page .dropdown-item:focus {
        background: var(--tsl-selected);
        color: var(--tsl-primary-dark);
    }

    /* عنصر خطر في القايمة (حذف) */
    .tsl-page .dropdown-item.tsl-dd-danger,
    .tsl-page .dropdown-item.tsl-dd-danger i {
        color: var(--tsl-red);
    }

        .tsl-page .dropdown-item.tsl-dd-danger:hover,
        .tsl-page .dropdown-item.tsl-dd-danger:focus {
            background: var(--tsl-red-soft);
            color: var(--tsl-red);
        }

/* ===== الجدول ===== */
.tsl-table-wrap {
    overflow: auto;
    max-height: 700px;
    min-height: 200px;
    border-top: 1px solid var(--tsl-border);
}

.tsl-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

    .tsl-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #529FFF;
        color: #fff;
        font-size: 12.5px;
        font-weight: 700;
        padding: 12px 14px;
        text-align: start;
        white-space: nowrap;
        border-bottom: 1px solid #529FFF;
    }

    .tsl-table tbody td {
        padding: 12px 14px;
        vertical-align: middle;
        text-align: start;
        border-bottom: 1px solid var(--tsl-divider);
        color: var(--tsl-text);
    }

    .tsl-table tbody tr:hover td {
        background: #FAFCFE;
    }

    .tsl-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .tsl-table .tsl-col-actions {
        width: 70px;
        text-align: center;
    }

    .tsl-table .tsl-strong {
        font-weight: 700;
        color: var(--tsl-ink);
    }

    /* نص طويل (زي الجواب) بيلف على أكتر من سطر */
    .tsl-table .tsl-wrap {
        min-width: 240px;
        max-width: 560px;
        line-height: 1.7;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .tsl-table .tsl-col-state {
        width: 120px;
        text-align: center;
    }

.tsl-muted {
    color: var(--tsl-faint);
}

/* ===== حالة / شارات ===== */
.tsl-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

    .tsl-badge::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
    }

.tsl-badge-on {
    background: var(--tsl-green-soft);
    color: var(--tsl-green);
}

.tsl-badge-off {
    background: #FFF3DE;
    color: #C77700;
}

.tsl-chip {
    display: inline-block;
    margin: 2px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--tsl-primary-soft);
    color: var(--tsl-primary-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ===== تحميل / فاضي ===== */
.tsl-loading {
    padding: 18px;
}

.tsl-loading-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--tsl-primary-soft);
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
}

    .tsl-loading-bar::after {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        width: 40%;
        border-radius: 2px;
        background: var(--tsl-primary);
        animation: tsl-slide 1.1s ease-in-out infinite;
    }

@keyframes tsl-slide {
    0% {
        inset-inline-start: -40%;
    }

    100% {
        inset-inline-start: 100%;
    }
}

.tsl-skel {
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(90deg, #F1F4F8 0%, #E9EEF3 50%, #F1F4F8 100%);
    background-size: 200% 100%;
    animation: tsl-shine 1.2s linear infinite;
    margin-bottom: 10px;
}

@keyframes tsl-shine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.tsl-empty {
    padding: 40px 16px !important;
    text-align: center !important;
    color: var(--tsl-muted);
    font-weight: 700;
}

    .tsl-empty i {
        display: block;
        width: 56px;
        height: 56px;
        line-height: 56px;
        margin: 0 auto 10px;
        border-radius: 18px;
        background: var(--tsl-field);
        color: var(--tsl-faint);
        font-size: 22px;
    }

/* ===== شاشات صغيرة: الجدول بيتحول لكروت ===== */
@media (max-width: 767.98px) {
    .tsl-page-head .tsl-page-actions {
        width: 100%;
    }

    .tsl-page-actions .tsl-btn {
        flex: 1 1 100%;
        width: 100%;
    }

    .tsl-table-wrap {
        max-height: none;
        border-top: 0;
        padding: 0 12px 12px;
    }

    .tsl-table-cards thead {
        display: none;
    }

    .tsl-table-cards,
    .tsl-table-cards tbody,
    .tsl-table-cards tr,
    .tsl-table-cards td {
        display: block;
        width: 100%;
    }

        .tsl-table-cards tbody tr {
            position: relative;
            border: 1px solid var(--tsl-border);
            border-radius: 16px;
            padding: 6px 14px;
            margin-top: 12px;
            background: #fff;
        }

            .tsl-table-cards tbody tr:hover td {
                background: transparent;
            }

        .tsl-table-cards tbody td {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 9px 0;
            border-bottom: 1px dashed var(--tsl-divider);
        }

            .tsl-table-cards tbody td:last-child {
                border-bottom: 0;
            }

            .tsl-table-cards tbody td::before {
                content: attr(data-label);
                flex: none;
                width: 84px;
                font-size: 12px;
                font-weight: 700;
                color: var(--tsl-faint);
                padding-top: 2px;
            }

            .tsl-table-cards tbody td > .tsl-cell {
                flex: 1;
                min-width: 0;
            }

            /* زرار العمليات بيروح فوق في ركن الكارت */
            .tsl-table-cards tbody td.tsl-col-actions {
                position: absolute;
                top: 10px;
                inset-inline-end: 12px;
                width: auto;
                padding: 0;
                border: 0;
            }

                .tsl-table-cards tbody td.tsl-col-actions::before {
                    display: none;
                }

                /* أول خانة في الكارت بتسيب مكان لزرار العمليات عشان النص الطويل مايتغطاش */
                .tsl-table-cards tbody td.tsl-col-actions + td {
                    padding-inline-end: 52px;
                }

    .tsl-table .tsl-wrap {
        min-width: 0;
        max-width: none;
    }

    .tsl-table-cards tbody td.tsl-empty {
        display: block;
        border: 0;
    }

        .tsl-table-cards tbody td.tsl-empty::before {
            display: none;
        }

    .tsl-table-cards tbody tr.tsl-empty-row {
        border: 0;
    }
}


/* =====================================================================
   النوافذ (Modal) — بديل MudDialog
   المكون المشترك: Shared/TslModal.razor

   الهيكل (بيرسمه TslModal لوحده):
   <div class="tsl-modal-backdrop">
     <div class="tsl-modal [tsl-modal-sm | tsl-modal-lg]">
       <div class="tsl-modal-head"> .tsl-page-icon · h2 · .tsl-modal-close </div>
       <div class="tsl-modal-body"> المحتوى (row g-3 + .tsl-label + form-control) </div>
       <div class="tsl-modal-foot"> .tsl-btn-cancel · .tsl-btn-primary </div>
     </div>
   </div>
   - جوه المحتوى: .tsl-section (بوكس بعنوان) · .tsl-switch-card (سويتش)
     · .tsl-check-grid > .tsl-check (اختيارات) · .tsl-row (صفوف بتتضاف وتتحذف)
   - على الموبايل النافذة بتطلع من تحت بعرض الشاشة
   ===================================================================== */
.tsl-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(11, 30, 42, .45);
    animation: tsl-fade .15s ease;
}

/* الصفحة اللي ورا النافذة متتحركش */
body:has(.tsl-modal-backdrop) {
    overflow: hidden;
}

/* رسايل النجاح والخطأ (Blazored.Toast): فوق النافذة وفوق الـ AppBar */
body .blazored-toast-container {
    z-index: 1400 !important;
}

    body .blazored-toast-container.position-topleft,
    body .blazored-toast-container.position-topright {
        top: calc(var(--tsl-appbar-h) + 12px);
    }

/* الرسالة بس من غير العنوان (Success / Error) */
body .blazored-toast .blazored-toast-heading,
body .blazored-toast h5 {
    display: none;
}

/* الرسالة في سطر واحد وزرار القفل جنبها على الشمال (من غير سطر فاضي فوقها) */
body .blazored-toast {
    position: relative;
    align-items: center;
    padding-top: 14px;
    padding-bottom: 14px;
}

    body .blazored-toast .blazored-toast-header {
        position: absolute;
        top: 50%;
        inset-inline-end: 14px;
        transform: translateY(-50%);
        margin: 0;
    }

    body .blazored-toast .blazored-toast-message,
    body .blazored-toast p {
        margin: 0;
        padding-inline-end: 32px;
        font-family: inherit;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.6;
    }

@keyframes tsl-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.tsl-modal {
    width: 100%;
    max-width: 820px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 30px 70px rgba(5, 30, 50, .3);
    color: var(--tsl-ink);
    animation: tsl-pop .18s ease;
}

.tsl-modal-sm {
    max-width: 520px;
}

.tsl-modal-lg {
    max-width: 1080px;
}

@keyframes tsl-pop {
    from {
        transform: translateY(12px) scale(.98);
        opacity: 0;
    }

    to {
        transform: none;
        opacity: 1;
    }
}

.tsl-modal-head {
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--tsl-border);
}

    .tsl-modal-head .tsl-page-icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 17px;
    }

    .tsl-modal-head h2 {
        flex: 1;
        min-width: 0;
        margin: 0;
        font-size: 18px;
        font-weight: 700;
        color: var(--tsl-ink);
    }

.tsl-modal-close {
    width: 40px;
    height: 40px;
    flex: none;
    border: 0;
    border-radius: 12px;
    background: var(--tsl-field);
    color: var(--tsl-label);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .tsl-modal-close:hover {
        background: #FDECEC;
        color: var(--tsl-red);
    }

.tsl-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px;
}

.tsl-modal-foot {
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid var(--tsl-border);
    background: #FAFBFC;
}

    .tsl-modal-foot .tsl-btn {
        min-width: 130px;
    }

    /* «حفظ» بيروح للآخر و«إلغاء» في الأول */
    .tsl-modal-foot .tsl-btn-primary {
        margin-inline-start: auto;
    }

.tsl-btn-cancel {
    color: var(--tsl-label);
    background: #fff;
    border: 1.5px solid var(--tsl-border);
}

    .tsl-btn-cancel:hover {
        background: var(--tsl-field);
    }

.tsl-btn-danger {
    color: #fff;
    background: var(--tsl-red);
    box-shadow: 0 3px 0 #A82424;
}

    .tsl-btn-danger:hover {
        color: #fff;
        filter: brightness(1.05);
    }

    .tsl-btn-danger:disabled {
        box-shadow: none;
    }

/* «حذف» / «تأكيد» في نافذة التأكيد بيروح للآخر */
.tsl-modal-foot .tsl-btn-danger {
    margin-inline-start: auto;
}

/* ===== نافذة التأكيد (Shared/TslConfirm.razor) ===== */
.tsl-modal-confirm {
    max-width: 420px;
}

.tsl-confirm {
    padding: 8px 4px 2px;
    text-align: center;
}

.tsl-confirm-icon {
    width: 64px;
    height: 64px;
    margin: 4px auto 14px;
    border-radius: 50%;
    background: var(--tsl-primary-soft);
    color: var(--tsl-primary-deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.tsl-confirm-danger .tsl-confirm-icon {
    background: var(--tsl-red-soft);
    color: var(--tsl-red);
}

.tsl-confirm b {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
    color: var(--tsl-ink);
}

.tsl-confirm p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--tsl-muted);
    overflow-wrap: anywhere;
}

/* مربع كتابة كبير (textarea) جوه النافذة */
.tsl-modal textarea.form-control {
    height: auto;
    min-height: 120px;
    padding: 10px 12px;
    line-height: 1.7;
    resize: vertical;
}

/* ===== بوكس بعنوان جوه الفورم ===== */
.tsl-section {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
    background: #FBFCFD;
}

.tsl-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

    .tsl-section-head b {
        flex: 1;
        font-size: 14.5px;
        color: var(--tsl-ink);
    }

.tsl-count {
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--tsl-primary-soft);
    color: var(--tsl-primary-dark);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

/* ===== سويتش (form-switch بتاع Bootstrap) ===== */
.tsl-switch-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 1.5px solid var(--tsl-border);
    border-radius: 14px;
    background: #fff;
}

    .tsl-switch-card .form-check {
        margin: 0;
        min-height: 0;
    }

.tsl-modal .form-switch .form-check-input {
    width: 2.6em;
    height: 1.4em;
    cursor: pointer;
    border-color: #CBD5DF;
}

.tsl-modal .form-check-input:checked {
    background-color: var(--tsl-primary);
    border-color: var(--tsl-primary);
}

.tsl-modal .form-check-input:focus {
    border-color: var(--tsl-primary);
    box-shadow: 0 0 0 4px rgba(73, 191, 235, .15);
}

.tsl-modal .form-check-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--tsl-text);
    cursor: pointer;
}

/* ===== اختيارات متعددة (checkbox) ===== */
.tsl-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    max-height: 230px;
    overflow-y: auto;
    padding: 2px;
}

.tsl-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 9px 12px;
    border: 1.5px solid var(--tsl-border);
    border-radius: 12px;
    background: #fff;
    color: var(--tsl-text);
    font-size: 13.5px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

    .tsl-check input {
        width: 18px;
        height: 18px;
        flex: none;
        accent-color: var(--tsl-primary);
        cursor: pointer;
    }

    .tsl-check:hover {
        border-color: var(--tsl-soft-border);
        background: var(--tsl-selected);
    }

    .tsl-check.on {
        border-color: var(--tsl-primary);
        background: var(--tsl-selected);
        color: var(--tsl-primary-dark);
        font-weight: 700;
    }

/* ===== صفوف بتتضاف وتتحذف (رقم + رابط + حذف) ===== */
.tsl-rows-head,
.tsl-row {
    display: grid;
    grid-template-columns: 1fr 1fr 44px;
    gap: 10px;
    align-items: start;
}

.tsl-rows-head {
    padding: 0 4px 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tsl-label);
}

.tsl-row {
    margin-bottom: 8px;
    padding: 10px;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
    background: #fff;
}

    .tsl-row > div {
        min-width: 0;
    }

.tsl-icon-btn-add,
.tsl-icon-btn-del {
    flex: none;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, color .15s, filter .15s;
}

.tsl-icon-btn-add {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(90deg, #2EC8FF, #529FFF);
    color: #fff;
    box-shadow: 0 3px 0 #3489E9;
}

    .tsl-icon-btn-add:hover {
        filter: brightness(1.05);
    }

.tsl-icon-btn-del {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--tsl-red-soft);
    color: var(--tsl-red);
}

    .tsl-icon-btn-del:hover {
        background: var(--tsl-red);
        color: #fff;
    }

/* رسايل التحقق (ValidationMessage) */
.tsl-modal .validation-message {
    margin-top: 4px;
    color: var(--tsl-red);
    font-size: 12px;
    font-weight: 700;
}

.tsl-empty-inline {
    padding: 14px;
    border: 1.5px dashed var(--tsl-border);
    border-radius: 14px;
    background: #fff;
    text-align: center;
    color: var(--tsl-faint);
    font-size: 13px;
    font-weight: 700;
}

/* ===== النافذة على الموبايل: بتطلع من تحت ===== */
@media (max-width: 767.98px) {
    .tsl-modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .tsl-modal {
        max-width: none;
        max-height: 94vh;
        border-radius: 22px 22px 0 0;
    }

    .tsl-modal-foot .tsl-btn {
        flex: 1;
        min-width: 0;
    }

    .tsl-rows-head {
        display: none;
    }

    .tsl-row {
        grid-template-columns: 1fr 44px;
    }

        .tsl-row > :nth-child(2) {
            grid-column: 1 / 2;
        }

        .tsl-row > :nth-child(3) {
            grid-row: 1 / 3;
            grid-column: 2 / 3;
            align-self: center;
        }
}


/* =====================================================================
   كارت بهيدر + تابات + شجرة + صفحات (أول استخدام: شجرة المنظمه)
   ===================================================================== */

/* ===== هيدر جوه الكارت ===== */
.tsl-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-bottom: 1px solid var(--tsl-border);
}

    .tsl-card-head h2 {
        flex: 1;
        min-width: 0;
        margin: 0;
        font-size: 16px;
        font-weight: 700;
        color: var(--tsl-ink);
    }

    .tsl-card-head .tsl-btn {
        height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

.tsl-card-head-ic {
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 11px;
    background: var(--tsl-primary-soft);
    color: #529FFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== تابات ===== */
.tsl-tab-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 14px 16px;
}

    .tsl-tab-bar .tsl-btn {
        height: 40px;
        margin-inline-start: auto;
        font-size: 13px;
    }

.tsl-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 14px;
    background: var(--tsl-field);
}

.tsl-tab {
    padding: 8px 20px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--tsl-label);
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .tsl-tab.tsl-active {
        background: #fff;
        color: #529FFF;
        box-shadow: 0 2px 6px rgba(18, 38, 63, .08);
    }

/* رسالة إرشادية (مثلًا: اختر وحدة الأول) */
.tsl-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--tsl-faint);
}

    .tsl-hint i {
        font-size: 30px;
        color: #C9D6E2;
    }

/* ===== الشجرة ===== */
.tsl-tree-wrap {
    max-height: 650px;
    overflow: auto;
    padding: 10px;
}

.tsl-tree,
.tsl-tree ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .tsl-tree ul {
        margin-inline-start: 20px;
        padding-inline-start: 12px;
        border-inline-start: 1.5px dashed var(--tsl-border);
    }

.tsl-node {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0;
    padding: 6px 8px;
    border-radius: 12px;
    transition: background .15s;
}

    .tsl-node:hover {
        background: #F7FAFC;
    }

    .tsl-node.tsl-active {
        background: var(--tsl-selected);
        box-shadow: inset 0 0 0 1.5px var(--tsl-soft-border);
    }

.tsl-node-toggle {
    width: 26px;
    height: 26px;
    flex: none;
    border: 0;
    border-radius: 8px;
    background: var(--tsl-field);
    color: var(--tsl-label);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
}

    .tsl-node-toggle.tsl-hidden {
        visibility: hidden;
    }

.tsl-node-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.tsl-node-ic {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 10px;
    background: var(--tsl-primary-soft);
    color: #529FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.tsl-node.tsl-active .tsl-node-ic {
    background: #529FFF;
    color: #fff;
}

.tsl-node-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    color: var(--tsl-ink);
}

.tsl-node .tsl-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

/* ===== أعمدة صغيرة في الجداول ===== */
.tsl-table .tsl-col-num {
    width: 50px;
    text-align: center;
    color: var(--tsl-faint);
}

.tsl-table .tsl-col-del {
    width: 70px;
    text-align: center;
}

.tsl-table .tsl-col-check {
    width: 70px;
    text-align: center;
}

    .tsl-table .tsl-col-check input {
        width: 18px;
        height: 18px;
        accent-color: #529FFF;
        cursor: pointer;
    }

.tsl-table tr.tsl-row-off td {
    color: var(--tsl-faint);
}

/* زرار حذف صغير جوه الجدول */
.tsl-del-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: var(--tsl-red-soft);
    color: var(--tsl-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .tsl-del-btn:hover {
        background: var(--tsl-red);
        color: #fff;
    }

/* جدول جوه نافذة */
.tsl-modal .tsl-table-wrap {
    max-height: none;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
}

/* ===== الصفحات (Shared/TslPager.razor) ===== */
.tsl-pager {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 2px 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--tsl-muted);
}

    .tsl-pager span {
        margin-inline-end: auto;
    }

    .tsl-pager .tsl-icon-btn {
        width: 34px;
        height: 34px;
    }

        .tsl-pager .tsl-icon-btn:disabled {
            opacity: .4;
            cursor: not-allowed;
        }

@media (max-width: 767.98px) {
    .tsl-tab-bar .tsl-btn {
        width: 100%;
    }

    .tsl-table-cards tbody td.tsl-col-num {
        display: none;
    }
}


/* =====================================================================
   صفحات الإعدادات (أول استخدام: اعدادات الامان)
   ===================================================================== */

/* شرح صغير تحت الخانة */
.tsl-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--tsl-muted);
}

/* صف إعداد: العنوان والشرح + سويتش */
.tsl-switch-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px dashed var(--tsl-divider);
}

    .tsl-switch-row:first-child {
        border-top: 0;
    }

.tsl-switch-txt {
    flex: 1;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

    .tsl-switch-txt b {
        display: block;
        font-size: 14px;
        color: var(--tsl-ink);
    }

    .tsl-switch-txt span {
        display: block;
        margin-top: 3px;
        font-size: 12.5px;
        line-height: 1.6;
        color: var(--tsl-muted);
    }

.tsl-switch-row .form-check {
    flex: none;
    margin: 0;
    min-height: 0;
}

.tsl-page .form-switch .form-check-input {
    width: 2.6em;
    height: 1.4em;
    margin-top: 0;
    border-color: #CBD5DF;
    cursor: pointer;
}

.tsl-page .form-check-input:checked {
    background-color: #529FFF;
    border-color: #529FFF;
}

.tsl-page .form-check-input:focus {
    border-color: #529FFF;
    box-shadow: 0 0 0 4px rgba(82, 159, 255, .15);
}

/* شريط الحفظ الثابت تحت */
.tsl-save-bar {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(18, 38, 63, .08);
}

    .tsl-save-bar > span {
        flex: 1;
        font-size: 13px;
        font-weight: 700;
        color: var(--tsl-muted);
    }

    .tsl-save-bar .tsl-btn {
        min-width: 150px;
    }

@media (max-width: 767.98px) {
    .tsl-save-bar > span {
        display: none;
    }

    .tsl-save-bar .tsl-btn {
        flex: 1;
    }
}


/* =====================================================================
   الأدوار والصلاحيات
   ===================================================================== */

/* عدّاد في هيدر الصفحة (مثلًا: عدد الأدوار) */
.tsl-count-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--tsl-border);
    border-radius: 12px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tsl-label);
    white-space: nowrap;
}

    .tsl-count-chip i {
        color: #529FFF;
    }

    .tsl-count-chip b {
        color: var(--tsl-ink);
    }

/* شارات صغيرة جنب الاسم */
.tsl-tag {
    display: inline-block;
    margin-inline-start: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tsl-tag-blue {
    background: var(--tsl-primary-soft);
    color: #2F7BE0;
}

.tsl-tag-purple {
    background: #F1EAFE;
    color: #6B21A8;
}

/* رسالة خطأ تحت خانة */
.tsl-err {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tsl-red);
}

/* ===== نافذة الصلاحيات ===== */
.tsl-perm-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 1.5px solid #D6E8FF;
    border-radius: 14px;
    background: var(--tsl-primary-soft);
}

    .tsl-perm-all label {
        margin: 0;
        cursor: pointer;
    }

    .tsl-perm-all b {
        font-size: 14px;
        color: #2F7BE0;
    }

    .tsl-perm-all .form-check {
        margin: 0;
        min-height: 0;
    }

.tsl-perm-col {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
    background: #fff;
}

.tsl-perm-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    min-height: 46px;
    border-bottom: 1px solid var(--tsl-border);
    background: #F6F8FA;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--tsl-label);
}

    .tsl-perm-head i {
        color: #529FFF;
    }

.tsl-perm-list {
    list-style: none;
    margin: 0;
    padding: 6px;
    max-height: 360px;
    overflow-y: auto;
}

    .tsl-perm-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 2px;
        padding: 9px 12px;
        border-radius: 10px;
        font-size: 13.5px;
        font-weight: 700;
        color: var(--tsl-text);
        cursor: pointer;
        transition: background .15s, color .15s;
    }

        .tsl-perm-list li:hover {
            background: #F7FAFC;
        }

        .tsl-perm-list li.tsl-active {
            background: #529FFF;
            color: #fff;
        }

        .tsl-perm-list li i {
            font-size: 11px;
            opacity: .6;
        }

.tsl-perm-actions {
    max-height: 360px;
    overflow-y: auto;
    padding: 10px 14px;
}

.tsl-perm-formall {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
    padding: 4px 0 10px;
    border-bottom: 1px dashed var(--tsl-divider);
    font-size: 13.5px;
    font-weight: 700;
}

    .tsl-perm-formall label {
        margin: 0;
        cursor: pointer;
    }

    .tsl-perm-formall .form-check {
        margin: 0;
        min-height: 0;
    }

.tsl-perm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 7px 0;
    font-size: 13.5px;
    color: var(--tsl-text);
    cursor: pointer;
}

    .tsl-perm-item input {
        width: 18px;
        height: 18px;
        flex: none;
        accent-color: #529FFF;
        cursor: pointer;
    }

    .tsl-perm-item.tsl-parent {
        font-weight: 700;
        color: var(--tsl-ink);
    }

.tsl-perm-sub {
    margin-bottom: 4px;
    margin-inline-start: 8px;
    border-inline-start: 1.5px dashed var(--tsl-border);
}

.tsl-perm-item.tsl-child {
    padding-inline-start: 20px;
}

/* أعمدة الصلاحيات بارتفاع ثابت على الشاشات الكبيرة عشان النافذة ماتتحركش وهي بتحمّل أو لما تختار قايمة */
@media (min-width: 768px) {
    .tsl-perm-list,
    .tsl-perm-actions {
        height: 360px;
        max-height: none;
    }
}

.tsl-perm-head .tsl-skel-sm,
.tsl-skel.tsl-skel-sm {
    display: inline-block;
    width: 110px;
    height: 14px;
    margin: 0;
    border-radius: 7px;
}

.tsl-perm-list .tsl-skel {
    height: 34px;
    margin: 4px 0 8px;
}


/* =====================================================================
   القوائم والصفحات (كارت فيه بحث + جدول + صفحات) ونافذة العمليات
   ===================================================================== */

/* خانة بحث جوه الكارت تحت الهيدر (وجنبها select لو موجود) */
.tsl-card-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tsl-border);
}

    .tsl-card-search .tsl-input-icon {
        flex: 1;
        min-width: 180px;
    }

    .tsl-card-search .form-select {
        width: 210px;
        max-width: 100%;
    }

@media (max-width: 575.98px) {
    .tsl-card-search .form-select {
        width: 100%;
    }
}

/* جدول من غير ارتفاع أقصى (الصفحات بتتحكم في الطول) */
.tsl-table-wrap.tsl-plain {
    max-height: none;
}

/* الصف المختار */
.tsl-table tbody tr.tsl-row-active td {
    background: var(--tsl-selected);
}

.tsl-table tbody tr.tsl-row-active .tsl-strong {
    color: #2F7BE0;
}

/* الصفحات جوه كارت */
.tsl-card > .tsl-pager {
    padding: 10px 16px 14px;
}

/* جدول بخانات تتكتب (نافذة العمليات) */
.tsl-table-edit td {
    padding: 8px 10px;
    vertical-align: top;
}

.tsl-table-edit .form-control,
.tsl-table-edit .form-select {
    height: 40px;
    min-width: 140px;
}

.tsl-rows-add {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
}

@media (max-width: 767.98px) {
    .tsl-modal .tsl-table-wrap {
        padding: 0;
        border: 0;
    }

    .tsl-table-edit .form-control,
    .tsl-table-edit .form-select {
        min-width: 0;
    }
}


/* =====================================================================
   التراميز: سحب الصفوف للترتيب + كروت العناصر في نافذة الاضافة
   ===================================================================== */

/* عمود الترتيب */
.tsl-table .tsl-col-order {
    width: 90px;
}

/* الصفوف اللي بتتسحب */
.tsl-table tbody tr[draggable="true"] td {
    cursor: grab;
}

.tsl-drag {
    color: var(--tsl-faint);
}

/* كارت لكل عنصر جوه النافذة */
.tsl-item-card {
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
    background: #FBFCFD;
}

.tsl-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

    .tsl-item-head b {
        flex: 1;
        min-width: 0;
        font-size: 14.5px;
        color: var(--tsl-ink);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.tsl-item-no {
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #529FFF;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* سويتش صغير جنب العنوان */
.tsl-switch-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--tsl-label);
}

    .tsl-switch-inline label {
        margin: 0;
        cursor: pointer;
    }

    .tsl-switch-inline .form-check {
        margin: 0;
        min-height: 0;
    }

.tsl-modal .tsl-switch-inline .form-check-input {
    margin-top: 0;
}


/* =====================================================================
   المركبات: عدد الصفوف + الصفحات (CustomPagination) + الخدمات + المرفقات
   ===================================================================== */

/* سطر العدد فوق الجدول */
.tsl-card-search.tsl-card-count {
    border-top: 1px solid var(--tsl-border);
}

/* chips جنب بعض في خانة جدول */
.tsl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

/* تحت الجدول: عدد الصفوف + الصفحات */
.tsl-list-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px 14px;
    border-top: 1px solid var(--tsl-border);
}

.tsl-size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tsl-label);
}

    .tsl-size label {
        margin: 0;
        white-space: nowrap;
    }

    .tsl-size .form-select {
        width: auto;
        min-width: 90px;
        height: 38px;
    }

/* الصفحات بالأرقام (Shared/CustomPagination.razor) */
.tsl-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
}

.tsl-pg-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid var(--tsl-border);
    border-radius: 10px;
    background: #fff;
    color: var(--tsl-ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

    .tsl-pg-btn:hover:not(:disabled) {
        border-color: #529FFF;
        color: #2F7BE0;
    }

    .tsl-pg-btn.tsl-on {
        background: #529FFF;
        border-color: #529FFF;
        color: #fff;
    }

    .tsl-pg-btn:disabled {
        opacity: .45;
        cursor: default;
    }

.tsl-pg-gap {
    padding: 0 2px;
    color: var(--tsl-faint);
}

@media (max-width: 575.98px) {
    .tsl-list-foot {
        justify-content: center;
    }

    .tsl-pg-btn {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
    }
}

/* خانة رفع ملفات */
.tsl-upl-tile {
    height: 100%;
    padding: 12px;
    border: 1.5px dashed var(--tsl-border);
    border-radius: 14px;
    background: #FBFCFD;
}

/* سويتش في كارت جوه نافذة */
.tsl-modal .tsl-switch-card .form-switch .form-check-input {
    margin-top: 0;
}

/* ===== اختيار خدمات المركبة (Shared/CarServicesPicker.razor) ===== */
.tsl-csp-box {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 48px;
    padding: 6px 10px;
    border: 1.5px solid var(--tsl-border);
    border-radius: 14px;
    background: #fff;
}

    .tsl-csp-box.tsl-csp-changed {
        border: 2px solid #F0A33A;
        background: #FFFAF2;
    }

.tsl-csp-empty {
    color: var(--tsl-red);
    font-size: 13px;
    font-weight: 700;
}

.tsl-csp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 12px;
    border-radius: 999px;
    background: #EAF3FF;
    color: #1E5FB8;
    font-size: 13px;
    font-weight: 700;
}

    .tsl-csp-chip button {
        width: 22px;
        height: 22px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #CFE3FF;
        color: #1E5FB8;
        line-height: 1;
    }

.tsl-csp-toggle {
    margin-inline-start: auto;
    padding: 6px 8px;
    border: 0;
    background: none;
    color: #2F7BE0;
    font-size: 13px;
    font-weight: 700;
}

/* سطر المجموعة */
.tsl-csp-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    font-size: 12.5px;
}

.tsl-csp-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tsl-csp-group-tag {
    padding: 3px 12px;
    border-radius: 999px;
    background: #EEF2FF;
    color: #3440A4;
    font-weight: 700;
}

.tsl-csp-label {
    color: var(--tsl-label);
    font-weight: 700;
}

.tsl-csp-ok {
    color: #0F8A4B;
    font-weight: 700;
}

.tsl-csp-miss-chip {
    padding: 2px 10px;
    border: 1px dashed #D97706;
    border-radius: 999px;
    background: #FFF8EB;
    color: #8A4B00;
    font-size: 12px;
    font-weight: 700;
}

    .tsl-csp-miss-chip:hover {
        background: #FFEFD1;
    }

.tsl-csp-extra-chip {
    padding: 2px 10px;
    border-radius: 999px;
    background: #ECFDF3;
    color: #0F6B3A;
    font-size: 12px;
    font-weight: 700;
}

.tsl-csp-warn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #FFF4E0;
    color: #6B3A00;
    font-weight: 700;
}

/* القائمة المفتوحة */
.tsl-csp-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    padding: 14px;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
    background: #FBFCFD;
}

.tsl-csp-title {
    color: var(--tsl-ink);
    font-size: 13px;
    font-weight: 700;
}

    .tsl-csp-title small {
        color: var(--tsl-muted);
        font-weight: 400;
    }

.tsl-csp-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.tsl-csp-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 1.5px solid var(--tsl-border);
    border-radius: 12px;
    background: #fff;
    color: var(--tsl-ink);
    text-align: start;
    font: inherit;
    line-height: 1.4;
}

    .tsl-csp-group:hover {
        border-color: #529FFF;
    }

    .tsl-csp-group.tsl-csp-on {
        border-color: #529FFF;
        background: #F2F8FF;
    }

    .tsl-csp-group.tsl-csp-not-fit {
        opacity: .65;
    }

.tsl-csp-radio {
    position: relative;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 2px solid #94A3B8;
    border-radius: 50%;
}

.tsl-csp-group.tsl-csp-on .tsl-csp-radio {
    border-color: #529FFF;
}

    .tsl-csp-group.tsl-csp-on .tsl-csp-radio::after {
        content: "";
        position: absolute;
        inset: 3px;
        border-radius: 50%;
        background: #529FFF;
    }

.tsl-csp-group-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.tsl-csp-group-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
}

.tsl-csp-suggest {
    padding: 1px 8px;
    border-radius: 8px;
    background: #FFF4E0;
    color: #8A4B00;
    font-size: 11px;
}

.tsl-csp-group-members {
    color: var(--tsl-muted);
    font-size: 12px;
    line-height: 1.5;
}

.tsl-csp-nofit {
    color: var(--tsl-red);
    font-size: 11.5px;
    font-weight: 700;
}

.tsl-csp-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    overflow: hidden;
    border: 1px solid var(--tsl-border);
    border-radius: 12px;
    background: #fff;
}

.tsl-csp-option {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid #F1F5F9;
    font-size: 13.5px;
    cursor: pointer;
}

    .tsl-csp-option.tsl-csp-on {
        background: #F2F8FF;
        font-weight: 700;
    }

    .tsl-csp-option.tsl-csp-missing {
        background: #FFFAF2;
        outline: 1px dashed #F0A33A;
        outline-offset: -4px;
    }

    .tsl-csp-option input {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: #529FFF;
    }

.tsl-csp-flags {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-inline-start: auto;
}

.tsl-csp-flag {
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.tsl-csp-flag-missing {
    background: #FFF4E0;
    color: #8A4B00;
}

.tsl-csp-flag-extra {
    background: #ECFDF3;
    color: #0F6B3A;
}

.tsl-csp-flag-warn {
    background: #FDECEC;
    color: #A61B10;
}

/* =====================================================================
   كروت الإحصائيات (محاسبة العربة)
   ===================================================================== */
.tsl-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.tsl-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--tsl-border);
    border-radius: 18px;
    background: #fff;
}

.tsl-stat-ic {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #EAF3FF;
    color: #529FFF;
    font-size: 18px;
}

.tsl-stat small {
    display: block;
    color: var(--tsl-muted);
    font-size: 12.5px;
    font-weight: 700;
}

.tsl-stat b {
    display: block;
    margin-top: 2px;
    color: var(--tsl-ink);
    font-size: 20px;
    word-break: break-all;
}

@media (max-width: 991.98px) {
    .tsl-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .tsl-stat {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .tsl-stat-ic {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 15px;
    }

    .tsl-stat b {
        font-size: 18px;
    }
}


/* =====================================================================
   التعاقدات: badges الرخص + التبويبات مع البحث + الموبايل + المرفقات + الطباعة
   ===================================================================== */

.tsl-badge-danger {
    background: #FDECEC;
    color: #D64545;
}

.tsl-badge-none {
    background: #F1F5F9;
    color: #64748B;
}

/* سطر التبويبات تحت الفلاتر */
.tsl-tab-bar.tsl-tab-bar-line {
    border-top: 1px solid var(--tsl-border);
}

/* خانات البحث جنب التبويبات */
.tsl-searches {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

    .tsl-searches .tsl-input-icon {
        width: 260px;
        max-width: 100%;
    }

@media (max-width: 767.98px) {
    .tsl-tab-bar.tsl-tab-bar-line .tsl-tabs {
        width: 100%;
    }

    .tsl-tab-bar.tsl-tab-bar-line .tsl-tab {
        flex: 1;
    }

    .tsl-searches .tsl-input-icon {
        width: 100%;
    }
}

/* رقم الموبايل + زراير واتساب / نسخ */
.tsl-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
}

.tsl-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: filter .15s;
}

    .tsl-mini-btn:hover {
        filter: brightness(.95);
    }

.tsl-mini-wa {
    background: #E7F8EE;
    color: #1FA855;
}

.tsl-mini-copy {
    background: #EAF3FF;
    color: #2F7BE0;
}

/* شبكة خانات الرفع (صفحة تعديل التعاقد) */
.tsl-upl-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

    .tsl-upl-grid.tsl-upl-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

@media (max-width: 575.98px) {
    .tsl-upl-grid,
    .tsl-upl-grid.tsl-upl-grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* شريط الحفظ في الموبايل: الزراير بعرض الشاشة */
@media (max-width: 575.98px) {
    .tsl-save-bar > span {
        display: none;
    }

    .tsl-save-bar .tsl-btn {
        flex: 1;
    }
}

/* ===== بحث بقايمة (Shared/SearchDropDownV2.razor) ===== */
.tsl-sdd {
    position: relative;
}

.tsl-sdd-list {
    position: absolute;
    z-index: 1110;
    inset-inline: 0;
    top: calc(100% + 4px);
    max-height: 250px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
    border: 1px solid var(--tsl-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(18, 38, 63, .12);
}

/* زرار X جوه الخانة لمسح الاختيار */
.tsl-sdd.tsl-sdd-has-clear > .form-control {
    padding-inline-end: 40px;
}

.tsl-sdd-clear {
    position: absolute;
    top: 50%;
    inset-inline-end: 8px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--tsl-field);
    color: var(--tsl-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, color .15s;
}

    .tsl-sdd-clear:hover {
        background: #FDECEC;
        color: var(--tsl-red);
    }

/* القايمة بتترسم فوق أي حاجة (النافذة 1300 والـ AppBar 1100) وتحت رسايل Toast (1400)
   مكانها ومقاسها بيتحطوا من window.tslSdd في wwwroot/script.js */
.tsl-sdd-list.tsl-sdd-fixed {
    position: fixed;
    left: auto;
    right: auto;
    z-index: 1350;
}

.tsl-sdd-item {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--tsl-ink);
    cursor: pointer;
}

    .tsl-sdd-item:hover {
        background: var(--tsl-selected);
        color: #2F7BE0;
    }

/* ===== صفحة الطباعة (على الشاشة بس — الورقة المطبوعة ليها CSS بتاع printInvoke) ===== */
.tsl-print-state {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.tsl-print-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

    .tsl-print-info .field-value {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 10px 12px;
        border: 1px solid var(--tsl-border);
        border-radius: 12px;
        background: #FBFCFD;
        color: var(--tsl-ink);
        font-weight: 700;
    }

    .tsl-print-info .field-label {
        color: var(--tsl-muted);
        font-size: 12px;
    }

.tsl-print .image-container {
    margin-bottom: 16px;
    text-align: center;
}

    .tsl-print .image-container .field-label {
        margin-bottom: 8px;
        color: var(--tsl-label);
        font-size: 13px;
        font-weight: 700;
    }

    .tsl-print .image-container img {
        width: 100%;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    }

.tsl-print-section {
    height: 100%;
    margin-top: 0;
}

@media (max-width: 575.98px) {
    .tsl-print-info {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* =====================================================================
   الورديات: نوع الكابتن + إغلاق وردية + عرض وردية + المصاريف
   ===================================================================== */

/* داخلى / خارجى */
.tsl-tag.tsl-tag-in,
.tsl-tag.tsl-tag-out {
    margin-inline-start: 0;
}

.tsl-tag-in {
    background: #E0EDFF;
    color: #1D4ED8;
}

.tsl-tag-out {
    background: #FDECE4;
    color: #C2410C;
}

/* كروت قراية بس (عرض وردية) */
.tsl-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

    .tsl-info > div {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid var(--tsl-border);
        border-radius: 12px;
        background: #FBFCFD;
    }

        .tsl-info > div.tsl-info-wide {
            grid-column: 1 / -1;
        }

    .tsl-info small {
        color: var(--tsl-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .tsl-info b {
        min-height: 1.2em;
        color: var(--tsl-ink);
        font-size: 14px;
        overflow-wrap: anywhere;
    }

@media (max-width: 575.98px) {
    .tsl-info {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ===== إغلاق وردية ===== */
.tsl-cs-captain {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
}

.tsl-cs-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #F5F9FF;
}

    .tsl-cs-top .tsl-badge {
        margin-inline-start: auto;
    }

.tsl-cs-avatar {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #529FFF;
    color: #fff;
    font-size: 19px;
    font-weight: 800;
}

.tsl-cs-name {
    color: var(--tsl-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.tsl-cs-sub {
    color: var(--tsl-muted);
    font-size: 12.5px;
}

.tsl-cs-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--tsl-border);
}

    .tsl-cs-facts > div {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        padding: 10px 12px;
    }

        .tsl-cs-facts > div + div {
            border-inline-start: 1px solid var(--tsl-border);
        }

        .tsl-cs-facts > div > span {
            min-width: 0;
        }

    .tsl-cs-facts i {
        width: 16px;
        color: #529FFF;
        text-align: center;
    }

    .tsl-cs-facts small {
        display: block;
        color: var(--tsl-muted);
        font-size: 11.5px;
    }

    .tsl-cs-facts b {
        display: block;
        overflow: hidden;
        color: var(--tsl-ink);
        font-size: 13.5px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

.tsl-cs-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tsl-cs-stat {
    padding: 10px 8px;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
    background: #FBFCFD;
    text-align: center;
}

    .tsl-cs-stat small {
        display: block;
        margin-bottom: 2px;
        color: var(--tsl-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .tsl-cs-stat b {
        color: #1E5FB8;
        font-size: 19px;
        font-weight: 800;
    }

.tsl-cs-note {
    display: block;
    margin: 6px 0 14px;
    color: var(--tsl-muted);
    font-size: 12px;
}

.tsl-cs-closed {
    padding: 14px;
    border-radius: 12px;
    background: #FDECEC;
    color: #A61B10;
    font-weight: 700;
    text-align: center;
}

.tsl-modal textarea.form-control {
    height: auto;
    min-height: 70px;
}

/* عمود المبلغ (المصاريف) */
.tsl-table .tsl-col-money {
    width: 150px;
}


/* فلتر لوحده فوق الجدول جوه الكارت (عنوان + select) */
.tsl-card-filter {
    width: 240px;
    max-width: 100%;
}

@media (max-width: 575.98px) {
    .tsl-card-filter {
        width: 100%;
    }
}

/* خط فاصل بين الفلاتر والجدول (أو اللودر) جوه نفس الكارت */
.tsl-table-wrap.tsl-table-line,
.tsl-loading.tsl-loading-line {
    border-top: 1px solid var(--tsl-border);
}

/* صورة + اسم في خلية الجدول (الكابتن / السيارة) */
.tsl-media {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tsl-media-img {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tsl-primary-soft);
    transition: transform .15s ease;
}

.tsl-media a:hover .tsl-media-img {
    transform: scale(1.06);
}

.tsl-media-ph {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--tsl-field);
    color: var(--tsl-faint);
    font-size: 18px;
}

    .tsl-media-img.tsl-media-car,
    .tsl-media-ph.tsl-media-car {
        width: 72px;
        height: 48px;
        border-radius: 10px;
    }

.tsl-media-img.tsl-media-car {
    border-width: 1px;
}

@media (max-width: 767.98px) {
    .tsl-table-cards .tsl-media {
        justify-content: flex-end;
    }
}

/* رقم بارز أخضر (الرحلات المكتملة) */
.tsl-trips {
    font-size: 15px;
    font-weight: 800;
    color: var(--tsl-green);
}

/* رفع صورة واحدة (Shared/UserSingleFileUploader.razor) */
.tsl-sfu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    direction: rtl;
}

    .tsl-sfu.tsl-sfu-compact {
        max-width: 120px;
        gap: 6px;
    }

.tsl-sfu-preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 150px;
    overflow: hidden;
    border: 1px solid var(--tsl-border);
    border-radius: 12px;
    background: var(--tsl-field);
}

.tsl-sfu-compact .tsl-sfu-preview {
    width: 96px;
    height: 96px;
    margin: 0 auto;
}

.tsl-sfu-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

    .tsl-sfu-thumb img.tsl-sfu-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .2s ease;
    }

    .tsl-sfu-thumb:hover img.tsl-sfu-img {
        transform: scale(1.04);
    }

.tsl-sfu-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, .78);
    color: var(--tsl-primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.tsl-sfu-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 150px;
    margin: 0;
    padding: 10px;
    text-align: center;
    border: 2px dashed var(--tsl-soft-border);
    border-radius: 12px;
    background: #FBFCFD;
    color: var(--tsl-text);
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

label.tsl-sfu-empty {
    cursor: pointer;
}

    label.tsl-sfu-empty:hover {
        border-color: var(--tsl-primary);
        background: var(--tsl-selected);
        color: var(--tsl-primary-dark);
    }

.tsl-sfu-ic {
    font-size: 30px;
    color: var(--tsl-primary);
}

.tsl-sfu-empty b {
    font-size: 14px;
}

.tsl-sfu-empty small {
    font-size: 12px;
    color: var(--tsl-muted);
}

.tsl-sfu-compact .tsl-sfu-empty {
    width: 96px;
    height: 96px;
    margin: 0 auto;
    border-width: 1px;
    border-style: solid;
    font-size: 11px;
}

.tsl-sfu-compact .tsl-sfu-ic {
    font-size: 22px;
}

.tsl-sfu-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.tsl-sfu-act {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--tsl-border);
    border-radius: 8px;
    background: #fff;
    color: var(--tsl-text);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

    .tsl-sfu-act:hover {
        border-color: var(--tsl-soft-border);
        background: var(--tsl-selected);
        color: var(--tsl-primary-dark);
        text-decoration: none;
    }

    .tsl-sfu-act.tsl-sfu-del:hover {
        border-color: var(--tsl-red-border);
        background: var(--tsl-red-soft);
        color: var(--tsl-red);
    }

.tsl-sfu-compact .tsl-sfu-act {
    height: 26px;
    padding: 0 7px;
    font-size: 11px;
}

.tsl-sfu-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    margin: 0;
    border-radius: 10px;
    background: var(--tsl-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}

    .tsl-sfu-upload:hover {
        background: var(--tsl-primary-deep);
        color: #fff;
    }

    .tsl-sfu-upload.disabled {
        opacity: .6;
        pointer-events: none;
    }

.tsl-sfu-error {
    color: var(--tsl-red);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

/* ===== مساعدات عامة صغيرة ===== */
.tsl-ltr {
    display: inline-block;
    direction: ltr;
}

.tsl-link {
    color: #2F7BE0;
    font-weight: 800;
    cursor: pointer;
}

    .tsl-link:hover {
        text-decoration: underline;
    }

.tsl-dot {
    flex: none;
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.tsl-fine {
    font-weight: 800;
    color: #BE123C;
    font-variant-numeric: tabular-nums;
}

.tsl-note {
    display: block;
    color: var(--tsl-muted);
    font-size: 12.5px;
}

.tsl-badge-blue {
    background: var(--tsl-primary-soft);
    color: #2F7BE0;
}

.tsl-badge-current {
    background: #529FFF;
    color: #fff;
}

.tsl-badge-company {
    background: #F1EAFE;
    color: #6B21A8;
}

/* عمود بيترتب لما تدوس عليه */
.tsl-table thead th.tsl-sort {
    cursor: pointer;
    white-space: nowrap;
}

    .tsl-table thead th.tsl-sort i {
        margin-inline-start: 6px;
        opacity: .85;
    }

/* صف مقفول (سجل قديم) */
.tsl-table tbody tr.tsl-row-closed td {
    background: #F8FAFD;
    color: #64748B;
}

/* زرار رجوع جنب عنوان الصفحة */
.tsl-back {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--tsl-border);
    border-radius: 12px;
    background: #fff;
    color: var(--tsl-text);
}

    .tsl-back:hover {
        background: var(--tsl-selected);
        color: var(--tsl-primary-dark);
    }

/* checkbox جوه هيدر الصفحة */
.tsl-head-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--tsl-border);
    border-radius: 12px;
    background: #fff;
    color: var(--tsl-text);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

    .tsl-head-check .form-check-input {
        margin: 0;
    }

/* تنبيه في سطر (تحذير / معلومة / خطأ) */
.tsl-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
}

    .tsl-alert i {
        margin-top: 3px;
    }

    .tsl-alert a {
        margin-inline-start: auto;
        font-weight: 800;
        white-space: nowrap;
        cursor: pointer;
    }

.tsl-alert-warn {
    background: #FFF4E0;
    color: #6B3A00;
}

.tsl-alert-info {
    background: var(--tsl-primary-soft);
    color: var(--tsl-primary-dark);
}

    .tsl-alert-info a {
        color: #2F7BE0;
    }

.tsl-alert-err {
    border: 1px solid var(--tsl-red-border);
    background: var(--tsl-red-soft);
    color: var(--tsl-red);
}

/* كارت شخص (صورة + اسم + رقم + بادجات) */
.tsl-person {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
    background: #FBFCFD;
}

    .tsl-person .tsl-media-img,
    .tsl-person .tsl-media-ph {
        width: 52px;
        height: 52px;
    }

    .tsl-person b {
        display: block;
        color: var(--tsl-ink);
        font-size: 15px;
    }

    .tsl-person small {
        color: var(--tsl-muted);
        font-weight: 700;
    }

.tsl-person-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
    margin-inline-start: auto;
}

.tsl-person.tsl-person-warn {
    border-color: #F3C77A;
    background: #FFF9EE;
}

@media (max-width: 575.98px) {
    .tsl-person {
        flex-wrap: wrap;
    }

    .tsl-person-badges {
        justify-content: flex-start;
        width: 100%;
        margin-inline-start: 0;
    }
}

/* تابات جوه نافذة */
.tsl-modal-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 12px;
    background: var(--tsl-field);
}

    .tsl-modal-tabs button {
        flex: 1;
        padding: 8px 10px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: var(--tsl-muted);
        font-size: 13.5px;
        font-weight: 700;
    }

        .tsl-modal-tabs button.tsl-on {
            background: #fff;
            color: var(--tsl-primary-dark);
            box-shadow: 0 2px 8px rgba(18, 38, 63, .08);
        }

/* أرقام (إحصائيات) في شبكة عمودين */
.tsl-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

    .tsl-stat-grid .tsl-cs-stat {
        padding: 14px 10px;
    }

/* ===== المركبات المسجلة ===== */
.tsl-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 28px;
}

    .tsl-facts small {
        display: block;
        color: var(--tsl-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .tsl-facts b {
        color: var(--tsl-ink);
    }

.tsl-facts-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
    color: var(--tsl-muted);
    font-size: 13px;
}

    .tsl-facts-hint i {
        color: #2F7BE0;
    }

.tsl-car {
    border: 1.5px solid var(--tsl-border);
}

    .tsl-car.tsl-car-current {
        border-color: #529FFF;
    }

    .tsl-car.tsl-car-dirty {
        border-color: #F0A33A;
    }

    .tsl-car.tsl-car-error {
        border-color: var(--tsl-red);
    }

.tsl-car-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tsl-border);
}

.tsl-car-current .tsl-car-head {
    border-radius: 18px 18px 0 0;
    background: #F3F8FF;
}

.tsl-car-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    min-width: 0;
    max-width: 100%;
}

    .tsl-car-title > div {
        min-width: 0;
    }

/* «ناقص: ...» ممكن تبقى طويلة: تنزل سطر بدل ما تخرج برا الشاشة */
.tsl-car .tsl-badge {
    white-space: normal;
}

.tsl-car-title h2 {
    margin: 0;
    color: var(--tsl-ink);
    font-size: 16px;
    font-weight: 800;
}

.tsl-car-title small {
    display: block;
    color: var(--tsl-muted);
    font-size: 12.5px;
}

.tsl-car-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tsl-car .tsl-alert {
    margin: 14px 18px 0;
}

.tsl-car-body {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    padding: 18px;
}

.tsl-car-side {
    flex: 1 1 320px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tsl-car-main {
    flex: 999 1 480px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tsl-car-services {
    padding-top: 12px;
    border-top: 1px dashed var(--tsl-border);
}

@media (max-width: 575.98px) {
    .tsl-car-side {
        max-width: none;
    }

    .tsl-car-body {
        padding: 14px;
    }
}

.tsl-sec-title {
    display: block;
    margin-bottom: 6px;
    color: var(--tsl-label);
    font-size: 13.5px;
    font-weight: 800;
}

.tsl-sec-sub {
    color: var(--tsl-muted);
    font-size: 12px;
    font-weight: 600;
}

.tsl-imgbox {
    padding: 8px;
    border: 1px solid var(--tsl-soft-border);
    border-radius: 14px;
    background: #F8FBFF;
}

    .tsl-imgbox small {
        display: block;
        margin-bottom: 6px;
        color: var(--tsl-label);
        font-size: 12px;
        font-weight: 700;
    }

    .tsl-imgbox.tsl-changed {
        border: 2px solid #F0A33A;
        background: #FFFAF2;
    }

.form-control.tsl-changed,
.form-select.tsl-changed {
    border: 2px solid #F0A33A;
    background-color: #FFFAF2;
}

.tsl-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tsl-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    padding: 18px;
}

.tsl-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 14px;
}

.tsl-field-warn {
    display: block;
    margin-top: 4px;
    color: #8A4B00;
    font-size: 12px;
    font-weight: 700;
}

.form-control.tsl-readonly {
    display: flex;
    align-items: center;
    background: var(--tsl-field);
    color: var(--tsl-muted);
}

/* تاريخ انتهاء رخصة + لونها */
.tsl-expiry {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 14px;
}

    .tsl-expiry label {
        font-size: 13px;
        font-weight: 700;
    }

.tsl-lic-ok {
    background: var(--tsl-green-soft);
    color: var(--tsl-green);
}

.tsl-lic-soon {
    background: #FFF3DE;
    color: #C77700;
}

.tsl-lic-expired {
    background: #FDECEC;
    color: #D64545;
}

.tsl-lic-none {
    background: #F1F5F9;
    color: #64748B;
}

/* زرار تعطيل/حذف بإطار أحمر */
.tsl-btn-remove {
    border: 1px solid var(--tsl-red-border);
    background: #fff;
    color: var(--tsl-red);
}

    .tsl-btn-remove:hover:not(:disabled) {
        background: var(--tsl-red-soft);
        color: var(--tsl-red);
    }

/* سكشن بيتفتح ويتقفل (بيانات التعاقد) */
.tsl-collapse {
    overflow: hidden;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
}

.tsl-collapse-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    background: #FBFCFD;
    color: var(--tsl-text);
    text-align: start;
}

    .tsl-collapse-head i {
        color: #2F7BE0;
    }

    .tsl-collapse-head b {
        color: var(--tsl-primary-dark);
    }

.tsl-collapse-sum {
    color: var(--tsl-muted);
    font-size: 13px;
}

.tsl-collapse-toggle {
    margin-inline-start: auto;
    color: #2F7BE0;
    font-size: 13px;
    font-weight: 800;
}

.tsl-collapse-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border-top: 1px solid var(--tsl-border);
}

/* ===== سجل المستويات: شريط التوزيع ===== */
.tsl-dist {
    margin: 0 18px 16px;
    padding: 14px 16px;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
}

.tsl-dist-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

    .tsl-dist-head b {
        color: var(--tsl-ink);
    }

    .tsl-dist-head span {
        color: var(--tsl-muted);
        font-size: 13px;
    }

.tsl-dist-bar {
    display: flex;
    gap: 2px;
    height: 14px;
    margin: 10px 0;
    overflow: hidden;
    border-radius: 999px;
    background: #EEF1F6;
}

.tsl-dist-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-size: 13px;
}

    .tsl-dist-legend > span,
    .tsl-level {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

/* كلمة مرور بزرار إظهار */
.tsl-pass {
    position: relative;
}

    .tsl-pass .form-control {
        padding-inline-end: 46px;
    }

.tsl-pass-toggle {
    position: absolute;
    top: 50%;
    inset-inline-end: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--tsl-muted);
    transform: translateY(-50%);
}

    .tsl-pass-toggle:hover {
        background: var(--tsl-selected);
        color: var(--tsl-primary-dark);
    }

/* لستة أخطاء تحت خانة (شروط كلمة المرور) */
.tsl-err-list {
    margin: 6px 0 0;
    padding-inline-start: 18px;
    color: var(--tsl-red);
    font-size: 12.5px;
    font-weight: 600;
}

/* =====================================================================
   التوصيلات + المحافظ
   ===================================================================== */

.tsl-badge-pending {
    background: #FCEFC0;
    color: #8A6A00;
}

.tsl-badge-start {
    background: #D3F8E4;
    color: #11804A;
}

.tsl-badge-done {
    background: #E5E7EB;
    color: #475569;
}

/* اسم + رقم تحت بعض في خلية */
.tsl-two {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

/* اختيارات راديو جنب بعض (نفس شكل .tsl-check) */
.tsl-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* اختيار مكان: زرار + اسم المكان */
.tsl-pick {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1.5px dashed var(--tsl-soft-border);
    border-radius: 12px;
}

    .tsl-pick span {
        color: var(--tsl-ink);
        font-weight: 700;
    }

/* كارت بيتفتح ويتقفل (أقسام صفحة تفاصيل التوصيلة) */
.tsl-sec-card {
    margin-bottom: 14px;
}

.tsl-sec-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    background: transparent;
    text-align: start;
}

    .tsl-sec-toggle h2 {
        margin: 0;
        color: var(--tsl-ink);
        font-size: 16px;
        font-weight: 800;
    }

    .tsl-sec-toggle .tsl-chev {
        margin-inline-start: auto;
        color: var(--tsl-muted);
        transition: transform .2s;
    }

    .tsl-sec-toggle[aria-expanded="true"] .tsl-chev {
        transform: rotate(180deg);
    }

.tsl-sec-body {
    padding: 18px;
    border-top: 1px solid var(--tsl-border);
}

/* بيانات (عنوان + قيمة) في كروت صغيرة */
.tsl-kv {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

    .tsl-kv > div {
        min-width: 0;
        padding: 10px 12px;
        border: 1px solid var(--tsl-border);
        border-radius: 12px;
        background: #FBFCFD;
        overflow-wrap: anywhere;
    }

    .tsl-kv small {
        display: block;
        margin-bottom: 2px;
        color: var(--tsl-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .tsl-kv b {
        color: var(--tsl-ink);
    }

@media (max-width: 991.98px) {
    .tsl-kv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .tsl-kv {
        grid-template-columns: 1fr;
    }
}

/* الرسائل */
.tsl-chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
}

.tsl-msg {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 14px;
    overflow-wrap: anywhere;
}

    .tsl-msg small {
        display: block;
        margin-bottom: 3px;
        font-size: 12px;
        font-weight: 800;
    }

    .tsl-msg time {
        display: block;
        margin-top: 3px;
        font-size: 11px;
        opacity: .75;
    }

.tsl-msg-cap {
    align-self: flex-start;
    border-start-start-radius: 4px;
    background: #E0F7FA;
    color: #00695C;
}

.tsl-msg-cli {
    align-self: flex-end;
    border-start-end-radius: 4px;
    background: #FFE9CC;
    color: #9A3412;
}

/* سجل المكالمات */
.tsl-calls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tsl-call {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #F8FAFB;
}

.tsl-call-ic {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--tsl-primary-soft);
    color: #2F7BE0;
}

.tsl-call-cap .tsl-call-ic {
    background: var(--tsl-green-soft);
    color: var(--tsl-green);
}

.tsl-call b {
    display: block;
    color: var(--tsl-ink);
    font-size: 14px;
}

.tsl-call small {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    color: var(--tsl-muted);
    font-size: 12.5px;
}

/* أرقام التتبع (المسافة / الأجرة / الانتظار) */
.tsl-metrics {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
}

.tsl-metric {
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--tsl-field);
    font-size: 13px;
}

    .tsl-metric label {
        margin-inline-end: 4px;
        color: var(--tsl-muted);
        font-weight: 700;
    }

.tsl-coords {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
    color: var(--tsl-muted);
    font-size: 12px;
}

/* مبلغ موجب / سالب */
.tsl-amt-plus {
    color: var(--tsl-green);
    font-weight: 800;
}

.tsl-amt-minus {
    color: var(--tsl-red);
    font-weight: 800;
}

/* تكلفة التوصيلة */
.tsl-cost {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .tsl-cost > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border: 1px solid var(--tsl-border);
        border-radius: 12px;
        background: #FBFCFD;
        font-weight: 700;
    }

        .tsl-cost > div b {
            color: var(--tsl-ink);
            font-size: 17px;
            text-align: end;
        }

        .tsl-cost > div.tsl-cost-total {
            border-color: #B7D6FF;
            background: var(--tsl-selected);
        }

            .tsl-cost > div.tsl-cost-total b {
                color: #1E5FB8;
                font-size: 20px;
            }

/* جدول جوه كارت بإطار (خطوط التوصيلة) */
.tsl-table-box {
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
}

/* اختيار من زراير (المناطق / العماير) */
.tsl-pick-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tsl-pick-btn {
    padding: 9px 14px;
    border: 1.5px solid var(--tsl-soft-border);
    border-radius: 12px;
    background: #fff;
    color: var(--tsl-primary-dark);
    font-size: 13.5px;
    font-weight: 700;
    transition: background .15s, border-color .15s;
}

    .tsl-pick-btn:hover {
        border-color: var(--tsl-primary);
        background: var(--tsl-selected);
    }

/* رجوع للمستوى اللي فات (مسار المنطقة) */
.tsl-crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 0;
    border-radius: 10px;
    color: #2F7BE0;
    font-size: 13px;
    font-weight: 800;
}

/* مكان الخريطة جوه نافذة «اختر من الخريطة» */
.tsl-map-box {
    width: 100%;
    height: 60vh;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
}

/* تابات كتير (مناطق) — بتنزل سطر جديد بدل ما تخرج برا النافذة */
.tsl-modal-tabs.tsl-tabs-wrap {
    flex-wrap: wrap;
}

    .tsl-modal-tabs.tsl-tabs-wrap button {
        flex: 1 1 auto;
        white-space: nowrap;
    }

/* ===== متابعة التوصيلات: لون الصف حسب الحالة (نفس ألوان الصفحة القديمة بالظبط) ===== */
.tsl-table tbody tr.tsl-trk-new,
.tsl-table tbody tr.tsl-trk-new td {
    background: #ffffff;
}

.tsl-table tbody tr.tsl-trk-pending,
.tsl-table tbody tr.tsl-trk-pending td {
    background: #f9e790;
}

.tsl-table tbody tr.tsl-trk-current,
.tsl-table tbody tr.tsl-trk-current td {
    background: #82d0ee;
}

.tsl-table tbody tr.tsl-trk-start,
.tsl-table tbody tr.tsl-trk-start td {
    background: #8ef5bc;
}

/* أيقونات كروت حالة التوصيلات بنفس ألوان الصفوف */
.tsl-stat-ic.tsl-trk-new {
    background: #ffffff;
    border: 1px solid var(--tsl-border);
    color: var(--tsl-text);
}

.tsl-stat-ic.tsl-trk-pending {
    background: #f9e790;
    color: var(--tsl-text);
}

.tsl-stat-ic.tsl-trk-current {
    background: #82d0ee;
    color: var(--tsl-text);
}

.tsl-stat-ic.tsl-trk-start {
    background: #8ef5bc;
    color: var(--tsl-text);
}

/* خط واضح بين كل صف واللي بعده (باين على كل الألوان) */
@media (min-width: 768px) {
    .tsl-table.tsl-table-rowlines tbody td {
        border-bottom: 2px solid rgba(18, 38, 63, .32);
    }

    .tsl-table.tsl-table-rowlines tbody tr:last-child td {
        border-bottom: 0;
    }
}

/* على الموبايل: الكارت كله بلون الحالة وحدوده أوضح */
@media (max-width: 767.98px) {
    .tsl-table-cards.tsl-table-rowlines tbody tr {
        border-color: rgba(18, 38, 63, .38);
    }

    .tsl-table-cards.tsl-table-rowlines tbody td {
        border-bottom-color: rgba(18, 38, 63, .18);
    }
}

/* تابات كتير في الصفحة — بتنزل سطر جديد بدل ما تخرج برا الشاشة */
.tsl-tab-bar .tsl-tabs {
    flex-wrap: wrap;
}

.tsl-tab-bar .tsl-tab {
    white-space: nowrap;
}

/* زراير جنب التابات (مثلًا: إلغاء تعليق / إلغاء التوصيلات المعلقة) */
.tsl-tab-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-inline-start: auto;
}

.tsl-tab-bar .tsl-tab-actions .tsl-btn {
    margin-inline-start: 0;
}

@media (max-width: 767.98px) {
    .tsl-tab-actions {
        width: 100%;
    }

    .tsl-tab-bar .tsl-tabs.tsl-tabs-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .tsl-tab-actions .tsl-btn {
        flex: 1 1 auto;
    }
}

/* ===== حالة الكباتن: لون الصف (نفس ألوان الصفحة القديمة) — مشغول / غير نشط ===== */
.tsl-table tbody tr.tsl-cap-busy,
.tsl-table tbody tr.tsl-cap-busy td {
    background: #b5fbb5;
}

.tsl-table tbody tr.tsl-cap-off,
.tsl-table tbody tr.tsl-cap-off td {
    background: #dfdedc;
}

.tsl-stat-ic.tsl-cap-busy {
    background: #b5fbb5;
    color: var(--tsl-text);
}

/* أكتر من زرار في خانة الإجراء */
.tsl-row-actions {
    display: inline-flex;
    gap: 6px;
    justify-content: center;
}

/* ===== التوصيلات: لون المكتملة / الملغاة (نفس FinishColor / CancelledColor القديمة) ===== */
.tsl-table tbody tr.tsl-trk-finish,
.tsl-table tbody tr.tsl-trk-finish td {
    background: #ced0d2;
}

.tsl-table tbody tr.tsl-trk-cancel,
.tsl-table tbody tr.tsl-trk-cancel td {
    background: #f59280;
}

/* خانة «الحالة» في بيانات التوصيلة بلون حالتها */
.tsl-kv > div.tsl-trk-new {
    background: #ffffff;
}

.tsl-kv > div.tsl-trk-pending {
    background: #f9e790;
}

.tsl-kv > div.tsl-trk-current {
    background: #82d0ee;
}

.tsl-kv > div.tsl-trk-start {
    background: #8ef5bc;
}

.tsl-kv > div.tsl-trk-finish {
    background: #ced0d2;
}

.tsl-kv > div.tsl-trk-cancel {
    background: #f59280;
}

/* ===== سطر وصف تحت عنوان الصفحة ===== */
.tsl-page-sub {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tsl-faint);
}

/* محتوى ضيق في نص الصفحة (مثلًا: كود التحقق) */
.tsl-narrow {
    max-width: 640px;
    margin: 0 auto;
}

/* ===== كارت كود التحقق ===== */
.tsl-code-ticket {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid var(--tsl-border);
    border-inline-start: 6px solid #529FFF;
    border-radius: 16px;
    background: #fff;
}

.tsl-code-who {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tsl-code-ic {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #EAF3FF;
    color: #529FFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tsl-code-who b {
    display: block;
    font-size: 15px;
    color: var(--tsl-text);
}

.tsl-code-who small {
    font-size: 12px;
    font-weight: 700;
    color: var(--tsl-faint);
}

.tsl-code-val {
    border: 0;
    border-radius: 10px;
    padding: 4px 12px;
    background: #ecfdf5;
    color: #0f766e;
    font-family: 'Courier New', monospace;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 3px;
    cursor: pointer;
    transition: background .2s ease;
}

    .tsl-code-val:hover {
        background: #d1fae5;
    }

.tsl-code-hint {
    display: block;
    margin-top: 3px;
    text-align: center;
    font-size: 11px;
    color: var(--tsl-faint);
}

/* ===== زرار أخضر (تفعيل) — نفس شكل .tsl-btn-danger ===== */
.tsl-btn-success {
    color: #fff;
    background: #1E8E4A;
    box-shadow: 0 3px 0 #146B37;
}

    .tsl-btn-success:hover {
        color: #fff;
        filter: brightness(1.05);
    }

    .tsl-btn-success:disabled {
        box-shadow: none;
    }

/* ===== زرار صغير جوه خانات الجداول (عروض الكباتن) ===== */
.tsl-btn.tsl-btn-sm {
    height: 34px;
    padding: 0 12px;
    gap: 6px;
    border-radius: 10px;
    font-size: 13px;
}

/* ===== المجموع الكلي تحت جدول الصرف ===== */
.tsl-pay-total {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--tsl-green-soft);
    color: var(--tsl-green);
    font-size: 17px;
    font-weight: 700;
}

    .tsl-pay-total b {
        font-size: 20px;
    }

/* ===== سطر إرشادي صغير جنب زرار (مثلًا: اسحب الصف لإعادة الترتيب) ===== */
.tsl-inline-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tsl-faint);
}

    .tsl-inline-hint i {
        color: #9DB3C8;
    }

/* ===== مستويات الكباتن ===== */
.tsl-alerts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tsl-lvl-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.tsl-lvl-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-align: start;
}

.tsl-lvl-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.tsl-lvl-hints {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid var(--tsl-border);
    font-size: 13px;
    color: var(--tsl-muted);
}

    .tsl-lvl-hints i {
        margin-inline-end: 6px;
        color: #9DB3C8;
    }

/* اختيار لون المستوى */
.tsl-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.tsl-swatch {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #D5DBE6;
    cursor: pointer;
}

    .tsl-swatch.on {
        border: 3px solid #1B2333;
    }

.tsl-color-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--tsl-border);
}

    .tsl-color-row input[type=color] {
        width: 46px;
        height: 42px;
        padding: 0;
        border: none;
        background: none;
        cursor: pointer;
    }

    .tsl-color-row .form-control {
        max-width: 140px;
        direction: ltr;
    }

@media (max-width: 767.98px) {
    .tsl-lvl-chips {
        justify-content: flex-start;
    }
}

/* بادج المستوى (LevelBadge): المقاس واللون جايين من الداتا */
.tsl-lvl-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 50%;
    font-weight: 700;
}

    .tsl-lvl-badge img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ===== وثائق الكباتن ===== */
.tsl-badge-purple {
    background: #F1EAFE;
    color: #6B21A8;
}

.tsl-alert-purple {
    background: #F3E8FF;
    color: #4C1D95;
}

/* سطور «اسم ← قيمة» جوه كارت */
.tsl-info-rows > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--tsl-border);
    font-size: 14px;
}

    .tsl-info-rows > div:last-child {
        border-bottom: none;
    }

    .tsl-info-rows > div > span:first-child {
        color: var(--tsl-muted);
    }

    .tsl-info-rows > div > b {
        color: var(--tsl-ink);
        text-align: end;
    }

/* صور الوثيقة */
.tsl-img-panel {
    height: 100%;
    padding: 12px;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
    background: #fff;
}

    .tsl-img-panel.tsl-img-panel-new {
        border: 2px solid #529FFF;
    }

.tsl-img-panel-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--tsl-ink);
}

.tsl-doc-img,
.tsl-doc-img-empty {
    width: 100%;
    height: 240px;
    border-radius: 10px;
    background: #F1F4F9;
}

.tsl-doc-img {
    object-fit: contain;
    cursor: zoom-in;
}

.tsl-doc-img-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tsl-faint);
    font-size: 14px;
}

.tsl-doc-img-label {
    margin: 8px 0 4px;
    font-size: 13px;
    color: var(--tsl-muted);
}

/* صور صغيرة في جدول */
.tsl-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.tsl-thumb,
.tsl-thumb-empty {
    width: 86px;
    height: 58px;
    border-radius: 8px;
}

.tsl-thumb {
    object-fit: cover;
    border: 1px solid #E7F1FF;
    transition: transform .15s ease;
}

    .tsl-thumb:hover {
        transform: scale(1.08);
    }

.tsl-thumb-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F1F4F9;
    color: #ADB5BD;
}

/* أسباب الرفض السريعة */
.tsl-quick-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tsl-quick-reason {
    padding: 5px 12px;
    border: 1px solid var(--tsl-border);
    border-radius: 999px;
    background: #F8FAFC;
    color: #334155;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

    .tsl-quick-reason:hover,
    .tsl-quick-reason.on {
        border-color: #C7D2FE;
        background: #EEF2FF;
    }

.tsl-doc-dialog-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.tsl-table tbody tr.tsl-row-link {
    cursor: pointer;
}

/* =====================================================================
   صفحات الإعدادات الطويلة (إعدادات توصيلة مناطق)
   - .tsl-settings: قايمة أقسام ثابتة على اليمين + كروت الأقسام
   - على الموبايل القايمة بتبقى شريط أفقي بيتسحب فوق الكروت
   ===================================================================== */
.tsl-set-context {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.tsl-set-area {
    flex: 1 1 260px;
    max-width: 420px;
}

.tsl-hero-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 240px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid;
    border-radius: 14px;
    cursor: pointer;
}

    .tsl-hero-switch.on {
        border-color: #BFE8CF;
        background: var(--tsl-green-soft);
        color: var(--tsl-green);
    }

    .tsl-hero-switch.off {
        border-color: var(--tsl-red-border);
        background: var(--tsl-red-soft);
        color: var(--tsl-red);
    }

.tsl-hero-ic {
    width: 40px;
    height: 40px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    font-size: 17px;
}

.tsl-hero-txt {
    flex: 1;
}

    .tsl-hero-txt b {
        font-size: 15px;
    }

.tsl-settings {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.tsl-settings-nav {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
    background: #fff;
}

    .tsl-settings-nav button {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        border: 0;
        border-radius: 10px;
        background: none;
        color: var(--tsl-ink);
        font: inherit;
        font-size: 13.5px;
        font-weight: 600;
        text-align: start;
        cursor: pointer;
    }

        .tsl-settings-nav button:hover {
            background: var(--tsl-primary-soft);
            color: #2F7BE0;
        }

    .tsl-settings-nav i {
        width: 18px;
        flex: none;
        text-align: center;
        color: #529FFF;
    }

.tsl-settings-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

    .tsl-settings-body > .tsl-card {
        scroll-margin-top: 16px;
    }

.tsl-set-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--tsl-muted);
}

    .tsl-set-sub::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--tsl-border);
    }

.tsl-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tsl-set-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

/* أيام الأسبوع */
.tsl-day-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tsl-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 104px;
    padding: 10px 18px;
    border: 1.5px solid #DBE3EF;
    border-radius: 12px;
    background: #fff;
    color: var(--tsl-ink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: all .2s ease;
}

    .tsl-day:hover {
        border-color: #529FFF;
    }

    .tsl-day .fa-check {
        width: 0;
        opacity: 0;
        font-size: 12px;
    }

    .tsl-day.on {
        border-color: #529FFF;
        background: #529FFF;
        color: #fff;
        box-shadow: 0 4px 10px rgba(82, 159, 255, .3);
    }

        .tsl-day.on .fa-check {
            width: auto;
            opacity: 1;
        }

    .tsl-day.tsl-day-all {
        border-style: dashed;
    }

        .tsl-day.tsl-day-all.on {
            border-style: solid;
            border-color: var(--tsl-green);
            background: var(--tsl-green);
            box-shadow: 0 4px 10px rgba(30, 142, 74, .3);
        }

.tsl-validation {
    margin-bottom: 12px;
    padding: 10px 14px 10px 30px;
    border: 1px solid var(--tsl-red-border);
    border-radius: 12px;
    background: var(--tsl-red-soft);
    color: var(--tsl-red);
    font-size: 13px;
}

    .tsl-validation:empty {
        display: none;
    }

@media (max-width: 991.98px) {
    .tsl-settings {
        grid-template-columns: minmax(0, 1fr);
    }

    .tsl-settings-body > .tsl-card {
        scroll-margin-top: 76px;
    }

    .tsl-settings-nav {
        top: 0;
        z-index: 4;
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: none;
    }

        .tsl-settings-nav button {
            flex: none;
            white-space: nowrap;
        }
}

@media (max-width: 767.98px) {
    .tsl-toggle-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tsl-set-area,
    .tsl-hero-switch {
        flex: 1 1 100%;
        max-width: none;
    }

    .tsl-day {
        min-width: 0;
        flex: 1 1 calc(33% - 10px);
        padding: 10px;
    }
}

/* جدول صغير من غير منيو: من غير الارتفاع الأدنى بتاع .tsl-table-wrap */
.tsl-table-wrap.tsl-table-auto {
    min-height: 0;
}

/* ===== رفع ملف صوتي (Shared/SingleAudioUploader.razor) ===== */
.tsl-au {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.tsl-au-player {
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(16, 24, 40, .05);
}

.tsl-au-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tsl-au-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--tsl-primary-soft);
    color: var(--tsl-primary-deep);
    font-size: 19px;
}

.tsl-au-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.tsl-au-name {
    overflow: hidden;
    color: var(--tsl-ink);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tsl-au-sub {
    margin-top: 2px;
    color: var(--tsl-faint);
    font-size: 12.5px;
}

.tsl-au-actions {
    flex: none;
    display: flex;
    gap: 6px;
}

.tsl-au-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: var(--tsl-field);
    color: var(--tsl-text);
    text-decoration: none;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

    .tsl-au-btn.tsl-au-dl:hover {
        background: var(--tsl-primary-deep);
        color: #fff;
    }

    .tsl-au-btn.tsl-au-del:hover {
        background: var(--tsl-red);
        color: #fff;
    }

.tsl-au-audio {
    display: block;
    width: 100%;
    height: 40px;
}

.tsl-au-drop {
    position: relative;
    padding: 24px 16px;
    border: 2px dashed var(--tsl-soft-border);
    border-radius: 14px;
    background: #FBFCFD;
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
}

    .tsl-au-drop:hover {
        border-color: var(--tsl-primary);
        background: var(--tsl-selected);
    }

.tsl-au-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.tsl-au-drop-ic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--tsl-primary-soft);
    color: var(--tsl-primary-deep);
    font-size: 22px;
}

.tsl-au-drop-title {
    color: var(--tsl-ink);
    font-size: 15px;
    font-weight: 700;
}

.tsl-au-drop-sub {
    margin-top: 4px;
    color: var(--tsl-faint);
    font-size: 12.5px;
}

.tsl-au-drop.tsl-au-drop-sm {
    padding: 14px;
}

    .tsl-au-drop.tsl-au-drop-sm .tsl-au-drop-ic {
        width: 40px;
        height: 40px;
        margin-bottom: 6px;
        font-size: 16px;
    }

.tsl-au-error {
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid var(--tsl-red-border);
    border-radius: 9px;
    background: var(--tsl-red-soft);
    color: var(--tsl-red);
    font-size: 13.5px;
    text-align: center;
}

.tsl-au-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid var(--tsl-soft-border);
    border-top-color: var(--tsl-primary-deep);
    border-radius: 50%;
    animation: tsl-spin .7s linear infinite;
}

/* ===== إعدادات المناطق: تحذير أيام متغيرة ومتحفظتش ===== */
.tsl-inline-hint.tsl-inline-warn,
.tsl-inline-hint.tsl-inline-warn i {
    color: #B26A00;
}

/* ===== رسالة مكان الفورم لما مفيش إعدادات أو حصل خطأ ===== */
.tsl-set-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 16px;
    text-align: center;
    color: var(--tsl-muted);
    font-weight: 700;
}

    .tsl-set-empty i {
        font-size: 34px;
        color: #9DB3C8;
    }

    .tsl-set-empty.tsl-set-empty-err i {
        color: var(--tsl-red);
    }

/* ===== الإعدادات الرئيسية: اللوجو جنب بيانات الشركة ===== */
.tsl-set-brand {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tsl-set-logo {
    padding: 12px;
    border: 1.5px dashed var(--tsl-border);
    border-radius: 14px;
    background: #FBFCFD;
}

.tsl-label > i {
    margin-inline-end: 4px;
    color: var(--tsl-primary-deep);
}

@media (max-width: 767.98px) {
    .tsl-set-brand {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* مربع كتابة كبير جوه صفحة (مثلًا: عن التطبيق) */
textarea.form-control.tsl-textarea-lg {
    height: auto;
    min-height: 180px;
    padding: 10px 12px;
    line-height: 1.7;
    resize: vertical;
}

/* علامة حقل مطلوب جنب اسم الحقل */
.tsl-req {
    color: var(--tsl-red);
    font-weight: 800;
}

/* أيقونة جوه التاب */
.tsl-tab > i {
    margin-inline-end: 6px;
}

/* شارة مبلغ إجمالي جنب العنوان */
.tsl-count-chip.tsl-count-chip-money {
    border-color: var(--tsl-green-border);
    background: var(--tsl-green-bg);
    color: var(--tsl-green-dark);
}

    .tsl-count-chip.tsl-count-chip-money i {
        color: var(--tsl-green);
    }

/* شبكة سويتشات 3 جنب بعض (بتبقى عمود واحد على الموبايل من القاعدة اللي فوق) */
@media (min-width: 768px) {
    .tsl-toggle-grid.tsl-toggle-grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* اللوجو/الصورة جنب البيانات جوه نافذة */
.tsl-modal .tsl-set-brand {
    grid-template-columns: 180px minmax(0, 1fr);
}

@media (max-width: 767.98px) {
    .tsl-modal .tsl-set-brand {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* خلية نص طويل في جدول (الوصف): بتنزل أسطر بدل ما تطوّل الصف */
.tsl-table .tsl-desc-cell {
    min-width: 280px;
    max-width: 520px;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.8;
}

@media (max-width: 767.98px) {
    .tsl-table .tsl-desc-cell {
        min-width: 0;
        max-width: none;
    }
}

/* زرارين جنب بعض في آخر صف الفلاتر (بحث + استلام) */
.tsl-btn-row {
    display: flex;
    gap: 8px;
}

/* «تحديد الكل» في رأس الجدول */
.tsl-th-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
}

.tsl-table thead .tsl-col-check {
    width: auto;
}

/* ===== إجماليات المشرفين ===== */
.tsl-sup-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.tsl-sup-total {
    padding: 14px 16px;
    border: 1px solid var(--tsl-border);
    border-radius: 18px;
    background: #fff;
}

.tsl-sup-total-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    color: var(--tsl-ink);
    font-size: 15px;
}

    .tsl-sup-total-head i {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        background: var(--tsl-primary-soft);
        color: var(--tsl-primary-deep);
    }

.tsl-sup-total.tsl-sup-total-all {
    border-color: var(--tsl-soft-border);
    background: var(--tsl-selected);
}

.tsl-sup-total-all .tsl-sup-total-head i {
    background: var(--tsl-primary-deep);
    color: #fff;
}

.tsl-info-rows > div.tsl-sup-total-sum > b {
    color: var(--tsl-green);
    font-size: 17px;
}

@media (max-width: 767.98px) {
    .tsl-sup-totals {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* اختيار واحد من كذا (radio) بشكل أزرار جنب بعض */
.tsl-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: var(--tsl-field);
}

.tsl-seg-opt {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 8px 20px;
    border-radius: 11px;
    color: var(--tsl-label);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

    .tsl-seg-opt input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .tsl-seg-opt.on {
        background: #fff;
        color: var(--tsl-primary-deep);
        box-shadow: 0 2px 8px rgba(16, 24, 40, .08);
    }

/* سطر إضافة عنصر: اختيار + زرار إضافة */
.tsl-add-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tsl-add-row-main {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 575.98px) {
    .tsl-add-row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* كروت أرقام: 5 جنب بعض على الشاشات الكبيرة + ألوان الأيقونات */
@media (min-width: 1200px) {
    .tsl-stats.tsl-stats-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .tsl-stats.tsl-stats-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.tsl-stat-ic.tsl-ic-indigo {
    background: #ECEBFB;
    color: #4F46E5;
}

.tsl-stat-ic.tsl-ic-teal {
    background: #E2F4F1;
    color: #0D9488;
}

.tsl-stat-ic.tsl-ic-red {
    background: #FDE5EB;
    color: #E11D48;
}

.tsl-stat-ic.tsl-ic-green {
    background: #E4F5EE;
    color: #059669;
}

.tsl-stat b.tsl-pos {
    color: #059669;
}

.tsl-stat b.tsl-neg {
    color: #E11D48;
}

/* =====================================================================
   التسعيرات الإضافية — يتضاف في آخر wwwroot/css/tawsila-shell.css
   ===================================================================== */

/* شريط العمليات الجماعية (بيظهر لما تحدد مناطق) */
.tsl-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--tsl-border);
    background: var(--tsl-selected);
}

    .tsl-bulk > b {
        color: var(--tsl-primary-dark);
        font-size: 14px;
    }

    .tsl-bulk .form-control {
        width: 150px;
        max-width: 100%;
        height: 40px;
    }

    .tsl-bulk .tsl-btn {
        height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

@media (max-width: 575.98px) {
    .tsl-bulk .form-control,
    .tsl-bulk .tsl-btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

/* خانة المبلغ جوه الجدول */
.tsl-table-edit .form-control.tsl-fare-in {
    min-width: 110px;
    max-width: 150px;
}

/* شارات التسعيرة جنب اسم العنصر في الشجرة */
.tsl-node-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.tsl-node-off {
    opacity: .5;
}

@media (max-width: 767.98px) {
    .tsl-page-actions .tsl-count-chip {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .tsl-btn-danger {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }

    .tsl-btn-success {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }

    .tsl-btn-soft {
        flex: 1 1 100%;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 767.98px) {
    .tsl-tab-bar .tsl-tabs {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .tsl-tab-bar .tsl-tab {
        flex: none;
        width: 100%;
        text-align: center;
    }
}

.tsl-node-off {
    opacity: .5;
}

.tsl-ld {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    /* ظهور متأخر شوية (120ms) عشان العمليات السريعة ماتعملش وميض */
    animation: tsl-ld-in .25s ease .12s backwards;
}

.tsl-ld-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tsl-ld-scene {
    display: block;
    width: 190px;
    height: auto;
    overflow: visible;
}

/* ===== النص + النقط ===== */
.tsl-ld-text {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--tsl-label, #4B5D68);
}

.tsl-ld-dots {
    display: inline-flex;
    gap: 3px;
    margin-inline-start: 5px;
}

    .tsl-ld-dots i {
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: currentColor;
        opacity: .25;
        animation: tsl-ld-dot 1.2s ease-in-out infinite;
    }

        .tsl-ld-dots i:nth-child(2) {
            animation-delay: .2s;
        }

        .tsl-ld-dots i:nth-child(3) {
            animation-delay: .4s;
        }

/* ===== المقاسات ===== */
.tsl-ld-sm {
    padding: 10px;
}

    .tsl-ld-sm .tsl-ld-scene {
        width: 112px;
    }

    .tsl-ld-sm .tsl-ld-text {
        font-size: 12px;
    }

.tsl-ld-lg .tsl-ld-scene {
    width: 270px;
}

.tsl-ld-lg .tsl-ld-text {
    font-size: 15px;
}

/* ===== الأوضاع =====
   (افتراضي) في مكانه جوه الصفحة / الكارت
   tsl-ld-cover   : فوق الكارت أو الحاوية (الأب لازم يكون position:relative)
   tsl-ld-overlay : فوق الشاشة كلها (حفظ / استيراد / عمليات طويلة) */
.tsl-ld-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    padding: 0;
    background: rgba(255, 255, 255, .78);
    border-radius: inherit;
}

.tsl-ld-overlay {
    position: fixed;
    inset: 0;
    z-index: 1350; /* فوق النوافذ (1300) وتحت رسايل Toast (1400) */
    padding: 0;
    background: rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

    .tsl-ld-overlay .tsl-ld-box {
        padding: 22px 32px 18px;
        border-radius: 22px;
        background: #fff;
        box-shadow: 0 18px 50px rgba(18, 38, 63, .18);
    }

/* ===== حركة RideLoader ===== */
.tsl-ld-lane {
    stroke-dasharray: 8 8;
    animation: tsl-ld-lane .5s linear infinite;
}

.tsl-ld-car {
    animation: tsl-ld-drive 2.8s cubic-bezier(.5, .05, .4, .95) infinite, tsl-ld-fade 2.8s linear infinite;
}

.tsl-ld-bob {
    animation: tsl-ld-bob .32s ease-in-out infinite alternate;
}

.tsl-ld-route {
    transform-box: fill-box;
    transform-origin: 0 50%;
    animation: tsl-ld-route 2.8s cubic-bezier(.5, .05, .4, .95) infinite, tsl-ld-fade 2.8s linear infinite;
}

.tsl-ld-drop {
    transform-box: fill-box;
    transform-origin: 50% 100%;
    animation: tsl-ld-pop 2.8s ease-in-out infinite;
}

.tsl-ld-pulse {
    transform-box: fill-box;
    transform-origin: center;
    animation: tsl-ld-pulse 1.4s ease-out infinite;
}

/* ===== حركة DeliveryLoader ===== */
.tsl-ld-bike {
    animation: tsl-ld-bob .45s ease-in-out infinite alternate;
}

.tsl-ld-spin {
    transform-box: fill-box;
    transform-origin: center;
    animation: tsl-ld-spin .55s linear infinite;
}

.tsl-ld-steam {
    opacity: 0;
    animation: tsl-ld-steam 1.8s ease-out infinite;
}

    .tsl-ld-steam.s2 {
        animation-delay: .6s;
    }

    .tsl-ld-steam.s3 {
        animation-delay: 1.2s;
    }

.tsl-ld-speed {
    opacity: 0;
    animation: tsl-ld-speed .9s linear infinite;
}

    .tsl-ld-speed.sl2 {
        animation-delay: .3s;
    }

    .tsl-ld-speed.sl3 {
        animation-delay: .6s;
    }

/* ===== Keyframes ===== */
@keyframes tsl-ld-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tsl-ld-dot {
    0%, 80%, 100% {
        opacity: .25;
    }

    40% {
        opacity: 1;
    }
}

@keyframes tsl-ld-lane {
    to {
        stroke-dashoffset: -16;
    }
}

@keyframes tsl-ld-drive {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(130px);
    }
}

@keyframes tsl-ld-route {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@keyframes tsl-ld-fade {
    0% {
        opacity: 0;
    }

    8% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes tsl-ld-bob {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-1.4px);
    }
}

@keyframes tsl-ld-pop {
    0%, 82%, 100% {
        transform: scale(1);
    }

    90% {
        transform: scale(1.25);
    }
}

@keyframes tsl-ld-pulse {
    0% {
        opacity: .6;
        transform: scale(.6);
    }

    100% {
        opacity: 0;
        transform: scale(1.9);
    }
}

@keyframes tsl-ld-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes tsl-ld-steam {
    0% {
        opacity: 0;
        transform: translateY(2px);
    }

    25% {
        opacity: .85;
    }

    100% {
        opacity: 0;
        transform: translateY(-9px);
    }
}

@keyframes tsl-ld-speed {
    0% {
        opacity: 0;
        transform: translateX(14px);
    }

    30% {
        opacity: .7;
    }

    100% {
        opacity: 0;
        transform: translateX(-16px);
    }
}

/* تقليل الحركة: مشهد ثابت بدل الأنيميشن */
@media (prefers-reduced-motion: reduce) {
    .tsl-ld,
    .tsl-ld * {
        animation: none !important;
    }

    .tsl-ld-car {
        transform: translateX(65px);
    }

    .tsl-ld-route {
        transform: scaleX(.5);
    }

    .tsl-ld-steam {
        opacity: .6;
    }

    .tsl-ld-dots i {
        opacity: .6;
    }
}

/* =====================================================================
   احصائيات توصيلة (الصفحة الرئيسية): كروت الأرقام
   كل كارت بياخد لونه من كلاس لون (tsl-kpi-blue ...) اللي بيحدد --c و --c-soft
   ===================================================================== */
.tsl-kpi {
    --c: #529FFF;
    --c-soft: #EAF3FF;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 16px;
    border: 1px solid var(--tsl-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(18, 38, 63, .04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

    .tsl-kpi:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 26px rgba(18, 38, 63, .10);
        border-color: color-mix(in srgb, var(--c) 35%, var(--tsl-border));
    }

.tsl-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.tsl-kpi-start {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.tsl-kpi-chip {
    flex: none;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--c);
    background: var(--c-soft);
}

.tsl-kpi-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--tsl-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tsl-kpi-go {
    flex: none;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--c);
    background: var(--c-soft);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

    .tsl-kpi-go:hover {
        background: var(--c);
        color: #fff;
        transform: scale(1.06);
    }

/* كارت برقم واحد كبير */
.tsl-kpi-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 2px 2px;
}

.tsl-kpi-num {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--tsl-ink);
    font-variant-numeric: tabular-nums;
}

.tsl-kpi-label {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tsl-muted);
}

/* كارت بأكتر من رقم */
.tsl-kpi-list {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tsl-kpi-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 2px;
    border-bottom: 1px solid var(--tsl-divider);
}

    .tsl-kpi-line:last-child {
        border-bottom: 0;
    }

    .tsl-kpi-line span {
        font-size: 14px;
        font-weight: 600;
        color: var(--tsl-muted);
    }

    .tsl-kpi-line b {
        font-size: 18px;
        font-weight: 700;
        color: var(--tsl-ink);
        font-variant-numeric: tabular-nums;
    }

/* ألوان الكروت */
.tsl-kpi-blue {
    --c: #2563eb;
    --c-soft: #e8eefc;
}

.tsl-kpi-violet {
    --c: #7c3aed;
    --c-soft: #f2eafd;
}

.tsl-kpi-indigo {
    --c: #4f46e5;
    --c-soft: #ecebfb;
}

.tsl-kpi-green {
    --c: #059669;
    --c-soft: #e4f5ee;
}

.tsl-kpi-amber {
    --c: #d97706;
    --c-soft: #fbf0df;
}

.tsl-kpi-rose {
    --c: #e11d48;
    --c-soft: #fde5eb;
}

.tsl-kpi-cyan {
    --c: #0891b2;
    --c-soft: #e1f3f8;
}

.tsl-kpi-sky {
    --c: #0284c7;
    --c-soft: #e1f0fb;
}

.tsl-kpi-teal {
    --c: #0d9488;
    --c-soft: #e2f4f1;
}

.tsl-kpi-orange {
    --c: #ea580c;
    --c-soft: #fceadd;
}

.tsl-kpi-rust {
    --c: #c2410c;
    --c-soft: #fbe8dd;
}

.tsl-kpi-purple {
    --c: #6d28d9;
    --c-soft: #f0e9fc;
}

.tsl-kpi-grape {
    --c: #9333ea;
    --c-soft: #f3e9fd;
}

@media (max-width: 575.98px) {
    .tsl-kpi-num {
        font-size: 28px;
    }
}


/* =====================================================================
   محاسبة الكابتن: المبلغ المطلوب + من/إلى في خلية + نافذة الدفع
   ===================================================================== */
.tsl-money {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

    .tsl-money.tsl-money-pos {
        background: #E8F6EE;
        color: #11804A;
    }

    .tsl-money.tsl-money-neg {
        background: var(--tsl-red-soft);
        color: var(--tsl-red);
    }

/* من / إلى تحت بعض في خلية */
.tsl-range {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
    white-space: nowrap;
}

.tsl-range-lbl {
    margin-inline-end: 6px;
    font-weight: 700;
    color: var(--tsl-faint);
}

/* رابط المحفظة في الجدول (رقم + أيقونات في سطر واحد) */
.tsl-fin-wallet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* مربع البحث السريع فوق الجدول */
.tsl-search-box {
    max-width: 340px;
}

/* نافذة الدفع: بيانات الكابتن والفترة */
.tsl-fin-head {
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
    background: #FBFCFD;
}

.tsl-fin-captain {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--tsl-ink);
}

    .tsl-fin-captain i {
        color: #529FFF;
    }

.tsl-fin-period {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    font-size: 13.5px;
    color: var(--tsl-muted);
}

    .tsl-fin-period b {
        color: var(--tsl-ink);
    }

/* نافذة الدفع: خصم المستوى */
.tsl-fin-level {
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid #F0DDA8;
    border-radius: 14px;
    background: #FFFBF0;
}

.tsl-fin-level-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #8A6D1B;
}

.tsl-fin-level-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    font-size: 14px;
}

    .tsl-fin-level-row.tsl-fin-discount {
        font-weight: 700;
        color: #0F7B43;
    }

    .tsl-fin-level-row.tsl-fin-total {
        padding-top: 8px;
        border-top: 1px dashed #F0DDA8;
        font-weight: 700;
        color: var(--tsl-ink);
    }

@media (max-width: 767.98px) {
    .tsl-search-box {
        max-width: none;
    }
}


/* =====================================================================
   الاخبار: عدد اللايكات والتعليقات (زرار بيفتح القايمة)
   ===================================================================== */
.tsl-count-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border: 1.5px solid var(--tsl-border);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-weight: 700;
    color: var(--tsl-text);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

    .tsl-count-btn:hover {
        border-color: var(--tsl-soft-border);
        background: var(--tsl-selected);
    }

    .tsl-count-btn.tsl-count-like i {
        color: #2563EB;
    }

    .tsl-count-btn.tsl-count-comment i {
        color: #0F7B43;
    }


/* =====================================================================
   طازة: صفحة الطلبات (كلاسات خاصة بالصفحة دي بس: tsl-ord-*)
   ===================================================================== */
.tsl-page-icon.tsl-ord-icon {
    background: #1E8E4A;
    box-shadow: 0 6px 16px rgba(30, 142, 74, .3);
}

/* ===== سكشن فلاتر البحث (بيتقفل ويتفتح، والافتراضي مقفول) ===== */
.tsl-ord-filter-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
}

.tsl-ord-filter-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 420px;
    min-width: 0;
    padding: 10px 14px;
    border: 1.5px dashed #49BFEB;
    border-radius: 16px;
    background: var(--tsl-primary-soft);
    font: inherit;
    text-align: start;
    color: var(--tsl-text);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

    .tsl-ord-filter-toggle:hover {
        background: #DDF0F9;
    }

.tsl-ord-filter-open .tsl-ord-filter-toggle {
    border-style: solid;
    border-color: var(--tsl-soft-border);
    background: #fff;
}

.tsl-ord-filter-ico {
    width: 40px;
    height: 40px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #529FFF;
    color: #fff;
    font-size: 15px;
}

.tsl-ord-filter-txt {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .tsl-ord-filter-txt b {
        font-size: 15px;
        color: var(--tsl-ink);
    }

    .tsl-ord-filter-txt small {
        font-size: 12px;
        font-weight: 700;
        color: var(--tsl-primary-deep);
    }

.tsl-ord-filter-range {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-inline-start: auto;
    padding: 5px 12px;
    border: 1px solid var(--tsl-border);
    border-radius: 999px;
    background: #fff;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tsl-label);
    white-space: nowrap;
}

    .tsl-ord-filter-range i {
        color: #529FFF;
    }

.tsl-ord-filter-arrow {
    flex: none;
    color: var(--tsl-primary-deep);
    transition: transform .2s;
}

.tsl-ord-filter-open .tsl-ord-filter-arrow {
    transform: rotate(180deg);
}

.tsl-ord-head-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tsl-ord-filter-body {
    border-top: 1px solid var(--tsl-divider);
}

.tsl-ord-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

/* ===== التابات والعدد ===== */
.tsl-ord-count {
    margin-inline-start: auto;
}

/* ===== الجدول ===== */
.tsl-ord-table {
    font-size: 13px;
}

    .tsl-ord-table tbody td {
        white-space: nowrap;
    }

    .tsl-ord-table tbody tr.tsl-ord-fast td {
        background: #E3F7EA;
    }

    .tsl-ord-table tbody tr.tsl-ord-fast:hover td {
        background: #D6F2E0;
    }

.tsl-ord-num {
    font-size: 17px;
    font-weight: 800;
    color: var(--tsl-ink);
}

.tsl-ord-acts {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tsl-icon-btn.tsl-ord-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 13px;
}

    .tsl-icon-btn.tsl-ord-btn.tsl-ord-btn-ok {
        color: #1E8E4A;
        background: var(--tsl-green-bg);
        border-color: var(--tsl-green-border);
    }

    .tsl-icon-btn.tsl-ord-btn.tsl-ord-btn-money {
        color: #1E7E34;
        background: #FFF8E1;
        border-color: #F5DE9C;
    }

.tsl-ord-status {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* ألوان الحالة: نفس أسماء الكلاسات اللي بترجعها GetBadgeStatusClass، بس جوه .tsl-ord-badge بس */
.tsl-ord-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    color: #fff;
    white-space: nowrap;
    background: #6C757D;
}

    .tsl-ord-badge.order-badge-under-review {
        background: #12263F;
    }

    .tsl-ord-badge.order-badge-preparing {
        background: #F69028;
    }

    .tsl-ord-badge.order-badge-captain-confirmed {
        background: #006AE6;
    }

    .tsl-ord-badge.order-badge-captain-picking-up {
        background: #1E7E34;
    }

    .tsl-ord-badge.order-badge-out-for-delivery {
        background: #F6D900;
        color: #4A3F00;
    }

    .tsl-ord-badge.order-badge-arrived {
        background: #6AA68E;
    }

    .tsl-ord-badge.order-badge-delivered {
        background: #00693F;
    }

    .tsl-ord-badge.order-badge-cancelled {
        background: #E42855;
    }

    .tsl-ord-badge.order-badge-default {
        background: #6C757D;
    }

.tsl-mini-btn.tsl-ord-call {
    background: #EAF3FF;
    color: #2F7BE0;
    text-decoration: none;
}

    .tsl-mini-btn.tsl-ord-call:hover {
        color: #2F7BE0;
    }

/* العنوان: أيقونة على الشاشات الكبيرة، ونص العنوان على الموبايل */
.tsl-ord-addr {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.tsl-ord-addr-text {
    display: none;
}

.tsl-ord-branch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #7C3AED;
}

.tsl-ord-strike {
    text-decoration: line-through;
    color: var(--tsl-muted);
}

.tsl-ord-note {
    min-width: 180px;
    color: #C2185B;
    font-weight: 600;
}

.tsl-ord-rate {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
}

    .tsl-ord-rate i {
        color: #F5A524;
    }

.tsl-ord-more {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

@media (max-width: 767.98px) {
    .tsl-ord-filter-head {
        padding: 12px;
    }

    .tsl-ord-filter-toggle {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

    .tsl-ord-filter-txt {
        flex: 1;
    }

    .tsl-ord-filter-range {
        order: 4;
        width: 100%;
        margin-inline-start: 0;
        justify-content: center;
    }

    .tsl-ord-head-btns {
        width: 100%;
    }

        .tsl-ord-head-btns .tsl-btn,
        .tsl-ord-actions .tsl-btn {
            flex: 1 1 100%;
            width: 100%;
            justify-content: center;
        }

    .tsl-ord-count {
        margin-inline-start: 0;
        width: 100%;
        justify-content: center;
    }

    .tsl-ord-table tbody td {
        white-space: normal;
    }

    .tsl-ord-table tbody tr.tsl-ord-fast {
        background: #E3F7EA;
        border-color: #BFE8CD;
    }

        .tsl-ord-table tbody tr.tsl-ord-fast td,
        .tsl-ord-table tbody tr.tsl-ord-fast:hover td {
            background: transparent;
        }

    .tsl-ord-acts {
        flex-wrap: wrap;
    }

    .tsl-ord-addr-icon {
        display: none;
    }

    .tsl-ord-addr-text {
        display: block;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    .tsl-ord-more .tsl-btn {
        width: 100%;
        justify-content: center;
    }
}


/* =====================================================================
   توصيلة: روابط مهمة (كلاسات خاصة بالصفحة دي بس: tsl-imp-*)
   ===================================================================== */
.tsl-imp-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .tsl-imp-tools .tsl-search-box {
        flex: 1 1 260px;
    }

.tsl-imp-url {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 700;
    text-decoration: none;
    overflow-wrap: anywhere;
}

    .tsl-imp-url i {
        flex: none;
        margin-top: 4px;
        font-size: 12px;
    }

.tsl-imp-link {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

    .tsl-imp-link .tsl-mini-btn {
        flex: none;
    }

@media (max-width: 767.98px) {
    .tsl-imp-tools .tsl-count-chip {
        width: 100%;
        justify-content: center;
    }
}


/* =====================================================================
   توصيلة: طلبات الصيانة + نوافذها + تقرير الصيانة (كلاسات خاصة: tsl-mr-*)
   ===================================================================== */
.tsl-mr-count {
    margin-inline-start: auto;
}

.tsl-mr-filters {
    border-bottom: 1px solid var(--tsl-divider);
}

.tsl-mr-search {
    width: 100%;
    justify-content: center;
}

.tsl-mr-table tbody td {
    white-space: nowrap;
}

.tsl-mr-acts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tsl-mr-busy {
    cursor: default;
}

.tsl-mr-plate {
    display: inline-block;
    padding: 3px 10px;
    border: 1.5px solid #12263F;
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
    letter-spacing: .5px;
    color: #12263F;
}

.tsl-mr-cost {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 800;
    color: var(--tsl-ink);
}

    .tsl-mr-cost i {
        color: #1E8E4A;
        font-size: 13px;
    }

.tsl-icon-btn.tsl-mr-imgs {
    position: relative;
}

.tsl-mr-imgs-n {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #529FFF;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

/* ===== نافذة قطع الغيار ===== */
.tsl-mr-parts-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 12px;
}

.tsl-table-wrap.tsl-mr-parts-wrap {
    overflow: visible;
    max-height: none;
    min-height: 0;
    border: 1px solid var(--tsl-border);
    border-radius: 14px;
}

.tsl-mr-parts td {
    vertical-align: middle;
}

.tsl-mr-parts .tsl-mr-part-name {
    min-width: 240px;
}

.tsl-mr-parts .tsl-sdd-list {
    max-height: 200px;
}

.tsl-icon-btn.tsl-mr-del {
    color: #E42855;
    background: #FFF1F4;
    border-color: #F8C9D4;
}

.tsl-mr-parts-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}

.tsl-mr-total {
    margin-inline-start: auto;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--tsl-primary-soft);
    font-weight: 700;
    color: var(--tsl-label);
}

    .tsl-mr-total b {
        color: var(--tsl-ink);
        font-size: 15px;
    }

.tsl-mr-notes {
    margin-top: 16px;
}

/* ===== تقرير الصيانة ===== */
.tsl-mr-box {
    height: 100%;
}

.tsl-mr-report > .tsl-card,
.tsl-mr-report > .row {
    margin-bottom: 16px;
}

.tsl-kv.tsl-mr-kv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

    .tsl-kv.tsl-mr-kv > div.tsl-mr-kv-wide {
        grid-column: 1 / -1;
    }

@media (max-width: 767.98px) {
    .tsl-mr-count {
        margin-inline-start: 0;
        width: 100%;
        justify-content: center;
    }

    .tsl-mr-table tbody td {
        white-space: normal;
    }

    .tsl-table-wrap.tsl-mr-parts-wrap {
        border: 0;
    }

    .tsl-mr-parts .tsl-mr-part-name {
        min-width: 0;
        padding-inline-end: 52px;
    }

    .tsl-mr-parts td > .tsl-sdd,
    .tsl-mr-parts td > .form-control {
        flex: 1;
        min-width: 0;
    }

    .tsl-mr-total {
        width: 100%;
        margin-inline-start: 0;
        text-align: center;
    }

    .tsl-mr-parts-foot .tsl-btn {
        width: 100%;
        justify-content: center;
    }

    .tsl-kv.tsl-mr-kv {
        grid-template-columns: 1fr;
    }
}


/* =====================================================================
   توصيلة: جدول الزيت + نافذة الاضافة (كلاسات خاصة: tsl-co-*)
   ===================================================================== */
.tsl-co-filters {
    border-bottom: 1px solid var(--tsl-divider);
}

.tsl-co-search {
    width: 100%;
    justify-content: center;
}

.tsl-co-count {
    margin-inline-start: auto;
}

.tsl-co-odo {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    background: var(--tsl-field);
    font-weight: 800;
    letter-spacing: .3px;
    color: var(--tsl-ink);
}

    .tsl-co-odo.tsl-co-odo-next {
        background: var(--tsl-green-soft);
        color: var(--tsl-green);
    }

.tsl-co-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

@media (max-width: 767.98px) {
    .tsl-co-count {
        margin-inline-start: 0;
        width: 100%;
        justify-content: center;
    }

    .tsl-co-head .tsl-btn {
        width: 100%;
        justify-content: center;
    }
}


/* =====================================================================
   توصيلة: تسليم السيارات (لوحة الشيفت + السجل + نافذة التسليم)
   كلاسات خاصة بالصفحة دي بس: tsl-ci-*
   ===================================================================== */

/* ===== شريط اليوم والشيفت ===== */
.tsl-ci-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    padding: 0 16px 16px;
}

.tsl-ci-fld {
    min-width: 180px;
}

.tsl-ci-fld-grow {
    flex: 1 1 240px;
}

.tsl-ci-seg .tsl-seg-opt {
    gap: 6px;
    border: 0;
    background: transparent;
    font: inherit;
    font-weight: 700;
    font-size: 14px;
    height: 36px;
}

/* ===== الأرقام ===== */
.tsl-ci-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px;
}

.tsl-ci-stat {
    --c: #529FFF;
    --cs: #EAF3FF;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--tsl-border);
    border-radius: 16px;
    background: #fff;
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

    .tsl-ci-stat:hover {
        border-color: var(--tsl-soft-border);
    }

    .tsl-ci-stat.tsl-ci-on {
        border-color: var(--c);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 15%, transparent);
    }

    .tsl-ci-stat > i {
        width: 42px;
        height: 42px;
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: var(--cs);
        color: var(--c);
        font-size: 17px;
    }

    .tsl-ci-stat b {
        display: block;
        font-size: 24px;
        line-height: 1.1;
        color: var(--tsl-ink);
    }

    .tsl-ci-stat small {
        font-size: 13px;
        font-weight: 700;
        color: var(--tsl-muted);
    }

.tsl-ci-c-all {
    --c: #529FFF;
    --cs: #EAF3FF;
}

.tsl-ci-c-done {
    --c: #1E8E4A;
    --cs: #E5F6EB;
}

.tsl-ci-c-wait {
    --c: #D97706;
    --cs: #FFF4E0;
}

.tsl-ci-c-mnt {
    --c: #7C3AED;
    --cs: #F1EAFE;
}

.tsl-ci-c-oil {
    --c: #E42855;
    --cs: #FFECF1;
}

/* ===== كروت السيارات ===== */
.tsl-ci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 14px;
    padding: 16px;
}

.tsl-ci-car {
    --c: #1E8E4A;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1.5px solid var(--tsl-border);
    border-top: 5px solid var(--c);
    border-radius: 18px;
    background: #fff;
}

    .tsl-ci-car.tsl-ci-wait {
        --c: #F5A524;
        border-style: dashed;
        border-top-style: solid;
        background: #FFFCF5;
    }

    .tsl-ci-car.tsl-ci-mnt {
        --c: #7C3AED;
        background: #FBF9FF;
    }

.tsl-ci-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tsl-ci-plate {
    display: inline-block;
    padding: 3px 10px;
    border: 1.5px solid #12263F;
    border-radius: 8px;
    background: #fff;
    font-weight: 800;
    letter-spacing: .5px;
    color: #12263F;
    white-space: nowrap;
}

.tsl-ci-model {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
    color: var(--tsl-ink);
}

.tsl-ci-state {
    --c: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--c) 14%, #fff);
    color: var(--c);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.tsl-ci-car.tsl-ci-done .tsl-ci-state {
    --c: #1E8E4A;
}

.tsl-ci-car.tsl-ci-wait .tsl-ci-state {
    --c: #D97706;
}

.tsl-ci-car.tsl-ci-mnt .tsl-ci-state {
    --c: #7C3AED;
}

.tsl-ci-state.tsl-ci-state-mnt {
    --c: #7C3AED;
}

.tsl-ci-state.tsl-ci-state-oil {
    --c: #D97706;
}

.tsl-ci-state.tsl-ci-state-late {
    --c: #E42855;
}

.tsl-ci-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--tsl-text);
}

    .tsl-ci-row > i {
        width: 16px;
        text-align: center;
        color: var(--tsl-faint);
    }

    .tsl-ci-row b {
        color: var(--tsl-ink);
    }

.tsl-ci-many {
    color: #7C3AED;
    font-weight: 700;
}

.tsl-ci-stars {
    margin-inline-start: auto;
    color: #F5A524;
    font-size: 12px;
    letter-spacing: 1px;
    white-space: nowrap;
}

    .tsl-ci-stars .tsl-ci-off {
        color: #DDE3EA;
    }

.tsl-table .tsl-ci-stars {
    margin-inline-start: 0;
}

.tsl-ci-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tsl-ci-ck {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}

.tsl-ci-ok {
    background: #E5F6EB;
    color: #1E8E4A;
}

.tsl-ci-no {
    background: #FFECF1;
    color: #E42855;
}

.tsl-ci-oil {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #FFF4E0;
    color: #B45309;
    font-size: 12.5px;
    font-weight: 700;
}

    .tsl-ci-oil.tsl-ci-oil-late {
        background: #FFECF1;
        color: #C81E45;
    }

.tsl-ci-note-btn {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.tsl-ci-note {
    display: block;
    min-width: 0;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--tsl-muted);
}

.tsl-ci-car .tsl-ci-note {
    max-width: none;
}

.tsl-ci-foot {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

    .tsl-ci-foot .tsl-btn {
        flex: 1;
        height: 38px;
        font-size: 13px;
    }

        .tsl-ci-foot .tsl-btn.tsl-ci-mnt-btn {
            flex: 0 0 52px;
            color: #7C3AED;
            background: #F1EAFE;
        }

.tsl-ci-past {
    flex: 1;
    padding: 9px;
    border-radius: 12px;
    background: var(--tsl-field);
    color: var(--tsl-muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* ===== السجل ===== */
.tsl-ci-filters {
    border-top: 1px solid var(--tsl-divider);
}

.tsl-ci-search {
    width: 100%;
    justify-content: center;
}

.tsl-ci-mini {
    display: inline-flex;
    gap: 4px;
}

    .tsl-ci-mini > span {
        width: 26px;
        height: 26px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 7px;
        font-size: 11px;
    }

.tsl-ci-table tbody td {
    white-space: nowrap;
}

/* ===== نافذة التسليم ===== */
.tsl-ci-sec {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--tsl-border);
    border-radius: 16px;
    background: #FBFCFD;
}

    .tsl-ci-sec:last-child {
        margin-bottom: 0;
    }

.tsl-ci-sec-h {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 800;
    color: var(--tsl-ink);
}

.tsl-ci-n {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #529FFF;
    color: #fff;
    font-size: 13px;
}

.tsl-ci-sec-h .tsl-ci-all {
    height: 32px;
    margin-inline-start: auto;
    padding: 0 12px;
    font-size: 12.5px;
}

.tsl-ci-mnt-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    border: 1.5px dashed #C4B5FD;
    border-radius: 14px;
    background: #FBF9FF;
    cursor: pointer;
}

    .tsl-ci-mnt-switch > span:first-child {
        flex: 1;
    }

    .tsl-ci-mnt-switch b {
        display: block;
        color: #5B21B6;
    }

    .tsl-ci-mnt-switch small {
        font-weight: 600;
        color: #7C6BAA;
    }

    .tsl-ci-mnt-switch.tsl-ci-mnt-on {
        border-style: solid;
        border-color: #7C3AED;
        background: #F1EAFE;
    }

    .tsl-ci-mnt-switch .form-check-input:checked {
        background-color: #7C3AED;
        border-color: #7C3AED;
    }

.tsl-ci-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #EAF3FF;
    color: #1A5FB4;
    font-size: 13.5px;
    font-weight: 700;
}

    .tsl-ci-info > span {
        flex: 1;
        min-width: 180px;
    }

    .tsl-ci-info small {
        font-weight: 600;
        opacity: .8;
    }

    .tsl-ci-info .tsl-btn {
        height: 34px;
        padding: 0 12px;
        font-size: 12.5px;
        background: #fff;
    }

.tsl-ci-hint {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    min-height: 18px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tsl-muted);
}

    .tsl-ci-hint .tsl-spinner {
        width: 13px;
        height: 13px;
        color: #529FFF;
    }

.tsl-ci-hint-good {
    color: #1E8E4A;
}

.tsl-ci-hint-bad,
.tsl-ci-hint-warn {
    color: #E42855;
}

.tsl-ci-warn {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #FFF4E0;
    color: #B45309;
    font-size: 13px;
    font-weight: 700;
}

    .tsl-ci-warn.tsl-ci-warn-late {
        background: #FFECF1;
        color: #C81E45;
    }

.tsl-ci-checkgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: none;
}

    .tsl-ci-checkgrid .tsl-check i {
        color: var(--tsl-faint);
    }

    .tsl-ci-checkgrid .tsl-check.on i {
        color: #1E8E4A;
    }

.tsl-ci-gap {
    margin-top: 14px;
}

.tsl-ci-score {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

    .tsl-ci-score button {
        height: 54px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        border: 1.5px solid var(--tsl-border);
        border-radius: 12px;
        background: #fff;
        font: inherit;
        font-weight: 800;
        line-height: 1.2;
        color: var(--tsl-label);
        cursor: pointer;
    }

        .tsl-ci-score button small {
            font-size: 11px;
            font-weight: 700;
            color: var(--tsl-faint);
        }

        .tsl-ci-score button.tsl-ci-on {
            border-color: #529FFF;
            background: #EAF3FF;
            color: #1A6FD8;
        }

.tsl-modal textarea.form-control.tsl-ci-notes {
    min-height: 70px;
}

@media (max-width: 991.98px) {
    .tsl-ci-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .tsl-ci-bar {
        padding: 0 12px 12px;
    }

    .tsl-ci-fld {
        min-width: 0;
        flex: 1 1 100%;
    }

    .tsl-ci-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 12px;
    }

        .tsl-ci-stats .tsl-ci-stat:first-child {
            grid-column: 1 / -1;
        }

    .tsl-ci-grid {
        grid-template-columns: minmax(0, 1fr);
        padding: 12px;
    }

    .tsl-ci-checkgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tsl-ci-score button small {
        display: none;
    }

    .tsl-ci-table tbody td {
        white-space: normal;
    }

    .tsl-ci-note {
        max-width: none;
    }
}

/* ===================================================================================
   تقرير صيانة للسيارة (CarSparePartsReport) — tsl-spr-*
   =================================================================================== */
.tsl-spr-search {
    width: 100%;
    justify-content: center;
}

.tsl-spr-result {
    margin-top: 16px;
}

.tsl-spr-start {
    padding: 46px 16px;
    text-align: center;
    color: var(--tsl-muted);
}

    .tsl-spr-start i {
        display: block;
        font-size: 34px;
        color: #B8C6DA;
        margin-bottom: 10px;
    }

    .tsl-spr-start b {
        display: block;
        color: var(--tsl-ink);
        font-size: 15px;
        margin-bottom: 4px;
    }

.tsl-spr-sum {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--tsl-border);
    background: linear-gradient(180deg, #F7FAFF, #fff);
    border-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.tsl-spr-car {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 260px;
    min-width: 0;
}

.tsl-spr-car-ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #EAF3FF;
    color: #529FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: none;
}

.tsl-spr-car-txt {
    min-width: 0;
}

    .tsl-spr-car-txt > b {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        color: var(--tsl-ink);
        font-size: 15px;
    }

    .tsl-spr-car-txt small {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        margin-top: 3px;
        color: var(--tsl-muted);
        font-size: 12.5px;
        font-weight: 700;
    }

        .tsl-spr-car-txt small i {
            font-size: 11px;
            color: var(--tsl-faint);
        }

.tsl-spr-plate {
    padding: 2px 9px;
    border: 1.5px solid #12263F;
    border-radius: 7px;
    font-weight: 800;
    color: #12263F;
    background: #fff;
    font-size: 13px;
    white-space: nowrap;
}

.tsl-spr-total {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 14px;
    background: #E5F6EB;
    border: 1.5px solid #BFE6CC;
}

    .tsl-spr-total i {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: #1E8E4A;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
    }

    .tsl-spr-total small {
        display: block;
        font-size: 12.5px;
        font-weight: 700;
        color: #1E6B3C;
    }

    .tsl-spr-total b {
        font-size: 22px;
        color: #0F5530;
        line-height: 1.1;
    }

.tsl-spr-num {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--tsl-ink);
}

.tsl-spr-line {
    font-weight: 800;
    color: #0F5530;
    font-variant-numeric: tabular-nums;
}

.tsl-spr-qty {
    display: inline-block;
    min-width: 34px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #F1F4F9;
    font-weight: 800;
    text-align: center;
}

.tsl-spr-tfoot td {
    background: #F7FAFF;
    font-weight: 800;
    color: var(--tsl-ink);
    padding: 14px 16px;
    border-top: 2px solid var(--tsl-border);
}

@media (max-width: 767.98px) {
    .tsl-spr-total {
        width: 100%;
    }

    .tsl-spr-tfoot {
        display: none;
    }

    .tsl-spr-table tbody tr:not(.tsl-empty-row) {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-areas: "n n t" "p q d";
        column-gap: 10px;
        padding: 12px 14px;
    }

        .tsl-spr-table tbody tr:not(.tsl-empty-row) td {
            flex-direction: column;
            gap: 3px;
            padding: 8px 0 0;
            border-bottom: 0;
        }

            .tsl-spr-table tbody tr:not(.tsl-empty-row) td::before {
                width: auto;
                font-size: 11.5px;
                padding: 0;
            }

            .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(1) {
                grid-area: n;
                padding: 0 0 10px;
                border-bottom: 1px dashed var(--tsl-divider);
            }

                .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(1)::before {
                    display: none;
                }

                .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(1) .tsl-cell {
                    font-size: 15px;
                }

            .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(4) {
                grid-area: t;
                padding: 0 0 10px;
                border-bottom: 1px dashed var(--tsl-divider);
                align-items: flex-end;
            }

                .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(4) .tsl-spr-line {
                    font-size: 17px;
                }

            .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(2) {
                grid-area: p;
            }

            .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(3) {
                grid-area: q;
            }

            .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(5) {
                grid-area: d;
                align-items: flex-end;
            }

                .tsl-spr-table tbody tr:not(.tsl-empty-row) td:nth-child(5) .tsl-cell {
                    text-align: end;
                }
}

/* ===================================================================================
   تعديل المنتجات (EditProducts) — tsl-ep-*
   =================================================================================== */
.tsl-ep-search {
    width: 100%;
    justify-content: center;
}

.tsl-ep-result {
    margin-top: 16px;
}

.tsl-ep-start {
    padding: 46px 16px;
    text-align: center;
    color: var(--tsl-muted);
}

    .tsl-ep-start i {
        display: block;
        font-size: 34px;
        color: #B8C6DA;
        margin-bottom: 10px;
    }

    .tsl-ep-start b {
        display: block;
        color: var(--tsl-ink);
        font-size: 15px;
    }

.tsl-ep-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tsl-border);
}

.tsl-ep-find {
    position: relative;
    flex: 1 1 280px;
    max-width: 420px;
}

    .tsl-ep-find > i {
        position: absolute;
        inset-inline-start: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--tsl-faint);
        pointer-events: none;
    }

    .tsl-ep-find .form-control {
        padding-inline-start: 36px;
    }

.tsl-ep-dirty-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #FFF4E0;
    color: #9A5B00;
    font-weight: 800;
    font-size: 12.5px;
}

.tsl-ep-save-all {
    height: 38px;
}

.tsl-ep-scroll {
    overflow: auto;
    max-height: calc(100vh - 300px);
    min-height: 300px;
}

.tsl-ep-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

    .tsl-ep-table th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #529FFF;
        color: #fff;
        font-weight: 800;
        font-size: 12.5px;
        padding: 10px 8px;
        white-space: normal;
        line-height: 1.25;
        text-align: center;
        vertical-align: middle;
    }

    .tsl-ep-table td {
        padding: 8px;
        border-bottom: 1px solid var(--tsl-divider);
        background: #fff;
        vertical-align: middle;
        text-align: center;
    }

    .tsl-ep-table tbody tr:hover td {
        background: #FAFCFF;
    }

    .tsl-ep-table .tsl-ep-c-n {
        position: sticky;
        right: 0;
        z-index: 1;
        width: 42px;
        min-width: 42px;
        color: var(--tsl-muted);
        font-weight: 800;
    }

    .tsl-ep-table .tsl-ep-c-name {
        position: sticky;
        right: 42px;
        z-index: 1;
        min-width: 200px;
        box-shadow: -6px 0 8px -6px rgba(18, 38, 63, .15);
    }

    .tsl-ep-table .tsl-ep-c-shelf {
        min-width: 170px;
        text-align: start;
    }

    .tsl-ep-table .tsl-ep-c-price {
        width: 88px;
        min-width: 88px;
    }

    .tsl-ep-table .tsl-ep-c-img {
        min-width: 90px;
    }

    .tsl-ep-table .tsl-ep-c-st {
        min-width: 130px;
        max-width: 170px;
    }

    .tsl-ep-table .tsl-ep-c-sw {
        width: 82px;
        min-width: 82px;
    }

    .tsl-ep-table .tsl-ep-c-act {
        position: sticky;
        left: 0;
        z-index: 1;
        min-width: 124px;
        box-shadow: 6px 0 8px -6px rgba(18, 38, 63, .15);
    }

    .tsl-ep-table th.tsl-ep-c-n,
    .tsl-ep-table th.tsl-ep-c-name,
    .tsl-ep-table th.tsl-ep-c-act {
        z-index: 3;
    }

    .tsl-ep-table .form-control {
        height: 36px;
        padding: 4px 10px;
        font-size: 13px;
        border-radius: 10px;
    }

    .tsl-ep-table .tsl-ep-c-price .form-control {
        text-align: center;
        padding: 4px 6px;
    }

    .tsl-ep-table .form-control:disabled {
        background: #F3F5F9;
        color: var(--tsl-muted);
    }

    .tsl-ep-table .tsl-empty {
        position: static;
        text-align: center;
    }

.tsl-ep-sw {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    font-weight: 700;
    color: var(--tsl-ink);
    font-size: 12.5px;
    cursor: pointer;
}

    .tsl-ep-sw .form-check-input {
        float: none;
        margin: 0;
        width: 2.3em;
        height: 1.25em;
        cursor: pointer;
    }

        .tsl-ep-sw .form-check-input:checked {
            background-color: #1E8E4A;
            border-color: #1E8E4A;
        }

        .tsl-ep-sw .form-check-input:disabled {
            cursor: not-allowed;
        }

.tsl-ep-reopen {
    display: block;
    margin-top: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: #B26A00;
    line-height: 1.35;
}

.tsl-ep-save {
    height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px solid var(--tsl-border);
    background: #fff;
    color: var(--tsl-muted);
    white-space: nowrap;
}

    .tsl-ep-save:hover:not(:disabled) {
        border-color: #529FFF;
        color: #2F6FC9;
    }

    .tsl-ep-save:disabled {
        opacity: .7;
    }

.tsl-ep-table tr.tsl-ep-dirty td {
    background: #FFFBF2;
}

    .tsl-ep-table tr.tsl-ep-dirty td.tsl-ep-c-n {
        box-shadow: inset -4px 0 0 #F0A020;
    }

.tsl-ep-table tr.tsl-ep-dirty .tsl-ep-save {
    background: #529FFF;
    border-color: #529FFF;
    color: #fff;
    box-shadow: 0 3px 0 #3A84E6;
}

@media (max-width: 767.98px) {
    .tsl-ep-scroll {
        max-height: none;
        min-height: 0;
        overflow: visible;
    }

    .tsl-ep-find {
        max-width: none;
    }

    .tsl-ep-table,
    .tsl-ep-table tbody {
        display: block;
        width: 100%;
    }

        .tsl-ep-table thead {
            display: none;
        }

        .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) {
            display: grid;
            grid-template-columns: 1fr 1fr;
            column-gap: 10px;
            row-gap: 8px;
            margin: 12px;
            padding: 12px;
            border: 1px solid var(--tsl-border);
            border-radius: 14px;
            background: #fff;
        }

        .tsl-ep-table tbody tr.tsl-ep-empty-row,
        .tsl-ep-table tbody tr.tsl-ep-empty-row td {
            display: block;
        }

        .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td {
            position: static;
            display: block;
            border: 0;
            text-align: start;
            padding: 0;
            box-shadow: none;
            background: transparent;
            min-width: 0;
            max-width: none;
            width: auto;
        }

            .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td[data-label]::before {
                content: attr(data-label);
                display: block;
                font-size: 11.5px;
                color: var(--tsl-muted);
                font-weight: 700;
                margin-bottom: 3px;
            }

            .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-n {
                display: none;
            }

            .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-name,
            .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-shelf,
            .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-act {
                grid-column: 1 / -1;
            }

                .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-name::before {
                    display: none;
                }

                .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-name .form-control {
                    font-weight: 800;
                    font-size: 14.5px;
                }

            .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-img,
            .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-st,
            .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-sw {
                grid-column: 1 / -1;
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                justify-content: space-between;
                gap: 6px;
                border-top: 1px dashed var(--tsl-divider);
                padding-top: 8px;
            }

                .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-img::before,
                .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-st::before,
                .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-sw::before {
                    margin: 0;
                    font-size: 12.5px;
                    color: var(--tsl-ink);
                }

                .tsl-ep-table tbody tr:not(.tsl-ep-empty-row) td.tsl-ep-c-st .tsl-ep-reopen {
                    flex-basis: 100%;
                }

        .tsl-ep-table tbody tr.tsl-ep-dirty {
            border-color: #F0A020;
            background: #FFFBF2;
        }

    .tsl-ep-save {
        width: 100%;
        margin-top: 4px;
    }
}
