/* WStudio Salon System — core styles (RTL-first) */

:root {
    --sidebar-width: 240px;
    --sidebar-bg: #1f2937;
    --sidebar-color: #d1d5db;
    --sidebar-active: #111827;
    --topbar-height: 56px;
    --primary: #0d6efd;
}

html,
body {
    background-color: #f3f4f6;
    font-family: var(--app-font, "Cairo"), "Segoe UI", Tahoma, Arial, sans-serif !important;
}

/* إلغاء ::after بتاع Bootstrap clearfix عالمياً — بيعمل عناصر وهمية جوه الكروت والفلكس
   (الـ page-title ليه قاعدة خاصة بترجّعه لأنه محتاجه للـ floats) */
.clearfix::after {
    display: none;
    content: none;
}

/* select2 لا ينكمش أبداً (مودالات) */
.select2-container {
    min-width: 120px;
    width: 100% !important;
}
.select2-container .select2-selection--single {
    height: 35px;
}
body,
.btn,
.form-control,
.form-select,
.dropdown-menu,
table,
input,
select,
textarea,
.modal,
.toast,
.select2-container {
    font-family: var(--app-font, "Cairo"), "Segoe UI", Tahoma, Arial, sans-serif !important;
}

/* اللون الأساسي المخصص من الإعدادات */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: color-mix(in srgb, var(--primary) 85%, #000);
    border-color: color-mix(in srgb, var(--primary) 85%, #000);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.nav-pills .nav-link.active {
    background-color: var(--primary);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.page-item.active .page-link {
    background-color: var(--primary);
    border-color: var(--primary);
}

a {
    color: var(--primary);
}

.icon-16 {
    width: 16px;
    height: 16px;
}

.icon-48 {
    width: 48px;
    height: 48px;
}

.w100 {
    width: 100px;
}

.w150 {
    width: 150px;
}

.w200 {
    width: 200px;
}

/* layout */
.app-container {
    display: flex;
    min-height: 100vh;
    overflow: hidden;

}

.main-panel {
    flex: 1;
    min-width: 0;
}

.page-content-wrapper {
    padding: 1rem;
}

/* ===================== sidebar (نمط CRM: مجموعات + وضع أيقونات + موبايل) ===================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-color);
    flex-shrink: 0;
    min-height: 100vh;
    transition: width 0.2s ease;
    display: flex;
    flex-direction: column;
}

.sidebar-scroll {
    overflow-y: auto;
    overflow-x: visible;
    flex: 1;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    padding: 0.75rem 1rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-logo-mini,
.brand-text-mini {
    display: none;
}

.sidebar-menu {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.sidebar-menu li {
    position: relative;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 1.1rem;
    color: var(--sidebar-color);
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
    font-size: 0.92rem;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-menu > li.active > a {
    background: var(--sidebar-active);
    color: #fff;
    border-inline-start: 3px solid var(--primary);
}

.sidebar-menu .menu-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* القوائم الفرعية */
.submenu-caret {
    transition: transform 0.2s;
    opacity: 0.6;
}

.sidebar-menu > li.open > a .submenu-caret {
    transform: rotate(180deg);
}

.sidebar-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    background: rgba(0, 0, 0, 0.18);
}

.sidebar-menu > li.open > .sidebar-submenu {
    max-height: 400px;
}

.sidebar-submenu li a {
    padding: 0.55rem 1.1rem 0.55rem;
    padding-inline-start: 2.4rem;
    font-size: 0.85rem;
}

.sidebar-submenu li.active a {
    color: #fff;
    border-inline-start: 3px solid var(--primary);
    background: rgba(255, 255, 255, 0.04);
}

/* ===== وضع الأيقونات فقط (mini) ===== */
body.sidebar-mini .sidebar {
    width: 68px;
}

body.sidebar-mini .sidebar .menu-text,
body.sidebar-mini .sidebar .submenu-caret,
body.sidebar-mini .sidebar-logo,
body.sidebar-mini .sidebar .brand-text {
    display: none;
}

body.sidebar-mini .sidebar-logo-mini {
    display: block;
    max-height: 34px;
    max-width: 40px;
}

body.sidebar-mini .brand-text-mini {
    display: block;
}

body.sidebar-mini .sidebar-menu li a {
    justify-content: center;
    padding: 0.8rem 0;
}

body.sidebar-mini .sidebar-scroll {
    overflow: visible;
}

/* flyout: القائمة الفرعية بتطلع جنب الأيقونة عند الوقوف عليها */
body.sidebar-mini .sidebar-menu > li > .sidebar-submenu {
    position: absolute;
    top: 0;
    inset-inline-start: 68px;
    width: 200px;
    max-height: none;
    display: none;
    background: var(--sidebar-bg);
    border-radius: 0 6px 6px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

body.sidebar-mini .sidebar-menu > li:hover > .sidebar-submenu {
    display: block;
}

body.sidebar-mini .sidebar-menu > li:hover > a {
    background: var(--sidebar-active);
    color: #fff;
}

body.sidebar-mini .sidebar-submenu li a {
    justify-content: flex-start;
    padding: 0.6rem 1rem;
}

body.sidebar-mini .sidebar-submenu .menu-text {
    display: block !important;
}

/* ===== موبايل/تاب: أوف-كانفس ===== */
.sidebar-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        inset-inline-start: 0;
        z-index: 1045;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        width: var(--sidebar-width) !important;
    }

    [dir="ltr"] .sidebar {
        transform: translateX(-100%);
    }

    body.sidebar-open .sidebar {
        transform: none;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1040;
    }

    /* وضع mini ملغي على الموبايل */
    body.sidebar-mini .sidebar .menu-text,
    body.sidebar-mini .sidebar .submenu-caret,
    body.sidebar-mini .sidebar-logo {
        display: initial;
    }

    body.sidebar-mini .sidebar-logo-mini,
    body.sidebar-mini .brand-text-mini {
        display: none;
    }

    body.sidebar-mini .sidebar-menu li a {
        justify-content: flex-start;
        padding: 0.7rem 1.1rem;
    }
}

/* topbar */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 1rem;
}

.sidebar-toggle-btn {
    color: #374151;
    display: inline-flex;
    align-items: center;
}

.user-dropdown-toggle {
    color: #374151;
    text-decoration: none;
}

/* cards — فلات: بدون بوردر وبدون شادو */
.card {
    border: none;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: none;
}

/* نمط CRM: float + clearfix — الأزرار أقصى اليمين والعنوان في الطرف الآخر */
.page-title {
    display: block;
    padding: 15px;
    border-bottom: 1px solid #f1f1f5;
}

.page-title::after {
    display: block !important;
    clear: both;
    content: "" !important;
}

.page-title h4 {
    float: left;
    line-height: 35px;
}

.title-button-group {
    float: right;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ريسبونسف: الهيدر بيترص عمودي على الموبايل */
@media (max-width: 767.98px) {
    .page-title h4 {
        float: none;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    .title-button-group {
        float: none;
        justify-content: flex-start;
    }

    .page-content-wrapper {
        padding: 0.6rem;
    }

    .table-responsive {
        padding: 0.25rem 8px 8px;
    }

    table.dataTable thead th,
    .table thead th {
        padding: 10px 8px !important;
        font-size: 12.5px;
    }

    table.dataTable tbody td,
    .table tbody td {
        padding: 9px 8px !important;
        font-size: 13px;
    }

    .profile-stats {
        width: 100%;
        justify-content: space-between;
    }

    .notifications-dropdown {
        width: 280px;
    }
}

/* profile pages */
.profile-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.topbar-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.profile-header-card .card-body {
    padding: 22px;
}

.avatar-upload-btn {
    position: absolute;
    bottom: -4px;
    inset-inline-end: -4px;
    background: var(--primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0;
}

.profile-stats > div {
    min-width: 90px;
}

.profile-info-table td {
    padding: 10px 18px 10px 10px !important;
}

.profile-info-table td.text-muted {
    min-width: 160px;
}

.page-title h4 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #4e5e6a;
}

[data-bs-theme="dark"] .page-title h4 {
    color: #d5dae8;
}

.btn {
    font-size: 14px;
}

.btn-default {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #4e5e6a;
}

.btn-default:hover {
    background: #f9fafb;
    border-color: var(--primary);
    color: var(--primary);
}

.title-button-group .btn {
    padding: 6px 14px;
}

/* forms — نمط CRM: ارتفاع 35px */
.form-control:not(textarea),
.form-select {
    min-height: 35px;
    font-size: 14px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.15rem color-mix(in srgb, var(--primary) 20%, transparent);
}

.col-form-label,
.form-label {
    font-size: 14px;
    color: #4e5e6a;
    font-weight: 600;
}

[data-bs-theme="dark"] .col-form-label,
[data-bs-theme="dark"] .form-label {
    color: #d5dae8;
}

/* tables — نمط CRM: هيدر 15px بلون #4e5e6a + hover */
.table-responsive {
    padding: 0.5rem 15px 15px;
}

table.dataTable {
    width: 100% !important;
    border-collapse: collapse !important;
}

table.dataTable thead th,
.table thead th {
    border-top: 1px solid #f1f1f5;
    border-bottom: 1px solid #f1f1f5 !important;
    padding: 15px 24px !important;
    font-weight: 700;
    font-size: 13.5px;
    white-space: nowrap;
}

/* العربي RTL: عناوين الأعمدة على اليمين */
html[dir="rtl"] table.dataTable thead th,
html[dir="rtl"] .table thead th,
html[dir="rtl"] table.dataTable thead tr th,
html[dir="rtl"] .table thead tr th {
    text-align: right;
}

/* الأعمدة المتوسطة (أدوات/أيقونات) تفضل في النص */
html[dir="rtl"] table.dataTable thead th.text-center,
html[dir="rtl"] .table thead th.text-center {
    text-align: center !important;
}

table.dataTable tbody td,
.table tbody td {
    padding: 12px 10px !important;
    border-bottom: 1px solid #f7f7fa;
    vertical-align: middle;
    font-size: 14px;
}

/* صفوف مخططة (زي الـ CRM) */
table.dataTable tbody tr:nth-child(even) td {
    background: #fafafb;
}

[data-bs-theme="dark"] table.dataTable tbody tr:nth-child(even) td {
    background: #1a1e2a !important;
}

table.dataTable:not(.js-selection-mode) tbody tr:hover td {
    background: #f4f5f7 !important;
}

/* صور داخل صفوف الجداول */
.row-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-inline-end: 8px;
}

.row-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--primary) 85%, #000);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}

[data-bs-theme="dark"] table.dataTable:not(.js-selection-mode) tbody tr:hover td {
    background: #232735 !important;
}

[data-bs-theme="dark"] table.dataTable tbody td,
[data-bs-theme="dark"] .table tbody td {
    border-bottom-color: #2a3040;
}

.dataTables_filter {
    padding: 0.5rem 0;
}

.dataTables_filter input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 12px;
    min-height: 35px;
    outline: none;
}

.dataTables_filter input:focus {
    border-color: var(--primary);
}

.dataTables_info {
    font-size: 13px;
    color: #9ca3af;
}

td.option a {
    margin: 0 4px;
    color: #6b7280;
}

td.option a:hover {
    color: var(--primary);
}

td.option a.delete:hover {
    color: #dc3545;
}

/* badges — نمط CRM */
.badge {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
}

/* modals */
.modal-content {
    border: none;
    border-radius: 8px;
}

.modal-header {
    padding: 14px 20px;
     justify-content: space-between;
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #4e5e6a;
}

[data-bs-theme="dark"] .modal-title {
    color: #d5dae8;
}

.modal-footer {
    padding: 12px 20px;
}

/* dashboard */
.dashboard-stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

/* settings tabs */
.settings-tabs-card .settings-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    background: #f9fafb;
}

.settings-tabs-card .list-group-item.active {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* signin */
.signin-page {
    background: #f3f4f6;
}

.signin-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.signin-card {
    width: 100%;
    max-width: 400px;
}

/* forms */
.validation-error {
    display: block;
    margin-top: 0.25rem;
}

.working-hours-table input[type="time"] {
    max-width: 130px;
}

/* modal rtl fixes */
.modal-header .btn-close {
    margin: 0;
}

/* booking calendar — تقويم بأعمدة الحلاقين */
.booking-calendar-wrapper {
    overflow-x: auto;
    padding: 0 1rem 1rem;
}

.booking-calendar {
    min-width: 600px;
}

.calendar-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
}

.calendar-head-cell {
    padding: 0.5rem;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
}

.calendar-time-col {
    width: 70px;
    flex-shrink: 0;
    position: relative;
    border-inline-end: 1px solid #e5e7eb;
}

.calendar-time-cell {
    font-size: 0.72rem;
    color: #6b7280;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.calendar-staff-col {
    flex: 1;
    min-width: 140px;
    position: relative;
    border-inline-end: 1px solid #f0f0f0;
}

.calendar-slot-area {
    cursor: pointer;
}

.calendar-slot-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid #f3f4f6;
    pointer-events: none;
}

.calendar-event {
    position: absolute;
    left: 3px;
    right: 3px;
    border-radius: 6px;
    color: #fff;
    padding: 2px 6px;
    font-size: 0.72rem;
    overflow: hidden;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.calendar-event:hover {
    filter: brightness(1.1);
}

/* pos */
#pos-items-table .form-select-sm,
#pos-items-table .form-control-sm {
    min-width: 80px;
}

/* sidebar logo + theme toggle */
.sidebar-logo {
    max-height: 42px;
    max-width: 180px;
}

.theme-toggle-btn {
    color: #6b7280;
    display: inline-flex;
    align-items: center;
}

.theme-toggle-btn:hover {
    color: var(--primary);
}

/* ============ تحذيرات النظام (appConfirm) — منتصف الشاشة بأنيميشن ============ */
.app-confirm-modal .modal-dialog {
    max-width: 380px;
}

.app-confirm-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    padding-top: 8px;
}

/* أنيميشن دخول: تكبير خفيف مع صعود */
.app-confirm-modal.fade .modal-dialog {
    transform: scale(0.9) translateY(14px);
    opacity: 0;
    transition: transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.18s ease;
}

.app-confirm-modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.app-confirm-modal .modal-body {
    padding: 22px 24px 6px;
}

.app-confirm-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: appConfirmPop 0.35s cubic-bezier(0.34, 1.5, 0.64, 1) both;
}

.app-confirm-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 2.2;
}

@keyframes appConfirmPop {
    0% { transform: scale(0.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.app-confirm-title {
    font-weight: 800;
    margin-bottom: 6px;
    color: #1f2937;
}

.app-confirm-message {
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.8;
    /* الرسالة بتتحط بـ .text() — لازم نحترم أسطر \n عشان القوايم (زي الحجوزات القادمة) تبان سطر سطر */
    white-space: pre-line;
}

.app-confirm-footer {
    border-top: none;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px 22px;
}

.app-confirm-footer .btn {
    min-width: 108px;
    border-radius: 10px;
    font-weight: 700;
    padding: 8px 18px;
}

/* ألوان حسب نوع التحذير */
.app-confirm-content.type-danger .app-confirm-icon { background: #fee2e2; color: #dc3545; }
.app-confirm-content.type-warning .app-confirm-icon { background: #fff4e0; color: #f0a020; }
.app-confirm-content.type-primary .app-confirm-icon { background: color-mix(in srgb, var(--primary) 15%, #fff); color: var(--primary); }
.app-confirm-content.type-success .app-confirm-icon { background: #dcfce7; color: #16a34a; }
.app-confirm-content.type-info .app-confirm-icon { background: #e0f2fe; color: #0ea5e9; }

/* دارك مود */
[data-bs-theme="dark"] .app-confirm-content {
    background: #1e222e;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .app-confirm-title {
    color: #e9edf7;
}

[data-bs-theme="dark"] .app-confirm-message {
    color: #98a2b8;
}

[data-bs-theme="dark"] .app-confirm-content.type-danger .app-confirm-icon { background: rgba(220, 53, 69, 0.16); color: #ff6b7a; }
[data-bs-theme="dark"] .app-confirm-content.type-warning .app-confirm-icon { background: rgba(240, 160, 32, 0.16); color: #ffc059; }
[data-bs-theme="dark"] .app-confirm-content.type-primary .app-confirm-icon { background: color-mix(in srgb, var(--primary) 22%, #1e222e); color: var(--primary); }
[data-bs-theme="dark"] .app-confirm-content.type-success .app-confirm-icon { background: rgba(22, 163, 74, 0.18); color: #4ade80; }
[data-bs-theme="dark"] .app-confirm-content.type-info .app-confirm-icon { background: rgba(14, 165, 233, 0.18); color: #38bdf8; }

/* مبدّل اللغة في الشريط العلوي */
.topbar-lang-btn {
    color: #6b7280;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
}

.topbar-lang-btn:hover {
    color: var(--primary);
}

.topbar-lang-btn::after {
    display: none;
}

.topbar-lang-code {
    min-width: 18px;
    text-align: center;
}

[data-bs-theme="dark"] .topbar-lang-btn {
    color: #8790a8;
}

[data-bs-theme="dark"] .topbar-lang-btn:hover {
    color: var(--primary);
}

/* notifications bell */
.notification-bell {
    color: #6b7280;
    display: inline-flex;
    align-items: center;
}

.notification-bell:hover {
    color: var(--primary);
}

.notification-count-badge {
    position: absolute;
    top: -8px;
    inset-inline-end: -10px;
    font-size: 0.6rem;
}

.notifications-dropdown {
    width: 320px;
    max-width: 90vw;
}

.notifications-list {
    max-height: 360px;
    overflow-y: auto;
}

.notification-item {
    color: inherit;
    border-bottom: 1px solid rgba(128, 128, 128, 0.12);
}

.notification-item:hover {
    background: rgba(128, 128, 128, 0.08);
}

.notification-item.unread {
    border-inline-start: 3px solid var(--primary);
    background: rgba(13, 110, 253, 0.05);
}

[data-bs-theme="dark"] .notification-bell {
    color: #b6bdd1;
}

/* ===================== الوضع الداكن (نمط CRM الشامل) ===================== */
[data-bs-theme="dark"] {
    --bs-body-bg: #171a23;
    --bs-body-color: #b6bdd1;
    --bs-emphasis-color: #e8ebf5;
    --bs-secondary-color: #8790a8;
    --bs-tertiary-bg: #232735;
    --bs-border-color: #323a4e;
    --bs-card-bg: #1e222e;
    --sidebar-bg: #14161f;
}

[data-bs-theme="dark"] body {
    background-color: #171a23 !important;
    color: #b6bdd1 !important;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] .col-form-label,
[data-bs-theme="dark"] .form-label {
    color: #d5dae8;
}

[data-bs-theme="dark"] a:not(.btn):not(.badge):hover {
    color: #fff;
}

/* topbar */
[data-bs-theme="dark"] .topbar {
    background: #1e222e;
    border-bottom-color: #323a4e;
}

[data-bs-theme="dark"] .sidebar-toggle-btn,
[data-bs-theme="dark"] .user-dropdown-toggle,
[data-bs-theme="dark"] .theme-toggle-btn {
    color: #b6bdd1;
}

/* cards & titles */
[data-bs-theme="dark"] .card {
    background-color: #1e222e !important;
    color: #b6bdd1;
    box-shadow: none;
}

[data-bs-theme="dark"] .card.border,
[data-bs-theme="dark"] .card .border {
    border-color: #323a4e !important;
}

[data-bs-theme="dark"] .page-title {
    border-bottom-color: #323a4e;
}

[data-bs-theme="dark"] .card.bg-light,
[data-bs-theme="dark"] .alert-light {
    background-color: #232735 !important;
    color: #b6bdd1 !important;
    border-color: #323a4e !important;
}

/* buttons */
[data-bs-theme="dark"] .btn-default {
    background: #2a2f3f;
    border-color: #3d4557;
    color: #d5dae8;
}

[data-bs-theme="dark"] .btn-default:hover {
    background: #343b4e;
    color: #fff;
}

/* tables & datatables */
[data-bs-theme="dark"] table.dataTable,
[data-bs-theme="dark"] .table {
    color: #b6bdd1 !important;
    border-color: #323a4e;
}

[data-bs-theme="dark"] table.dataTable tbody tr,
[data-bs-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent !important;
    color: #b6bdd1 !important;
    border-color: #2a3040 !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] table.dataTable tbody tr:hover td {
    background-color: #232735 !important;
}

[data-bs-theme="dark"] table.dataTable thead th,
[data-bs-theme="dark"] .table thead th {
    color: #d5dae8 !important;
    border-color: #323a4e !important;
    background-color: transparent !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_processing,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    color: #8790a8 !important;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background-color: #232735;
    border: 1px solid #3d4557;
    color: #d5dae8;
}

[data-bs-theme="dark"] .page-link {
    background-color: #232735;
    border-color: #3d4557;
    color: #b6bdd1;
}

/* forms */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #232735;
    border-color: #3d4557;
    color: #d5dae8;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #232735;
    color: #fff;
    border-color: var(--primary);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #6b7488;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #2a2f3f;
    border-color: #3d4557;
    color: #b6bdd1;
}

/* modals & dropdowns */
[data-bs-theme="dark"] .modal-content {
    background-color: #1e222e;
    color: #b6bdd1;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .modal-footer {
    border-color: #323a4e;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #232735;
    border-color: #3d4557;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #b6bdd1;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #2a2f3f;
    color: #fff;
}

/* nav tabs & pills */
[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: #323a4e;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #8790a8;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #1e222e;
    border-color: #323a4e #323a4e #1e222e;
    color: #fff;
}

/* settings tabs */
[data-bs-theme="dark"] .settings-tabs-card .settings-group-title {
    background: #171a23;
    color: #8790a8;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: #1e222e;
    border-color: #2a3040;
    color: #b6bdd1;
}

[data-bs-theme="dark"] .list-group-item-action:hover {
    background-color: #232735;
    color: #fff;
}

[data-bs-theme="dark"] .list-group-item.active {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* signin */
[data-bs-theme="dark"] .signin-page {
    background: #171a23;
}

/* calendar */
[data-bs-theme="dark"] .calendar-header {
    background: #1e222e;
}

[data-bs-theme="dark"] .calendar-head-cell {
    border-bottom-color: #323a4e;
    color: #d5dae8;
}

[data-bs-theme="dark"] .calendar-time-col {
    border-inline-end-color: #323a4e;
}

[data-bs-theme="dark"] .calendar-time-cell {
    color: #6b7488;
    border-top-color: #232735;
}

[data-bs-theme="dark"] .calendar-staff-col {
    border-inline-end-color: #232735;
}

[data-bs-theme="dark"] .calendar-slot-line {
    border-top-color: #232735;
}

/* options */
[data-bs-theme="dark"] td.option a {
    color: #8790a8;
}

[data-bs-theme="dark"] td.option a:hover {
    color: var(--primary);
}

/* select2 */
[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #232735;
    border-color: #3d4557;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #d5dae8;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #2a2f3f;
    border-color: #3d4557;
    color: #d5dae8;
}

[data-bs-theme="dark"] .select2-dropdown {
    background-color: #232735;
    border-color: #3d4557;
    color: #d5dae8;
}

[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #171a23;
    border-color: #3d4557;
    color: #d5dae8;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--primary);
}

/* misc */
[data-bs-theme="dark"] .text-muted {
    color: #8790a8 !important;
}

[data-bs-theme="dark"] code {
    color: #e685b5;
}

[data-bs-theme="dark"] .toast {
    border: 1px solid #323a4e;
}
.text-muted {
    color: rgb(165 165 165) !important;
}

/* =========================================================
   اشتراكات الباقات — كلاسات مشتركة بين شاشة الاشتراكات
   وبروفايل العميل وتقرير الباقات. الأرقام والتواريخ لازم LTR
   جوه صفحة RTL عشان مايتقلبوش.
   ========================================================= */

.subs-ltr {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}

/* كود الاشتراك: شريحة مونوسبيس الموظف يقراها بصوت عالي */
.subs-code-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    letter-spacing: .06em;
    background: rgba(78, 121, 247, .12);
    color: var(--primary);
    border: 1px dashed rgba(78, 121, 247, .45);
    border-radius: .5rem;
    padding: .18rem .55rem;
    cursor: pointer;
}

.subs-code-chip:hover {
    background: rgba(78, 121, 247, .2);
}

.subs-code-chip.subs-code-lg {
    font-size: 1.35rem;
    padding: .35rem .85rem;
    letter-spacing: .12em;
}

/* شريط استهلاك الزيارات */
.subs-progress {
    height: 10px;
    border-radius: 50rem;
    background: rgba(0, 0, 0, .07);
    overflow: hidden;
}

.subs-progress > span {
    display: block;
    height: 100%;
    border-radius: 50rem;
    background: var(--primary);
}

.subs-progress.subs-progress-danger > span {
    background: #dc3545;
}

.subs-progress.subs-progress-warning > span {
    background: #f59e0b;
}

/* مربعات الأرقام (مستهلك / متبقي / تاريخ الانتهاء / أيام متبقية) */
.subs-stat-tile {
    border: 1px solid #e5e7eb;
    border-radius: .6rem;
    padding: .55rem .7rem;
    text-align: center;
    height: 100%;
}

.subs-stat-tile .subs-stat-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    direction: ltr;
    unicode-bidi: isolate;
}

.subs-stat-tile .subs-stat-label {
    font-size: .72rem;
}

.subs-stat-tile.subs-tile-danger {
    border-color: rgba(220, 53, 69, .5);
    background: rgba(220, 53, 69, .07);
}

.subs-stat-tile.subs-tile-danger .subs-stat-value {
    color: #dc3545;
}

.subs-stat-tile.subs-tile-warning {
    border-color: rgba(245, 158, 11, .55);
    background: rgba(245, 158, 11, .08);
}

.subs-stat-tile.subs-tile-warning .subs-stat-value {
    color: #b45309;
}

/* شرائح الخدمات المشمولة */
.subs-service-chip {
    display: inline-block;
    padding: .15rem .55rem;
    margin: 0 0 .3rem;
    border-radius: 50rem;
    font-size: .76rem;
    background: rgba(0, 0, 0, .05);
}

/* كارت الاشتراك (بروفايل العميل / التقارير) */
.subs-card {
    border: 1px solid #e5e7eb;
    border-radius: .7rem;
    padding: .8rem;
    height: 100%;
}

.subs-card .subs-card-title {
    font-weight: 700;
    margin-bottom: .15rem;
}

/* الوضع الداكن */
[data-bs-theme="dark"] .subs-stat-tile,
[data-bs-theme="dark"] .subs-card {
    border-color: #323a4e;
}

[data-bs-theme="dark"] .subs-progress {
    background: rgba(255, 255, 255, .12);
}

[data-bs-theme="dark"] .subs-service-chip {
    background: rgba(255, 255, 255, .09);
}

[data-bs-theme="dark"] .subs-code-chip {
    background: rgba(78, 121, 247, .22);
    border-color: rgba(120, 155, 255, .5);
    color: #a5bcff;
}

/* ============================================================
   شاشة المتخصص (my_work) — موبايل أولاً: أهداف لمس كبيرة وخط واضح
   ============================================================ */

.mw-page {
    max-width: 640px;
    margin: 0 auto;
}

.mw-empty-card .mw-empty-icon {
    color: #9ca3af;
}

.mw-head-card {
    border-radius: .8rem;
}

.mw-head-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.mw-head-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(78, 121, 247, .14);
    color: var(--primary);
    font-weight: 800;
    font-size: 1.2rem;
}

.mw-head-name {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mw-head-sub {
    font-size: .8rem;
}

.mw-refresh-btn.is-spinning i,
#sb-refresh.is-spinning i {
    animation: mw-spin 1s linear infinite;
}

@keyframes mw-spin {
    to { transform: rotate(360deg); }
}

.mw-progress-label {
    font-size: .82rem;
    font-weight: 600;
}

.mw-progress-count {
    font-size: .82rem;
    font-weight: 700;
    direction: ltr;
    unicode-bidi: isolate;
}

.mw-progress {
    height: 8px;
    border-radius: 50rem;
    background: rgba(0, 0, 0, .07);
    overflow: hidden;
}

.mw-progress > span {
    display: block;
    height: 100%;
    background: #16a34a;
    transition: width .3s ease;
}

.mw-progress-hint {
    font-size: .74rem;
}

.mw-section {
    margin-top: 1rem;
}

.mw-section-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: .5rem;
    color: #374151;
}

/* الكارت الجاري: هو نجم الشاشة — حدود ملوّنة وخط كبير */
.mw-current-card {
    border: 2px solid #16a34a;
    border-radius: .9rem;
    box-shadow: 0 6px 20px rgba(22, 163, 74, .12);
}

.mw-current-top {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .5rem;
}

.mw-current-service {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: .3rem;
}

.mw-item-service {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .25rem;
}

.mw-cust {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    font-size: .9rem;
    color: #4b5563;
}

.mw-call {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    direction: ltr;
    unicode-bidi: isolate;
    font-weight: 700;
    text-decoration: none;
    background: rgba(78, 121, 247, .1);
    border-radius: 50rem;
    padding: .1rem .5rem;
}

.mw-current-times {
    margin-top: .6rem;
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
}

.mw-time-row {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.mw-time-lbl {
    font-size: .78rem;
    color: #6b7280;
}

.mw-time-chip {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    font-weight: 700;
    font-size: .86rem;
    background: rgba(0, 0, 0, .05);
    border-radius: .45rem;
    padding: .1rem .45rem;
}

.mw-time-chip-live {
    background: rgba(22, 163, 74, .14);
    color: #15803d;
}

/* العدّاد: الرقم اللي المتخصص بيبص عليه من بعيد */
.mw-elapsed {
    margin: .7rem 0;
    text-align: center;
    background: rgba(22, 163, 74, .08);
    border-radius: .7rem;
    padding: .5rem;
}

.mw-elapsed-lbl {
    font-size: .75rem;
    color: #6b7280;
}

.mw-elapsed-val {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* زراير الأكشن: عرض كامل وطول مريح للإبهام */
.mw-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    min-height: 52px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: .7rem;
    margin-top: .6rem;
}

.mw-item-card {
    border-radius: .8rem;
    margin-bottom: .6rem;
}

.mw-item-card.is-next {
    border: 1px solid var(--primary);
}

.mw-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin-bottom: .35rem;
}

.mw-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .74rem;
    font-weight: 700;
    border-radius: 50rem;
    padding: .12rem .5rem;
    background: rgba(0, 0, 0, .06);
}

.mw-badge-live {
    background: rgba(22, 163, 74, .15);
    color: #15803d;
}

.mw-badge-next {
    background: rgba(78, 121, 247, .14);
    color: var(--primary);
}

/* التأخير: أصفر — تحذير مش خطأ */
.mw-badge-delay {
    background: rgba(245, 158, 11, .18);
    color: #b45309;
}

.mw-badge-done {
    background: rgba(22, 163, 74, .13);
    color: #15803d;
}

.mw-badge-cancelled {
    background: rgba(220, 38, 38, .12);
    color: #b91c1c;
}

.mw-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    animation: mw-pulse 1.4s ease-in-out infinite;
}

@keyframes mw-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .25; }
}

/* الزحزحة التلقائية: لازم تبان بوضوح إن النظام هو اللي غيّر الوقت */
.mw-shifted-hint {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-top: .35rem;
    font-size: .78rem;
    font-weight: 600;
    color: #b45309;
    background: rgba(245, 158, 11, .12);
    border-radius: .45rem;
    padding: .2rem .45rem;
}

.mw-done-toggle {
    display: flex;
    align-items: center;
    gap: .4rem;
    width: 100%;
    border: 0;
    background: transparent;
    font-weight: 700;
    font-size: .88rem;
    color: #6b7280;
    padding: .3rem 0;
}

.mw-done-count {
    background: rgba(0, 0, 0, .07);
    border-radius: 50rem;
    padding: 0 .45rem;
    font-size: .76rem;
    direction: ltr;
    unicode-bidi: isolate;
}

.mw-done-caret {
    margin-inline-start: auto;
}

.mw-done-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .3rem;
    padding: .5rem .7rem;
    background: rgba(0, 0, 0, .03);
    border-radius: .6rem;
    margin-bottom: .35rem;
    opacity: .85;
}

.mw-done-name {
    font-weight: 600;
    font-size: .9rem;
}

.mw-done-cust {
    font-size: .8rem;
    margin-inline-start: .4rem;
}

.mw-done-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
}

.mw-done-time {
    font-size: .78rem;
    direction: ltr;
    unicode-bidi: isolate;
    color: #6b7280;
}

/* بانر "معلّم غير متاح": لازم يشد العين قبل أي محاولة بدء خدمة */
.mw-off-banner {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .7rem .85rem;
    margin-bottom: .7rem;
    border-radius: .75rem;
    background: rgba(220, 38, 38, .1);
    border: 1px solid rgba(220, 38, 38, .28);
    color: #b91c1c;
}

.mw-off-banner-main {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 800;
    font-size: .95rem;
}

.mw-off-reason {
    font-size: .85rem;
    font-weight: 600;
}

.mw-off-hint {
    font-size: .8rem;
    opacity: .9;
}

/* زر البدء المقفول: واضح إنه مش قابل للدوس (السيرفر رافض أصلاً) */
.mw-start:disabled,
.mw-start.is-blocked {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
}

/* شاشة 360px: مساحات أقل بدون تصغير الأهداف */
@media (max-width: 400px) {
    .mw-current-service { font-size: 1.15rem; }
    .mw-elapsed-val { font-size: 1.7rem; }
    .mw-page .card-body { padding: .8rem; }
}

/* ============================================================
   لوحة المتخصصين (staff_board)
   ============================================================ */

.sb-readonly-hint {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    margin-bottom: .8rem;
}

.sb-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .7rem;
}

@media (min-width: 576px) {
    .sb-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
    .sb-grid { grid-template-columns: repeat(3, 1fr); }
}

.sb-card {
    border: 1px solid #e5e7eb;
    border-inline-start-width: 4px;
    border-radius: .8rem;
    padding: .8rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.sb-card.is-available { border-inline-start-color: #16a34a; }
.sb-card.is-busy { border-inline-start-color: #f59e0b; }
.sb-card.is-off { border-inline-start-color: #9ca3af; }

.sb-card-head {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.sb-avatar {
    flex: 0 0 auto;
}

.sb-avatar-img,
.sb-avatar-initial {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.sb-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(78, 121, 247, .14);
    color: var(--primary);
    font-weight: 800;
    font-size: 1.1rem;
}

.sb-card-title {
    min-width: 0;
}

.sb-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sb-status-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    border-radius: 50rem;
    padding: .08rem .45rem;
    margin-top: .1rem;
}

.sb-card.is-available .sb-status-badge {
    background: rgba(22, 163, 74, .14);
    color: #15803d;
}

.sb-card.is-busy .sb-status-badge {
    background: rgba(245, 158, 11, .18);
    color: #b45309;
}

.sb-card.is-off .sb-status-badge {
    background: rgba(0, 0, 0, .07);
    color: #6b7280;
}

.sb-card-body {
    font-size: .88rem;
    min-height: 1.2rem;
}

.sb-working-lbl,
.sb-next-lbl {
    font-size: .78rem;
    color: #6b7280;
}

.sb-working-service {
    font-size: .95rem;
}

.sb-working-cust {
    margin-top: .1rem;
}

.sb-elapsed {
    display: flex;
    align-items: center;
    gap: .3rem;
    margin-top: .35rem;
    flex-wrap: wrap;
}

.sb-elapsed-lbl {
    font-size: .76rem;
    color: #6b7280;
}

.sb-elapsed-val {
    font-weight: 800;
    direction: ltr;
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.sb-since,
.sb-next-time {
    font-size: .76rem;
    direction: ltr;
    unicode-bidi: isolate;
}

.sb-controls {
    margin-top: auto;
    padding-top: .4rem;
    border-top: 1px dashed #e5e7eb;
}

.sb-controls-lbl {
    display: block;
    font-size: .72rem;
    margin-bottom: .25rem;
}

.sb-controls-btns {
    width: 100%;
}

.sb-controls-btns .btn {
    flex: 1 1 0;
    font-size: .76rem;
    padding: .25rem .2rem;
}

/* خانة المدة (مشغول / غير متاح): خطوة تانية مقصودة قبل تنفيذ أكشن مؤثر */
.sb-duration {
    margin-top: .4rem;
    padding-top: .4rem;
    border-top: 1px dashed #e5e7eb;
}

.sb-duration-lbl {
    display: block;
    font-size: .72rem;
    color: #6b7280;
    margin-bottom: .25rem;
}

.sb-duration-row {
    display: flex;
    align-items: center;
    gap: .3rem;
    flex-wrap: wrap;
}

.sb-duration-input {
    flex: 0 0 5rem;
    max-width: 5rem;
    text-align: center;
    direction: ltr;
    unicode-bidi: isolate;
}

.sb-duration-row .btn {
    font-size: .74rem;
    padding: .25rem .5rem;
}

.sb-duration-hint {
    font-size: .7rem;
    margin-top: .25rem;
}

/* الوضع الداكن */
[data-bs-theme="dark"] .mw-progress,
[data-bs-theme="dark"] .mw-time-chip,
[data-bs-theme="dark"] .mw-badge,
[data-bs-theme="dark"] .mw-done-count,
[data-bs-theme="dark"] .mw-done-row {
    background: rgba(255, 255, 255, .09);
}

[data-bs-theme="dark"] .mw-section-title,
[data-bs-theme="dark"] .mw-cust {
    color: #d1d5db;
}

[data-bs-theme="dark"] .sb-card {
    background: #262e40;
    border-color: #323a4e;
}

[data-bs-theme="dark"] .sb-controls,
[data-bs-theme="dark"] .sb-duration {
    border-top-color: #323a4e;
}

[data-bs-theme="dark"] .mw-off-banner {
    background: rgba(220, 38, 38, .18);
    border-color: rgba(220, 38, 38, .38);
    color: #fca5a5;
}

[data-bs-theme="dark"] .sb-card.is-off .sb-status-badge {
    background: rgba(255, 255, 255, .1);
    color: #d1d5db;
}