/* Screen controls only: keep printable documents and icon glyph sizes intact. */
@media screen {
    html body.vertical-layout.navbar-sticky .main-menu {
        top: var(--crm-header-offset, var(--crm-header-height)) !important;
        height: calc(100% - var(--crm-header-offset, var(--crm-header-height))) !important;
    }
    @media (max-width: 767.98px) {
        .crm-bulk-renew .bulk-search-actions {
            flex-direction: column;
            align-items: stretch;
        }
        .crm-bulk-renew .bulk-search-actions .dataTables_filter {
            flex: none;
            width: 100%;
        }
        .dataTables_wrapper .dt-action-buttons > div:has(> .dataTables_filter),
        .dataTables_wrapper .dataTables_filter,
        .dataTables_wrapper .dataTables_filter label {
            min-width: 0;
            max-width: 100%;
        }
        html body.vertical-layout.navbar-sticky .app-content.content {
            padding-top: calc(var(--crm-header-offset, 120px) + 16px) !important;
        }
        html body.vertical-layout.navbar-sticky .crm-navbar .nav-item.dropdown .dropdown-menu:is(.crm-profile-menu, .crm-workspace-menu, .crm-notice-menu) {
            top: calc(var(--crm-header-offset, 120px) + 4px) !important;
            max-height: calc(100dvh - var(--crm-header-offset, 120px) - 20px) !important;
        }
        html body.vertical-layout .sidenav-overlay { top: var(--crm-header-offset, 120px) !important; }
    }
    .crm-required-fields .form-group label {
        font-size: 13px;
        font-weight: 500;
        line-height: 1.5;
    }
    .crm-required-fields .card-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 20px;
        border-bottom: 1px solid var(--crm-border, #e4e7ec);
    }
    .crm-required-fields .card-title {
        margin-bottom: 4px;
        font-size: 18px;
        line-height: 1.35;
    }
    .crm-required-fields-description {
        max-width: 720px;
        color: #667085;
        font-size: 13px;
        line-height: 1.5;
    }
    .dark-layout .crm-required-fields-description {
        color: #d1dced;
    }
    .crm-required-fields-back {
        display: inline-flex;
        flex: none;
        align-items: center;
        gap: 6px;
        min-height: 38px;
    }
    .crm-required-fields-back svg {
        width: 15px;
        height: 15px;
    }
    .crm-required-fields .card-body {
        padding: 20px;
    }
    .crm-required-fields .save_user_settings.modal-content {
        border: 0;
        background: transparent;
        box-shadow: none;
    }
    .crm-required-fields .modal-body {
        padding: 0;
    }
    .crm-required-fields-section {
        max-width: 720px;
        margin: 0;
        padding: 0 0 10px;
        color: inherit;
        font-size: 15px;
        line-height: 1.4;
        border-bottom: 1px solid var(--crm-border, #e4e7ec);
    }
    .crm-required-fields-section-documents {
        margin-top: 24px;
    }
    .crm-required-fields .form-group.main {
        max-width: 720px;
        align-items: center;
        min-height: 50px;
        margin: 0;
        padding: 10px 0;
        border-bottom: 1px solid var(--crm-border, #e4e7ec);
    }
    .crm-required-fields .form-group.main > .col-2 {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }
    .crm-required-fields .form-group.main > .custom-switch {
        flex: 0 0 132px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        max-width: none;
        margin-bottom: 0 !important;
    }
    .crm-required-fields .crm-required-state {
        margin-right: 8px;
        color: #667085;
        font-size: 12px;
        line-height: 1.5;
    }
    .dark-layout .crm-required-fields .crm-required-state {
        color: #d1dced;
    }
    .crm-required-fields .custom-switch > .custom-control-label {
        flex: none;
        height: 24px;
        margin-bottom: 0;
    }
    .crm-required-fields #save_general_btn {
        min-height: 40px;
        margin-top: 20px;
    }
    @media (max-width: 575.98px) {
        .crm-required-fields .card-header {
            flex-direction: column;
            padding: 16px;
        }
        .crm-required-fields .card-body {
            padding: 16px;
        }
        .crm-required-fields-back {
            width: 100%;
            min-height: 44px;
            justify-content: center;
        }
        .crm-required-fields .form-group.main > .custom-switch {
            flex-basis: 116px;
        }
        .crm-required-fields #save_general_btn {
            width: 100%;
            min-height: 44px;
        }
    }
    .crm-backup .col-form-label label {
        font-size: 13px;
        font-weight: 500;
        line-height: 1.5;
    }
    .crm-backup .form-control,
    .crm-backup .select2-container {
        font-size: 14px;
        line-height: 1.5;
    }
    body #isp-dashboard .system-level,
    body #isp-dashboard .service-status-badge {
        font-size: 12px;
        line-height: 1.5;
    }
    body #isp-dashboard .resource-detail,
    body #isp-dashboard .service-status-info p,
    body #isp-dashboard .service-status-note {
        font-size: 13px;
        line-height: 1.5;
    }
    .crm-natlog .form-horizontal .row > :is(.col-3, .col-4) {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        min-width: 0;
    }
    .crm-natlog .form-group > .col-sm-6 {
        max-width: 100%;
        padding: 0;
    }
    .crm-natlog .col-form-label label {
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 6px;
        overflow-wrap: anywhere;
    }
    .crm-natlog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
    .crm-natlog-actions .btn { margin: 0 !important; }
    .crm-natlog-heading p {
        margin-top: 4px;
        color: #667085;
        font-size: 13px;
        line-height: 1.5;
    }
    .dark-layout .crm-natlog-heading p { color: #d1dced; }
    .crm-natlog + .app-user-list .table th {
        font-size: 13px;
        line-height: 1.4;
        white-space: nowrap;
    }
    .crm-natlog-import .modal-header {
        align-items: flex-start;
    }
    .crm-natlog-import .modal-header p,
    .crm-natlog-import .m-dropzone__msg p {
        margin-top: 5px;
        color: #667085;
        font-size: 13px;
        line-height: 1.5;
    }
    .dark-layout .crm-natlog-import .modal-header p,
    .dark-layout .crm-natlog-import .m-dropzone__msg p { color: #d1dced; }
    .crm-natlog-import #natlog-upload-label {
        display: block;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 500;
    }
    .crm-natlog-import #m-dropzone-natlog {
        min-height: 150px;
        border: 1px dashed #98a2b3;
        border-radius: 8px;
        background: #f8fafc;
    }
    .dark-layout .crm-natlog-import #m-dropzone-natlog {
        border-color: #596780;
        background: #18243a;
    }
    .crm-natlog-import #m-dropzone-natlog:focus-visible {
        outline: 2px solid #7367f0;
        outline-offset: 2px;
    }
    .crm-natlog-import .m-dropzone__msg-title { font-size: 15px; }
    .crm-natlog-import .progress { border-radius: 999px; overflow: hidden; }
    .query-builder .rules-group-container { padding: 12px; background: #f6f7fb; border-color: #d8dce7; }
    .crm-tickets #mikrotik_tab { gap: 6px; }
    .crm-tickets #mikrotik_tab .nav-link { display: flex; align-items: center; font-size: 14px; }
    .crm-tickets #mikrotik_tab .badge { width: auto !important; min-width: 24px; margin-left: 8px !important; font-size: 12px; }
    .crm-tickets table.dataTable td.dataTables_empty { text-align: left; }
    .crm-ticket-detail .ticket-page-header {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 16px;
    }
    .crm-ticket-detail .ticket-page-header h1 {
        margin: 4px 0 2px;
        font-size: 22px;
        line-height: 1.3;
        font-weight: 600;
    }
    .crm-ticket-detail .ticket-page-header p {
        margin: 0;
        color: #667085;
        font-size: 13px;
        line-height: 1.5;
    }
    .crm-ticket-detail .ticket-breadcrumb {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #667085;
        font-size: 13px;
    }
    .crm-ticket-detail .ticket-page-header .btn svg {
        width: 16px;
        height: 16px;
        margin-right: 6px;
    }
    .crm-ticket-detail .ticket-overview-card > .card-body,
    .crm-ticket-detail .ticket-tasks-card > .card-body {
        padding: 18px;
    }
    .crm-ticket-detail .ticket-section-title,
    .crm-ticket-detail .ticket-description-title,
    .crm-ticket-detail .ticket-chat-card .card-header h3 {
        margin: 0;
        font-size: 16px;
        line-height: 1.4;
        font-weight: 600;
    }
    .crm-ticket-detail .ticket-section-title { margin-bottom: 14px; }
    .crm-ticket-detail .ticket-summary-table { margin-bottom: 0; }
    .crm-ticket-detail .ticket-summary-table th,
    .crm-ticket-detail .ticket-summary-table td { padding: 10px 12px; }
    .crm-ticket-detail .ticket-summary-table tbody td:first-child {
        width: 34%;
        color: #475467;
        font-size: 13px;
        font-weight: 600;
    }
    .crm-ticket-detail .ticket-summary-table .badge {
        max-width: 100%;
        white-space: normal;
        text-align: left;
        line-height: 1.4;
    }
    .crm-ticket-detail .ticket-chat-card {
        margin-bottom: 0;
        border: 1px solid #d8dce7;
        box-shadow: none;
    }
    .crm-ticket-detail .ticket-chat-card .card-header {
        min-height: 48px;
        padding: 12px 16px;
        color: #344054;
        background: #f8fafc;
        border-bottom: 1px solid #d8dce7;
    }
    .crm-ticket-detail .ticket-chat-card .user-chats { background: #f8fafc; }
    .crm-ticket-detail .ticket-message-form {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
    }
    .crm-ticket-detail .ticket-message-form .form-send-message {
        flex: 1 1 auto;
        width: auto !important;
        margin: 0 !important;
    }
    .crm-ticket-detail .ticket-message-form #message {
        min-height: 44px;
        padding: 10px 12px !important;
        border-color: #b8c1cf !important;
    }
    .crm-ticket-detail .ticket-message-form .send { margin: 0; min-height: 44px; }
    .crm-ticket-detail .ticket-description-panel {
        margin-top: 16px;
        padding: 16px;
        border: 1px solid #d8dce7;
        border-radius: 8px;
        background: #fff;
    }
    .crm-ticket-detail .ticket-description-title {
        padding-bottom: 10px;
        border-bottom: 1px solid #e5e7eb;
    }
    .crm-ticket-detail .ticket-description-panel .card-text {
        margin: 12px 0 0 !important;
        font-size: 14px;
        line-height: 1.6;
    }
    .crm-ticket-detail .ticket-tasks-card #mikrotik_tab {
        display: flex;
        gap: 6px;
        margin-bottom: 14px;
    }
    .crm-ticket-detail .ticket-tasks-card #mikrotik_tab .nav-link {
        display: flex;
        align-items: center;
        min-height: 42px;
        padding: 9px 12px;
        font-size: 14px;
    }
    .crm-ticket-detail .ticket-tasks-card #mikrotik_tab .badge {
        width: auto !important;
        min-width: 26px;
        margin-left: 8px !important;
        font-size: 12px;
    }
    .crm-ticket-detail table.dataTable td.dataTables_empty { text-align: left; }
    .crm-ticket-detail .dataTables_filter label { display: block; margin: 0; }
    .crm-ticket-detail .dataTables_filter input { min-width: 240px; margin-left: 0; }
    .crm-ticket-detail .modal .form-label {
        display: block;
        margin-bottom: 6px;
        font-size: 13px;
        font-weight: 600;
    }
    .crm-ticket-detail .ticket-form-status {
        min-height: 20px;
        margin-bottom: 10px;
        color: #667085;
        font-size: 13px;
        line-height: 1.5;
    }
    .crm-ticket-detail .modal .select2-selection__rendered,
    .crm-ticket-detail .modal .select2-results__option { font-size: 14px !important; }
    .crm-ticket-detail .modal-header .close { margin: 0 0 0 auto; transform: none; }
    .dark-layout .crm-ticket-detail .ticket-page-header p,
    .dark-layout .crm-ticket-detail .ticket-breadcrumb { color: #d1dced; }
    .dark-layout .crm-ticket-detail .ticket-summary-table tbody td:first-child { color: #d1dced; }
    .dark-layout .crm-ticket-detail .ticket-chat-card {
        border-color: #42516a;
        background: #202d43;
    }
    .dark-layout .crm-ticket-detail .ticket-chat-card .card-header {
        color: #edf2fa;
        background: #18253a !important;
        border-bottom-color: #42516a;
    }
    .dark-layout .crm-ticket-detail .ticket-chat-card .user-chats { background: #18253a !important; }
    .dark-layout .crm-ticket-detail .ticket-description-panel {
        border-color: #42516a;
        background: #18253a !important;
        color: #edf2fa;
    }
    .dark-layout .crm-ticket-detail .ticket-description-title { color: #edf2fa; border-bottom-color: #42516a; }
    .dark-layout .crm-ticket-detail .ticket-message-form #message { border-color: #596780 !important; }
    .dark-layout .crm-ticket-detail .ticket-form-status { color: #d1dced; }
    @media (max-width: 575.98px) {
        .crm-tickets #mikrotik_tab { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
        .crm-tickets #mikrotik_tab .nav-link { padding: 10px 6px; font-size: 13px; white-space: nowrap; }
        .crm-tickets #mikrotik_tab .badge { margin-left: 4px !important; }
        .crm-ticket-detail .ticket-page-header { align-items: flex-start; flex-direction: column; }
        .crm-ticket-detail .ticket-page-header .btn { width: 100%; }
        .crm-ticket-detail .ticket-overview-card > .card-body,
        .crm-ticket-detail .ticket-tasks-card > .card-body { padding: 12px; }
        .crm-ticket-detail .ticket-tasks-card #mikrotik_tab {
            display: grid;
            grid-template-columns: 1fr;
        }
        .crm-ticket-detail .ticket-tasks-card #mikrotik_tab .nav-link { justify-content: space-between; }
        .crm-ticket-detail .dataTables_filter input { min-width: 0; width: 100%; }
        .crm-ticket-detail .ticket-message-form { gap: 8px; }
        .crm-ticket-detail .ticket-message-form .send { width: 44px; padding: 0; }
        .crm-ticket-detail .ticket-description-panel { margin-top: 12px; padding: 12px; }
        .crm-ticket-detail #createTaskModal { overflow-y: auto; }
        .crm-ticket-detail #createTaskModal .modal-dialog {
            width: auto;
            max-width: none;
            margin: 12px;
        }
        .crm-ticket-detail #createTaskModal .modal-content {
            max-height: calc(100vh - 24px);
            overflow-y: auto;
        }
        .crm-ticket-detail #createTaskModal .modal-body { padding: 14px; }
        .crm-ticket-detail #createTaskModal #full-wrapper,
        .crm-ticket-detail #createTaskModal #full-container { height: auto !important; }
        .crm-ticket-detail #createTaskModal .ql-container { height: 160px !important; }
    }
    #createTicketModal .form-label,
    #createTicketModal #createForm strong,
    #createTicketModal #createForm label { font-size: 13px; line-height: 1.5; font-weight: 500; }
    #createTicketModal #createForm .row > [class*="col-"] { margin-bottom: 10px; }
    #createTicketModal .ticket-upload-help { font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
    body #createTicketModal .ticket-upload-help { color: #667085 !important; }
    .dark-layout #createTicketModal .ticket-upload-help { color: #d1dced !important; }
    #createTicketModal .select2-selection__rendered,
    #createTicketModal .select2-results__option { font-size: 14px !important; }
    .dark-layout #createTicketModal .select2-results__option--highlighted {
        background: #354565 !important;
        color: #edf2fa !important;
    }
    #subjectmodal label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
    #subjectmodal .row > .col-12 { margin-bottom: 16px; }
    #subjectmodal .select2-selection__rendered { font-size: 14px !important; }
    #subjectmodal .modal-header .close { margin: 0 0 0 auto; transform: none; }
    #deneme .modal-header .close { margin: 0 0 0 auto; transform: none; }
    #sendtestmailmodal .modal-header .close,
    #sendtestsmsmodal .modal-header .close { margin: 0 0 0 auto; transform: none; }
    #deneme .list-group-item { font-size: 14px; }
    #deneme .card-text { font-size: 14px; line-height: 1.6; }
    #createTicketModal #full-wrapper,
    #createTicketModal #full-container { height: auto !important; }
    #createTicketModal .ql-container { height: 200px !important; }
    #createTicketModal .modal-header .close { margin: 0 0 0 auto; transform: none; }
    .query-builder .rule-container { padding: 10px; border-color: #d8dce7; }
    .query-builder .btn { font-size: 13px; }
    .query-builder .rule-filter-container select { max-width: 100%; }
    .dark-layout .query-builder .rules-group-container {
        background: #202d43;
        border-color: #52627d;
    }
    .dark-layout .query-builder .rule-container {
        background: #152136;
        border-color: #52627d;
        color: #edf2fa;
    }
    .crm-bulk-notification .input-group:has(#full-wrapper),
    .crm-bulk-notification #full-wrapper,
    .crm-bulk-notification #full-container { height: auto !important; }
    .crm-bulk-notification #full-wrapper { width: 100%; min-width: 0; }
    .crm-bulk-notification .ql-container { height: 180px !important; }
    .new-template-modal.modal-slide-in .modal-dialog { width: min(720px, 100vw); max-width: 100%; }
    .new-template-modal .list-group-item { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
    .new-template-modal #full-wrapper { width: 100%; min-width: 0; }
    .new-template-modal .input-group:has(#full-wrapper),
    .new-template-modal #full-wrapper,
    .new-template-modal #full-container { height: auto !important; }
    .new-template-modal .ql-container { height: 180px !important; }
    .new-template-modal .modal-content > .row { margin: 0; }
    .new-template-modal .modal-content > .row > .col-12 { padding: 0; }
    .crm-verification-settings .list-group-item { font-size: 14px; gap: 16px; }
    .crm-verification-settings .form-switch { flex-shrink: 0; }
    .crm-verification-heading { flex-wrap: wrap; gap: 16px; }
    .crm-verification-heading .btn { white-space: nowrap; }
    .crm-verification-config { padding: 20px !important; }
    .crm-account-settings .media-body p { font-size: 13px; line-height: 1.5; }
    .crm-account-settings .section-label { font-size: 13px; line-height: 1.5; color: #475467; }
    .dark-layout .crm-account-settings .section-label { color: #d1dced; }
    .crm-verification-config p { font-size: 13px; line-height: 1.5; }
    body:not(.dark-layout) .crm-verification-config .text-muted { color: #626b7a !important; }
    .crm-verification-config .alert-info { background: #e8f4f8 !important; color: #236278 !important; }
    .dark-layout .crm-verification-config .alert-info { background: #213e50 !important; color: #a8dff0 !important; }
    .crm-verification-config .list-group-item { font-size: 14px; }
    .crm-verification-config .badge { font-size: 12px; }
    .crm-verification-config .badge.bg-warning { background: #fff0d6 !important; color: #855300; }
    .dark-layout .crm-verification-config .badge.bg-warning { background: #493b2a !important; color: #ffc66b; }
    .crm-verification-config .selected-provider {
        background: #eeeaff;
        color: #493a9b;
        border-left: 3px solid #7367f0;
    }
    .dark-layout .crm-verification-config .selected-provider {
        background: #373452;
        color: #edf2fa;
        border-left-color: #baafff;
    }
    .crm-verification-config #providerTabs { gap: 6px; }
    .crm-verification-config #providerTabs .badge.bg-secondary { background: #e8edf5 !important; color: #344054 !important; }
    .dark-layout .crm-verification-config #providerTabs .badge.bg-secondary { background: #354565 !important; color: #edf2fa !important; }
    .crm-verification-config #providerTabs .badge.bg-success { background: #ddf4e9 !important; color: #176044 !important; }
    .dark-layout .crm-verification-config #providerTabs .badge.bg-success { background: #21483e !important; color: #8ce0bd !important; }
    .crm-verification-config .tab-content { padding: 16px 0; }
    .crm-email-actions { display: flex; flex-wrap: wrap; gap: 10px; }
    .crm-email-actions .btn { white-space: nowrap; }
    body:not(.dark-layout) .crm-gateway-list .list-group-item-primary,
    body:not(.dark-layout) .crm-gateway-list .list-group-item-primary > span,
    body:not(.dark-layout) .crm-gateway-list .list-group-item-primary a {
        color: #5743b5;
    }
    .crm-gateway-list .list-group-item a[aria-label^="Configure "] {
        display: inline-flex;
        float: right;
        padding: 4px;
    }
    :is(#stripe_modal,#paypal_modal,#razor_modal,#payu_modal,#telegram_modal,#Whatsapp_modal,#ottplaymodal) .custom-switch {
        min-height: 56px;
    }
    :is(#stripe_modal,#paypal_modal,#razor_modal,#payu_modal,#telegram_modal,#Whatsapp_modal,#ottplaymodal) .custom-switch p {
        font-size: 13px;
        font-weight: 500;
    }
    :is(#stripe_modal,#paypal_modal,#razor_modal,#payu_modal,#telegram_modal,#Whatsapp_modal,#ottplaymodal) .card {
        margin-bottom: 0;
        box-shadow: none;
    }
    @media (max-width: 575px) {
        .crm-verification-config .list-group-item {
            flex-wrap: wrap;
            gap: 10px;
        }
        .crm-verification-config .list-group-item > span { flex-basis: 100%; }
        :is(#stripe_modal,#paypal_modal,#razor_modal,#payu_modal,#telegram_modal,#Whatsapp_modal,#ottplaymodal) .modal-body { padding: 12px; }
        :is(#stripe_modal,#paypal_modal,#razor_modal,#payu_modal,#telegram_modal,#Whatsapp_modal,#ottplaymodal) .card-body,
        :is(#stripe_modal,#paypal_modal,#razor_modal,#payu_modal,#telegram_modal,#Whatsapp_modal,#ottplaymodal) .card-header { padding: 12px; }
    }
    @media (max-width: 767px) {
        .crm-natlog .form-horizontal .row > :is(.col-3, .col-4) {
            flex-basis: 100%;
            max-width: 100%;
        }
    }
    /* Calendar widgets mark editable-through-popup inputs readonly. */
    body .app-content .flatpickr-input[readonly]:not(:disabled),
    body .modal-content .flatpickr-input[readonly]:not(:disabled) {
        opacity: 1;
    }
    body .app-content .fc .fc-button,
    body .app-content .fc .fc-daygrid-day-number,
    body .app-content .fc .fc-col-header-cell-cushion {
        font-size: 14px;
        line-height: 1.5;
    }
    body .app-content .alert {
        font-size: 14px;
        line-height: 1.5;
    }
    body #basic-tabs-components .company-settings-card .form-control,
    body #basic-tabs-components .remaining-settings input:not([type=checkbox]):not([type=radio]),
    body #basic-tabs-components .remaining-settings select,
    body #basic-tabs-components #invoice_tab .form-control {
        font-size: 14px;
        line-height: 1.5;
    }
    body .app-content .table tbody td {
        font-size: 14px;
        line-height: 1.5;
    }
    body .app-content .table label {
        font-size: 13px;
        line-height: 1.5;
        font-weight: 500;
    }
    :is(.crm-earnings, .crm-service-transactions, .crm-wallet, .crm-payments, .crm-log-page, .crm-tickets, .crm-leads, .crm-products, .crm-vendors, .crm-product-classes, .crm-inventory-products, .crm-admins, .crm-roles, .crm-zones, .crm-backup, .crm-ipv6, .crm-ipv4, .crm-exported-files, .crm-balance-report, .crm-traffic-report, .crm-license-list, .nas-management, .crm-templates) .dataTables_filter label {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
    }
    body .app-content :is(.crm-earnings, .crm-service-transactions, .crm-wallet, .crm-payments, .crm-log-page, .crm-tickets, .crm-leads, .crm-products, .crm-vendors, .crm-product-classes, .crm-inventory-products, .crm-admins, .crm-roles, .crm-zones, .crm-backup, .crm-ipv6, .crm-ipv4, .crm-exported-files, .crm-balance-report, .crm-traffic-report, .crm-license-list, .nas-management, .crm-templates) .dataTables_filter input {
        flex: 1 1 260px;
        min-width: 0;
        margin-left: 0;
    }
    .crm-admins .dataTables_filter,
    .crm-admins .dataTables_filter label {
        width: 100%;
        margin: 0;
    }
    .crm-admins .dataTables_filter input {
        width: 100% !important;
        max-width: 320px;
    }
    @media (max-width: 767.98px) {
        .crm-admins .header-actions > div,
        .crm-admins .dt-action-buttons,
        .crm-admins .dt-action-buttons > div {
            width: 100%;
        }
        .crm-admins .dataTables_filter input {
            max-width: none;
        }
    }
    .app-content .customer-activity-log-item time.text-muted {
        color: #667085 !important;
        font-size: 12px;
    }
    .dark-layout .app-content .customer-activity-log-item time.text-muted {
        color: #c1ccdc !important;
    }
    .app-content code.activity_code {
        font-size: 13px;
        line-height: 1.5;
        color: #9b235e;
        background-color: #f8eaf1;
        overflow-wrap: anywhere;
    }
    .dark-layout .app-content code.activity_code {
        color: #ffb3d3;
        background-color: #382d43;
    }
    .crm-session-filters {
        margin-bottom: 16px;
    }
    .crm-session-filters,
    .crm-session-filters .row {
        row-gap: 12px;
    }
    .crm-session-filters label {
        font-size: 13px;
        font-weight: 500;
        margin-bottom: 4px;
    }
    .crm-session-filters #log-time-input .form-control {
        display: block;
        width: 100%;
        min-width: 0;
    }
    .crm-payments .select2-selection__rendered {
        font-size: 14px !important;
    }
    .crm-earnings .nav-tabs img,
    .crm-earnings .card-header img {
        width: 24px;
        height: 24px;
        object-fit: contain;
    }
    .dark-layout .crm-earnings .nav-tabs img,
    .dark-layout .crm-earnings .card-header img {
        filter: invert(1);
    }
    #dashboard-ecommerce #donut-chart,
    #dashboard-ecommerce #donut-chart-online {
        width: 100%;
        min-width: 0;
    }
    #dashboard-ecommerce .apexcharts-canvas,
    #dashboard-ecommerce .apexcharts-svg {
        max-width: 100%;
    }
    #dashboard-ecommerce .apexcharts-text {
        fill: #475467;
    }
    #dashboard-ecommerce .apexcharts-legend-text {
        color: #475467 !important;
    }
    .dark-layout #dashboard-ecommerce .apexcharts-legend-text {
        color: #d1dced !important;
    }
    .dark-layout #dashboard-ecommerce .apexcharts-text {
        fill: #d1dced;
    }
    .crm-finance-dashboard .card-text,
    .crm-finance-dashboard small,
    .crm-finance-dashboard .tab-widget-title {
        font-size: 13px !important;
        line-height: 1.4;
    }
    .crm-finance-dashboard #companies_table_wrapper .dataTables_filter input,
    .crm-finance-dashboard #companies_table_wrapper .dataTables_length select,
    .crm-finance-dashboard #companies_table tbody td {
        font-size: 14px;
    }
    .dark-layout .crm-finance-dashboard img[src*="customer.png"] {
        filter: invert(1) brightness(1.15);
    }
    @media (max-width: 575.98px) {
        .crm-finance-dashboard .card-tiny-line-stats .card-header {
            align-items: flex-start;
            flex-direction: column;
            gap: 4px;
        }
    }
    /* Legacy KPI cards share the dashboard's restrained surfaces and type scale. */
    body .app-content .card-header:is(.infocard,.successcard,.dangercard,.expiredcard,.primarycard,.warningcard) {
        --kpi-accent: #7367f0;
        background-image: none;
        background-color: #f6f7fb;
        border: 1px solid #d9dfeb;
        border-left: 3px solid var(--kpi-accent);
        border-radius: 8px;
        min-height: 140px;
        height: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
        padding: 18px 20px;
        color: var(--kpi-accent);
    }
    body .app-content .card-header.infocard { --kpi-accent: #3579c9; }
    body .app-content .card-header.successcard { --kpi-accent: #16835f; }
    body .app-content .card-header.dangercard { --kpi-accent: #c3415f; }
    body .app-content .card-header.warningcard { --kpi-accent: #ad6a0e; }
    body .app-content .card-header:is(.infocard,.successcard,.dangercard,.expiredcard,.primarycard,.warningcard) h2 {
        color: var(--kpi-accent) !important;
        font-size: 28px;
        font-weight: 600;
        line-height: 1.2;
        font-variant-numeric: tabular-nums;
        overflow-wrap: anywhere;
    }
    body .app-content .card-header:is(.infocard,.successcard,.dangercard,.expiredcard,.primarycard,.warningcard) p {
        color: #475467 !important;
        font-size: 13px;
        line-height: 1.5;
        margin-top: 5px;
    }
    .dark-layout .app-content .card-header:is(.infocard,.successcard,.dangercard,.expiredcard,.primarycard,.warningcard) {
        --kpi-accent: #b7a6ff;
        background-color: #202d43;
        border-color: #52627d;
        border-left-color: var(--kpi-accent);
    }
    .dark-layout .app-content .card-header.infocard { --kpi-accent: #8bb8ff; }
    .dark-layout .app-content .card-header.successcard { --kpi-accent: #76d9b0; }
    .dark-layout .app-content .card-header.dangercard { --kpi-accent: #ff9bac; }
    .dark-layout .app-content .card-header.warningcard { --kpi-accent: #ffc66b; }
    .dark-layout .app-content .card-header:is(.infocard,.successcard,.dangercard,.expiredcard,.primarycard,.warningcard) p {
        color: #d1dced !important;
    }
    body .app-content .dataTables_wrapper {
        font-family: inherit;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.5;
    }
    body .app-content .table thead th {
        font-size: 13px;
        line-height: 1.5;
        letter-spacing: .015em;
    }
    body .app-content .dataTables_wrapper .dataTables_filter input {
        font-size: 14px;
        line-height: 1.5;
        width: 260px;
        max-width: 100%;
    }
    body .app-content table.dataTable tbody td {
        font-size: 14px;
        line-height: 1.5;
    }
    body .app-content .btn-sm {
        font-size: 13px;
        line-height: 1.5;
    }
    body .app-content .nav-tabs .nav-link {
        font-size: 14px;
        font-weight: 500;
        line-height: 1.5;
    }
    .dark-layout .app-content .nav-tabs .nav-link.active {
        color: #c4b5fd;
    }
    body .crm-navbar #crm-global-query {
        font-size: 15px;
        font-weight: 400;
    }
    body .crm-users-page .header-actions .dataTables_filter input {
        font-size: 14px !important;
        font-weight: 400;
    }
    body .crm-navbar #crm-global-query::placeholder,
    body .crm-users-page .dataTables_filter input::placeholder {
        color: #667085;
        opacity: 1;
    }
    .dark-layout .crm-navbar #crm-global-query::placeholder,
    .dark-layout .crm-users-page .dataTables_filter input::placeholder {
        color: #c3cee1;
    }
    @media (max-width: 767px) {
        body .crm-navbar #crm-global-query,
        body .crm-users-page .header-actions .dataTables_filter input {
            font-size: 16px !important;
        }
    }
    body .crm-users-page table.dataTable tbody td {
        font-size: 14px;
        line-height: 1.5;
        font-weight: 400;
    }
    body .app-content .crm-users-page table.dataTable thead th {
        font-size: 13px;
        line-height: 1.5;
        letter-spacing: .015em;
    }
    body .crm-users-page .dt-buttons .btn,
    body .crm-users-page .crm-users-summary .btn,
    body .crm-users-page .status_list .crm-status-label {
        font-size: 13px;
        line-height: 1.5;
    }
    body .crm-users-page .status_list strong {
        font-size: 14px;
        font-weight: 600;
        line-height: 1.5;
    }
    body .app-content .card-subtitle,
    body .app-content .card-header p,
    body .app-content .page-heading p,
    body .app-content .card-heading p,
    body .app-content .text-description,
    body .app-content .form-group small {
        font-size: 13px;
        line-height: 1.5;
        font-weight: 400;
    }
    body .app-content .card-footer,
    body .app-content .badge,
    body .app-content .breadcrumb,
    body .app-content .text-caption {
        font-size: 12px;
        line-height: 1.5;
    }
    body .app-content .form-group > label,
    body .app-content .form-label,
    body .app-content .custom-control-label {
        font-size: 13px;
        font-weight: 500;
        line-height: 1.5;
    }
    body .app-content .form-text,
    body .app-content .help-block,
    body .app-content .invalid-feedback,
    body .app-content .valid-feedback {
        font-size: 13px;
        line-height: 1.5;
    }
    body .app-content table.dataTable thead th,
    body .tariff-management table th,
    body .nas-management table th,
    body .crm-bulk-renew .table thead th {
        font-size: 13px;
        line-height: 1.4;
        font-weight: 600;
        letter-spacing: .02em;
    }
    body .app-content .dataTables_info,
    body .app-content .dataTables_paginate,
    body .app-content .dataTables_length label {
        font-size: 13px;
        line-height: 1.5;
        font-weight: 400;
    }
    body .crm-users-page .badge,
    body .crm-users-page .status_list small,
    body .crm-import-step small,
    body .crm-import .import-required {
        font-size: 12px;
        line-height: 1.5;
    }
    body .crm-navbar .crm-workspace-label,
    body .crm-navbar .crm-online-label,
    body .crm-navbar .crm-session-label,
    body .crm-navbar .crm-theme-description,
    body .crm-navbar .crm-notice-meta {
        font-size: 12px;
        line-height: 1.5;
    }
    body .crm-sidebar .navigation > .crm-menu-section {
        font-size: 11px;
        letter-spacing: .06em;
        line-height: 1.5;
    }
    body .company-field-tip [role="tooltip"],
    body #invoice_tab .invoice-help-text,
    body #invoice_tab .document-preview-caption small,
    body .remaining-settings .tip [role="tooltip"],
    body .remaining-settings .review,
    body .remaining-settings .workspace {
        font-size: 12px;
        line-height: 1.5;
    }
    body .app-content .crm-bulk-renew .table thead th,
    body .bulk-renew-modal .table thead th {
        font-size: 13px;
        letter-spacing: .015em;
        line-height: 1.5;
    }
    body .crm-bulk-renew .table tbody td,
    body .bulk-renew-modal .table tbody td,
    body .crm-bulk-renew .table td select,
    body .crm-bulk-renew .bulk-search-actions .dataTables_filter input {
        font-size: 14px;
        line-height: 1.5;
        font-weight: 400;
    }
    body .crm-bulk-renew .status_list,
    body .crm-bulk-renew .bulk-selection span,
    body .bulk-renew-modal .bulk-review-note {
        font-size: 13px;
        line-height: 1.5;
    }
    .dark-layout .crm-bulk-renew .dataTables_filter input::placeholder {
        color: #c3cee1;
        opacity: 1;
    }
    @media (max-width: 767px) {
        body .crm-bulk-renew .bulk-search-actions .dataTables_filter input,
        body .crm-bulk-renew .table td select { font-size: 16px; }
    }
}

@media screen {
    .crm-ticket-config .card-header .badge-warning {
        display: block;
        white-space: normal;
        text-align: left;
        font-size: 13px !important;
        font-weight: 400;
        line-height: 1.5;
    }
    .crm-ticket-config #ticket_sla #table-hover-row > .col-12:first-child table {
        min-width: 940px;
    }
    @media (max-width: 767px) {
        .crm-ticket-config .card-header .col-3,
        .crm-ticket-config .card-header .col-8 {
            flex: 0 0 100%;
            max-width: 100%;
        }
        .crm-ticket-config .card-header .card-title { margin-bottom: 12px; }
        .crm-ticket-config .card-header,
        .crm-ticket-config .card-body { padding: 14px; }
        .crm-ticket-config .card-header > .col-12 { padding: 0; }
    }
}
@media screen {
    body .crm-ticket-config .card-header .badge-warning {
        background: #fff2d8 !important;
        color: #765015 !important;
    }
    .dark-layout .crm-ticket-config .card-header .badge-warning {
        background: #443d2d !important;
        color: #ffe0a0 !important;
    }
    .crm-ticket-config #ticket_sla #table-hover-row > .col-12:first-child td:nth-child(2),
    .crm-ticket-config #ticket_sla #table-hover-row > .col-12:first-child td:nth-child(3) {
        min-width: 300px;
    }
}
@media screen {
    .crm-ticket-config .table-responsive { position: relative; }
    .crm-ticket-config #ticket_sla .table-responsive > table { min-width: 560px; }
    .crm-ticket-config #ticket_sla td .select2-container { min-width: 108px; }
}
@media screen {
    .crm-leads .new-lead-modal .modal-dialog { width: 640px; max-width: 100vw; }
    .crm-leads .new-lead-modal .modal-content > .btn { margin: 0 20px 12px; width: auto; }
}
@media screen {
    .crm-inventory-products .allocate-product-modal .modal-dialog, .crm-inventory-products .new-product-modal .modal-dialog, .crm-product-classes .new-class-modal .modal-dialog, .crm-vendors .new-vendor-modal .modal-dialog { width: 500px; max-width: calc(100% - 32px); margin-left: auto; margin-right: auto; }
}
@media screen {
    .crm-inventory-products .allocate-product-modal .modal-header .close, .crm-inventory-products .new-product-modal .modal-header .close, .crm-product-classes .new-class-modal .modal-header .close, .crm-vendors .new-vendor-modal .modal-header .close { margin: 0 0 0 auto; transform: none; }
}
@media screen {
    .crm-inventory-import .bs-stepper-content > .content { min-height: 0 !important; height: auto !important; margin: 0 !important; }
    .crm-inventory-import .list-group-item { font-size: 14px; line-height: 1.5; }
    .crm-inventory-import .bs-stepper-title { font-size: 14px; }
    .crm-inventory-import .bs-stepper-subtitle { font-size: 12px; }
    .dark-layout .crm-inventory-import .bs-stepper-title { color: #e4ebf5; }
    .dark-layout .crm-inventory-import .bs-stepper-subtitle { color: #c1ccdc; }
    .dark-layout .crm-inventory-import .step.active .bs-stepper-title { color: #c2b5ff; }
    @media (max-width: 767px) {
        .crm-inventory-import .bs-stepper-header { flex-wrap: wrap; gap: 8px; padding: 14px; }
        .crm-inventory-import .bs-stepper-header .line { display: none; }
        .crm-inventory-import .bs-stepper-header .step { flex: 1 1 45%; }
        .crm-inventory-import .step-trigger { padding: 8px 0; }
    }
}
@media screen {
    .dark-layout .crm-inventory-import .bs-stepper .bs-stepper-title { color: #e4ebf5 !important; }
    .dark-layout .crm-inventory-import .bs-stepper .bs-stepper-subtitle { color: #c1ccdc !important; }
    .dark-layout .crm-inventory-import .bs-stepper .step.active .bs-stepper-title { color: #c2b5ff !important; }
    .crm-inventory-import .step-trigger:disabled { opacity: .8; }
}
@media screen {
    .crm-inventory-import .dropzone { border: 1px dashed #8a80cf; border-radius: 6px; min-height: 150px; }
    .crm-inventory-import .dropzone .m-dropzone__msg-title { font-size: 14px; line-height: 1.5; }
    .dark-layout .crm-inventory-import .dropzone { background: #152136 !important; color: #e4ebf5; }
    .dark-layout .crm-inventory-import .dropzone .m-dropzone__msg-title { color: #e4ebf5 !important; }
}

@media screen {
    .dark-layout .crm-inventory-products .select2-results__option--highlighted[aria-selected] {
        background: #3b365b !important;
        color: #eee9ff !important;
    }
}

@media screen {
    .crm-admin-form .bs-stepper-content > .content { min-height: 0 !important; height: auto !important; margin: 0 !important; }
    .crm-admin-form .bs-stepper-title { font-size: 14px; }
    .crm-admin-form .bs-stepper-subtitle { font-size: 12px; }
    .crm-admin-form .content-header small { font-size: 13px; line-height: 1.5; }
    .crm-admin-form .step-trigger:disabled { opacity: .8; }
    .dark-layout .crm-admin-form .bs-stepper .bs-stepper-title { color: #e4ebf5 !important; }
    .dark-layout .crm-admin-form .bs-stepper .bs-stepper-subtitle { color: #c1ccdc !important; }
    .dark-layout .crm-admin-form .bs-stepper .step.active .bs-stepper-title { color: #c2b5ff !important; }
}

@media screen {
    body:not(.dark-layout) .crm-admin-form .bs-stepper .bs-stepper-subtitle,
    body:not(.dark-layout) .crm-admin-form .content-header small { color: #667085 !important; }
    body:not(.dark-layout) .crm-admin-form .bs-stepper .bs-stepper-title { color: #475467; }
}

@media screen {
    .crm-admin-form .crm-avatar-help { font-size: 13px; line-height: 1.5; }
}

@media screen {
    .crm-admin-classification .classification-help { font-size: 13px; line-height: 1.5; color: #667085; }
    .dark-layout .crm-admin-classification .classification-help { color: #c1ccdc; }
    .crm-admin-classification .table { min-width: 760px; }
    .crm-admin-classification .table .form-check-label { font-weight: 400; }
    .crm-admin-classification .classification-actions,
    .crm-admin-classification .classification-admin-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    .crm-admin-classification .classification-actions .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 34px;
        font-size: 13px;
        white-space: nowrap;
    }
    .crm-admin-classification .classification-actions svg { width: 15px; height: 15px; }
    .crm-admin-classification .classification-icon-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        padding: 0;
        color: #6558d3;
        background: transparent;
        border: 1px solid #c7c1fa;
        border-radius: 6px;
    }
    .crm-admin-classification .classification-icon-action-danger { color: #d4455f; border-color: #efb2bd; }
    .crm-admin-classification .classification-icon-action svg { width: 15px; height: 15px; }
    .crm-admin-classification .classification-icon-action:hover,
    .crm-admin-classification .classification-icon-action:focus-visible { background: #f1efff; }
    .crm-admin-classification .classification-icon-action-danger:hover,
    .crm-admin-classification .classification-icon-action-danger:focus-visible { background: #fff1f3; }
    .dark-layout .crm-admin-classification .classification-icon-action {
        color: #b8b0ff;
        border-color: #675eae;
    }
    .dark-layout .crm-admin-classification .classification-icon-action-danger {
        color: #ff9aae;
        border-color: #874d5a;
    }
    .dark-layout .crm-admin-classification .classification-icon-action:hover,
    .dark-layout .crm-admin-classification .classification-icon-action:focus-visible { background: #354565; }
}

@media screen {
    .crm-role-form .card-header h3 { font-size: 18px; margin-bottom: 0; }
    .crm-role-form .form-check-inline { display: flex; align-items: flex-start; gap: 8px; margin-right: 0; }
    .crm-role-form .form-check-inline label { font-size: 14px; font-weight: 400; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
    .crm-role-form .form-check-input { flex-shrink: 0; margin: 3px 0 0; }
    .crm-role-form .form-check-inline i { font-size: 12px; margin-top: 4px; color: #667085; }
    .dark-layout .crm-role-form .form-check-inline i { color: #bac7da; }
}
@media screen and (max-width: 767.98px) {
    .crm-role-form > .sticky-top { position: static; }
}

/* Give tablet search its own row instead of overlapping account actions. */
@media screen and (min-width: 768px) and (max-width: 1439.98px) {
    body .crm-navbar .navbar-container { flex-wrap: wrap; }
    body .crm-navbar .crm-navbar-start, body .crm-navbar .bookmark-icons { display: contents !important; }
    body .crm-navbar .crm-navbar-search {
        position: relative; left: auto; top: auto; transform: none; order: 3; flex: 0 0 100%;
        width: 100%; max-width: none; min-width: 0; list-style: none;
    }
    body .crm-navbar .crm-navbar-actions { margin-left: auto !important; }
}
@media screen and (min-width: 768px) and (max-width: 1439.98px) {
    html body.vertical-layout.navbar-sticky .app-content.content {
        padding-top: calc(var(--crm-header-offset, 122px) + 16px) !important;
    }
}

@media screen {
    .crm-roles .roles-list-table { min-width: 600px; }
    .crm-roles .roles-list-table td:last-child > div { display: flex; flex-wrap: nowrap; gap: 8px; }
    .crm-roles .roles-list-table td:last-child a { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; min-height: 32px; }
}

@media screen {
    #changepasswordmodal .modal-dialog { max-width: min(500px, calc(100vw - 32px)); margin-left: auto; margin-right: auto; }
    #changepasswordmodal .modal-footer { padding-bottom: 0; }
}

@media screen {
    #assigntoispmodal .modal-dialog { max-width: min(500px, calc(100vw - 32px)); margin-left: auto; margin-right: auto; }
    #assigntoispmodal select[multiple] { min-height: 96px; }
}

@media screen {
    .crm-zone-form .btn .align-middle.d-none { display: inline-block !important; }
    .crm-zone-form .bs-stepper-title { font-size: 14px; }
    .crm-zone-form .bs-stepper .step-trigger { opacity: 1; }
    .dark-layout .crm-zone-form .bs-stepper-title { color: #c1ccdc; }
    .dark-layout .crm-zone-form .step.active .bs-stepper-title { color: #c2b5ff; }
}

@media screen {
    .dark-layout .crm-zone-form .divider-text span { background-color: #283046; color: #edf2fa; }
    .dark-layout .crm-zone-form .divider-text::before { background-color: #52627d; }
    .dark-layout .crm-zone-form .bs-stepper .step.active .bs-stepper-title { color: #c2b5ff !important; }
}

@media screen {
    .crm-zone-form span.error { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; }
    .dark-layout .crm-zone-form span.error { color: #ffb3bd !important; }
}

@media screen and (max-width: 767.98px) {
    .crm-zones .dataTables_empty { text-align: left !important; padding-left: 16px; }
}

@media screen {
    .crm-backup #general_tab > .row { margin-left: 0; margin-right: 0; max-width: 960px; }
    .crm-backup #general_tab .card-header:empty { display: none; }
    .crm-backup #general_tab #save_reseller_btn { margin-left: 20px; margin-bottom: 20px; }
    .crm-backup #location_form > .offset-md-4.col { margin-left: 0; width: auto; }
    .crm-balance-report .dt-action-buttons { gap: 12px; }
    .crm-balance-report .dataTables_filter { flex: 1 1 220px; min-width: 0; }
    .crm-balance-report .dataTables_filter label { width: 100%; }
    .crm-balance-report table.dataTable td.dataTables_empty { text-align: left; }
    .crm-ipv6-create.modal-slide-in .modal-dialog, .crm-ipv4-create.modal-slide-in .modal-dialog { width: 420px; max-width: 100%; }
    #isp-dashboard .system-freshness,
    #isp-dashboard .system-cpu-heading { font-size: 12px; line-height: 1.5; flex-wrap: wrap; }
    #isp-dashboard :is(#service-status-title, #system-resources-title, #gateway-status-title) {
        scroll-margin-top: calc(var(--crm-header-offset, 80px) + 16px);
    }
    .dark-layout .app-content .fc .fc-list-empty {
        background-color: #202d43;
        color: #d1dced;
    }
    body .app-content .fc :is(.fc-timegrid-slot-label-cushion, .fc-timegrid-axis-cushion) {
        font-size: 13px;
        line-height: 1.5;
    }
    body:not(.dark-layout) .app-content .fc :is(.fc-timegrid-slot-label-cushion, .fc-timegrid-axis-cushion) {
        color: #526078 !important;
    }
    body:not(.dark-layout) .app-content .fc .fc-toolbar .fc-button-group .fc-button-primary {
        color: #514582 !important;
        background-color: #f4f1ff !important;
        border-color: #d6cef0 !important;
    }
    body:not(.dark-layout) .app-content .fc .fc-toolbar .fc-button-group .fc-button-primary:not(:disabled):is(.fc-button-active, :hover) {
        color: #ffffff !important;
        background-color: #6252c7 !important;
        border-color: #6252c7 !important;
    }
    .dark-layout .app-content .fc :is(.fc-timegrid-slot-label-cushion, .fc-timegrid-axis-cushion) {
        color: #d1dced;
    }
    .dark-layout .app-content .fc .fc-toolbar .fc-button-group .fc-button-primary {
        color: #d1dced !important;
        background-color: #152136 !important;
        border-color: #52627d !important;
    }
    .dark-layout .app-content .fc .fc-toolbar .fc-button-group .fc-button-primary:not(:disabled):is(.fc-button-active, :hover) {
        color: #f1edff !important;
        background-color: #514681 !important;
        border-color: #9382e8 !important;
    }
}

/* Selected date ranges use a continuous, readable dark surface. */
@media screen {
    .dark-layout .flatpickr-calendar .flatpickr-day.inRange {
        background: #354565 !important;
        border-color: #354565 !important;
        color: #edf2fa !important;
        box-shadow: -5px 0 0 #354565, 5px 0 0 #354565 !important;
    }
}

/* Invoice search stays readable within the payment form. */
@media screen {
    #new-payment-modal .select2-search__field,
    #new-payment-modal .select2-results__option { font-size: 14px; line-height: 1.5; }
    .dark-layout #new-payment-modal .select2-results__option--highlighted {
        color: #edf2fa !important;
        background: #354565 !important;
    }
}

/* Payment credential hints remain readable without competing with field labels. */
@media screen {
    body:not(.dark-layout) #stripe_modal input::placeholder,
    body:not(.dark-layout) #paypal_modal input::placeholder,
    body:not(.dark-layout) #razor_modal input::placeholder,
    body:not(.dark-layout) #payu_modal input::placeholder {
        color: #64748b;
        opacity: 1;
    }
}

/* Keep table hints and result counts readable on light surfaces. */
@media screen {
    body:not(.dark-layout) .app-content .dataTables_info {
        color: #667085 !important;
    }
    body:not(.dark-layout) .app-content .dataTables_filter input::placeholder {
        color: #667085 !important;
        opacity: 1;
    }
}

/* Shared application dialogs: use the active CRM theme, including Livewire warnings. */
@media screen {
    #allocate-product-modal .select2-selection__rendered,
    #allocate-product-modal .select2-search__field,
    #allocate-product-modal .select2-results__option {
        font-size: 14px !important;
        line-height: 1.5;
    }
    .new-bandwidth-modal .input-group-append select.form-control,
    .new-quota-modal .input-group-append select.form-control,
    #add_group_modal .input-group-append select.form-control,
    .crm-tariff-form .input-group-append select.form-control {
        min-width: 88px;
        padding-right: 28px;
    }
    .crm-tariff-form input::placeholder,
    .crm-tariff-form textarea::placeholder { color: #667085; opacity: 1; }
    .dark-layout .crm-tariff-form input::placeholder,
    .dark-layout .crm-tariff-form textarea::placeholder { color: #d1dced; }
    .crm-tariff-form .custom-switch { margin-bottom: 12px; }
    .nas-management input::placeholder { color: #667085; opacity: 1; }
    .nas-management .select2-selection__rendered,
    .nas-management .select2-results__option { font-size: 14px !important; }
    .dark-layout .nas-management input::placeholder { color: #d1dced; }
    .tariff-addon-toolbar { gap: 12px; }
    .tariff-addon-toolbar input::placeholder { color: #667085; opacity: 1; }
    .dark-layout .tariff-addon-toolbar input::placeholder { color: #d1dced; }
    .crm-addon-form .bootstrap-duallistbox-container .box1,
    .crm-addon-form .bootstrap-duallistbox-container .box2 { margin-bottom: 16px; }
    .crm-addon-form .bootstrap-duallistbox-container label { font-size: 13px; }
    .crm-addon-form .bootstrap-duallistbox-container .info { font-size: 12px; }
    .crm-addon-form .bootstrap-duallistbox-container select { font-size: 14px; }
    .crm-addon-form .bootstrap-duallistbox-container input::placeholder { color: #667085; opacity: 1; }
    .dark-layout .crm-addon-form .bootstrap-duallistbox-container input::placeholder { color: #d1dced; }
    .dark-layout .crm-addon-form .bootstrap-duallistbox-container .btn {
        color: #edf2fa;
        background: #26354e;
        border-color: #52617a;
    }
    body .swal2-container { z-index: 12000; }
    body .swal2-container .swal2-popup {
        font-family: inherit;
        font-size: 14px;
        border: 1px solid #d6dce8;
        border-radius: 12px;
    }
    body .swal2-container .swal2-popup .swal2-title { font-size: 20px; line-height: 1.4; font-weight: 600; }
    body .swal2-html-container, body .swal2-content { font-size: 14px; line-height: 1.6; }
    body .swal2-actions { gap: 10px; }
    body .swal2-actions button { font-size: 14px; min-height: 38px; }
    body .swal2-actions .swal2-confirm { background: #7367f0; color: #fff; }
    body .swal2-actions button:focus-visible,
    body .swal2-close:focus-visible { outline: 2px solid #9e94ff; outline-offset: 3px; }
    body .swal2-popup { max-width: calc(100vw - 32px); }
    body .swal2-html-container, body .swal2-content { overflow-wrap: anywhere; }
    .dark-layout .swal2-popup {
        background: #202d43 !important;
        color: #edf2fa !important;
        border-color: #52627d;
    }
    .dark-layout .swal2-title { color: #edf2fa !important; }
    .dark-layout .swal2-html-container,
    .dark-layout .swal2-content,
    .dark-layout .swal2-footer { color: #d1dced !important; }
    .dark-layout .swal2-input,
    .dark-layout .swal2-textarea,
    .dark-layout .swal2-select { background: #152136; color: #edf2fa; border-color: #56627a; }
    .dark-layout .swal2-validation-message { background: #152136; color: #f0a5b5; }
    .dark-layout .swal2-close { color: #d1dced; }
    .dark-layout .swal2-actions .swal2-cancel,
    .dark-layout .swal2-actions .swal2-cancel:not(:disabled):not(.disabled):focus,
    .dark-layout .swal2-actions .swal2-cancel:not(:disabled):not(.disabled):active {
        background: #354565;
        color: #edf2fa;
        border: 1px solid #52627d;
    }
}

/* Leave room for the floating Back to top control beside preview actions. */
@media screen and (max-width: 575.98px) {
    #invoice_tab .document-preview-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        padding-right: 44px;
    }
    #invoice_tab .document-preview-caption { grid-column: 1 / -1; }
    #invoice_tab .document-preview-toolbar select { width: 100%; min-width: 0; }
}

/* Read-only date inputs still open a picker and must remain readable. */
@media screen {
    .dark-layout #invoice_tab .invoice-layout-picker > legend {
        color: #d1dced;
        font-size: 13px;
        font-weight: 500;
    }
    /* Unselected delivery channels do not disable their template controls. */
    #basic-tabs-components #notificationtab .muted-field { opacity: 1; }
    body:not(.dark-layout) #filter_invoices #filter-date-range[readonly] {
        background: #fff;
        color: #344054;
    }
    body:not(.dark-layout) #filter_invoices #filter-date-range::placeholder {
        color: #667085;
        opacity: 1;
    }
}

/* Feature and permission trees share the CRM control typography. */
@media screen {
    body .jstree-default .jstree-anchor { font-size: 14px; }
    .dark-layout .jstree-default .jstree-anchor { color: #d1dced !important; }
    .dark-layout .jstree-default .jstree-hovered,
    .dark-layout .jstree-default .jstree-clicked { background: #354565; color: #edf2fa; }
}

@media screen {
    .crm-license-form #full-wrapper,
    .crm-license-form #full-container { width: 100%; height: auto !important; }
    .crm-license-form .ql-container { height: 220px !important; }
}

@media screen {
    .crm-license-list table.dataTable td.dataTables_empty { text-align: left; }
}

@media screen {
    #filter_plans[aria-labelledby='roleFilterTitle'] .modal-footer span { font-size: 13px; line-height: 1.5; }
}

@media screen {
    #copyModal[aria-labelledby='copyRoleTitle'] .select2-search--inline { width: 100%; }
    #copyModal[aria-labelledby='copyRoleTitle'] .select2-search__field { width: 100% !important; font-size: 14px; background: transparent; }
    .dark-layout #copyModal[aria-labelledby='copyRoleTitle'] .select2-search__field::placeholder { color: #d1dced; opacity: 1; }
}

@media screen {
    .crm-admin-classification .select2-selection__rendered { font-size: 14px; }
}


@media screen {
    .admin-logs-table th,
    .admin-logs-table td:nth-child(1),
    .admin-logs-table td:nth-child(4),
    .admin-logs-table td:nth-child(6) { white-space: nowrap; }
}


@media screen {
    .new-lead-modal .select2-search--inline { width: 100%; }
    .new-lead-modal .select2-search__field { width: 100% !important; font-size: 14px !important; background: transparent !important; }
    .dark-layout .new-lead-modal .select2-search__field::placeholder { color: #d1dced; opacity: 1; }
}


@media screen {
    .new-lead-modal .select2-results__option { font-size: 14px; line-height: 1.5; }
}


@media screen {
    .dark-layout .new-lead-modal .select2-results__option--highlighted { color: #edf2fa !important; background: #354565 !important; }
}


@media screen {
    .dark-layout #modals-slide-in.new-lead-modal .select2-selection__choice,
    .dark-layout #modals-slide-in.new-lead-modal .select2-selection__choice__remove { color: #edf2fa !important; }
}


@media screen {
    .crm-leads table.dataTable td.dataTables_empty { text-align: left; }
}


@media screen {
    .crm-leads .lead-summary-label { font-size: 13px; font-weight: 600; line-height: 1.5; color: #475467; }
    .dark-layout .crm-leads .lead-summary-label { color: #d1dced; }
}


@media screen {
    .crm-leads #select2-status_filter-container,
    .crm-leads .select2-results__option { font-size: 14px; line-height: 1.5; }
}


@media screen {
    .crm-trai-report table.dataTable td.dataTables_empty,
    .crm-wallet table.dataTable td.dataTables_empty,
    .crm-invoices table.dataTable td.dataTables_empty,
    .crm-service-transactions table.dataTable td.dataTables_empty,
    .crm-api-logs table.dataTable td.dataTables_empty,
    .crm-login-logs table.dataTable td.dataTables_empty,
    .crm-sms-logs table.dataTable td.dataTables_empty,
    .crm-session-logs table.dataTable td.dataTables_empty,
    .crm-renew-logs table.dataTable td.dataTables_empty,
    .crm-inventory-products table.dataTable td.dataTables_empty,
    .tariff-management table.dataTable td.dataTables_empty,
    .crm-payment-logs table.dataTable td.dataTables_empty { text-align: left; }
    .crm-invoices table.dataTable tbody td:first-child:not(.dataTables_empty),
    .crm-invoices table.dataTable tbody td:nth-child(2) { white-space: nowrap; }
    .view_invoice_body .crm-invoice-metadata { font-size: 14px; line-height: 1.5; }
    .view_invoice_body .crm-invoice-metadata dd { overflow-wrap: anywhere; margin-bottom: 8px; }
    .crm-login-logs .select2-results__option,
    .crm-login-logs .select2-selection__rendered,
    .crm-login-logs .select2-selection__choice,
    .crm-login-logs .select2-search__field { font-size: 14px !important; line-height: 1.5; }
    .dark-layout .crm-login-logs .select2-results__option--highlighted { color: #edf2fa !important; background: #354565 !important; }
    .dark-layout .crm-login-logs #search_row .select2-selection__choice { color: #edf2fa !important; background: #354565 !important; border-color: #536783 !important; }
    .dark-layout .crm-login-logs #search_row .select2-selection__choice__remove { color: #d1dced !important; }
    #add_new_group_modal .select2-search--inline { width: 100%; }
    #add_new_group_modal .select2-search__field { width: 100% !important; font-size: 14px !important; background: transparent !important; }
    .dark-layout #add_new_group_modal .select2-search__field::placeholder { color: #d1dced; opacity: 1; }
    #add_new_group_modal .select2-results__option { font-size: 14px; line-height: 1.5; }
    .dark-layout #add_new_group_modal .select2-results__option--highlighted { color: #edf2fa !important; background: #354565 !important; }
    .dark-layout #add_new_group_modal .select2-selection__choice,
    .dark-layout #add_new_group_modal .select2-selection__choice__remove { color: #edf2fa !important; }
}

@media screen {
    .flatpickr-calendar.crm-dotnatlog-datetime-picker.hasTime .flatpickr-time {
        height: 40px;
        border-top: 1px solid #d8dee9;
    }
    .dark-layout .flatpickr-calendar.crm-dotnatlog-datetime-picker.hasTime .flatpickr-time {
        border-top-color: #42516a;
    }
    .dark-layout .flatpickr-calendar .flatpickr-time input,
    .dark-layout .flatpickr-calendar .flatpickr-time .flatpickr-time-separator,
    .dark-layout .flatpickr-calendar .flatpickr-time .flatpickr-am-pm {
        color: #edf2fa !important;
        background: #202d43;
    }
    .dark-layout .flatpickr-calendar .flatpickr-time input:hover,
    .dark-layout .flatpickr-calendar .flatpickr-time input:focus,
    .dark-layout .flatpickr-calendar .flatpickr-time .flatpickr-am-pm:hover,
    .dark-layout .flatpickr-calendar .flatpickr-time .flatpickr-am-pm:focus {
        background: #354565 !important;
    }
}

@media screen and (max-width: 767.98px) {
    .crm-trai-report .dataTables_filter { padding: 0 12px; }
    .crm-trai-report .dataTables_filter label { display: flex; align-items: center; width: 100%; gap: 8px; }
    .crm-trai-report .dataTables_filter input { width: 100% !important; min-width: 0; margin-left: 0 !important; }
}
@media screen {
    #sendtestsmsmodal .select2-selection__rendered,
    #sendtestsmsmodal .select2-results__option,
    #sendtestsmsmodal .select2-search__field { font-size: 14px !important; }
    .dark-layout #sendtestsmsmodal .select2-results__option--highlighted { color: #edf2fa !important; background: #354565 !important; }
}
