body.dark-mode {
    --primary:      #3b82f6;
    --primary-dark: #2563eb;

    --primary-1:    rgba(59,130,246,0.15);
    --primary-2:    rgba(59,130,246,0.25);
    --primary-3:    rgba(59,130,246,0.45);
    --primary-4:    rgba(59,130,246,0.08);

    --bg-app:       #020617;
    --white:        #0b1220;

    --black:        #f8fafc;
    --text1:        #e5e7eb;

    --gray:         #1e293b;
    --lightblue:    #0b1220;
    --lightblue2:   #020617;

    --border-soft:  #1e293b;
    --border:       #334155;

    
    --lbl1:         #a9ffb6;
    --lbl2:         #83c7ff;
    --lbl3:         #f8adff;
    --lbl4:         #ffdeaf;
    --lbl5:         #9cabff;


    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    --border-color: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --brand-primary: #3b82f6;
    --brand-hover: #2563eb;
    --event-blue-bg: rgba(59, 130, 246, 0.2);
    --event-blue-text: #60a5fa;
    --event-green-bg: rgba(16, 185, 129, 0.2);
    --event-green-text: #34d399;
    --event-pink-bg: rgba(236, 72, 153, 0.2);
    --event-pink-text: #f472b6;
    --light-border: #858585;
}

body.dark-mode {
    background-color: var(--bg-body);
    color: var(--text-main);
}

body.dark-mode .app-header {
    background-color: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

body.dark-mode .app-main > aside {
    background-color: var(--bg-body);
    border-left: 1px solid var(--border-color);
}

body.dark-mode .app-header svg {
    stroke: var(--black);
    fill: none;
}

body.dark-mode table,
body.dark-mode th {
    background: var(--white);
    color: var(--white)
}

body.dark-mode td {
    background: #020617;
    color: #e5e7eb;
}

body.dark-mode #screen-event-card .results .table-head {
    color: #e5e7eb;
}

body.dark-mode #screen-event-card .results .table-head,
body.dark-mode #screen-event-card .results .table-head>div,
body.dark-mode #screen-event-card .results .table-row>div,
body.dark-mode #screen-event-card .results .table-row  {
    border-color: var(--table-border-outline, var(--border-soft));
}

#iconSun {
    display: none;
}

body.dark-mode #iconMoon {
    display: none;
}

body.dark-mode #iconSun {
    display: inline-block;
}

body.dark-mode .col-crmstatus,
body.dark-mode .text-blue-600,
body.dark-mode select.input,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .input,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child input,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child select,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child textarea,
body.dark-mode #screen-leads .timeline-card-content,
body.dark-mode .modal-card input,
body.dark-mode .modal-card textarea,
body.dark-mode .profile-actions>button,
body.dark-mode #user-modal .modal-footer .btn-cancel,
body.dark-mode #user-modal .btn-close,
body.dark-mode #screen-user-profile .label,
body.dark-mode #screen-user-profile .value,
body.dark-mode .filters-grid .label,
body.dark-mode .filters-grid .input,
body.dark-mode .meeting-modal-close,
body.dark-mode .meeting-modal .actions .btn.btn-outline:hover,
body.dark-mode .meeting-modal .actions .btn#meeting-add-task-btn:hover,
body.dark-mode .meeting-modal.is-open .meeting-form .form-tab-panel .field input,
body.dark-mode .meeting-modal.is-open .meeting-form .form-tab-panel .field select,
body.dark-mode .meeting-modal.is-open .meeting-form .body.dark-mode .form-tab-panel .field textarea,
body.dark-mode .day-meetings-close,
body.dark-mode #screen-events .meeting-pill,
body.dark-mode #screen-leads .table-row > div[data-label="╫₧╫º╫ò╫¿"] > span,
body.dark-mode .status-label,
body.dark-mode .status-badge,
body.dark-mode .lead-crmstatus-label,
body.dark-mode .col-crmstatus, body.dark-mode .col-crmstatus select.input,
body.dark-mode .popup-close,
body.dark-mode .meta-item,
body.dark-mode .btn-secondary-action:hover,
body.dark-mode .crm-toast,
body.dark-mode .crm-toast-title,
body.dark-mode .tw-time-input-wrapper input,
body.dark-mode #screen-feedback #dateLabel,
body.dark-mode .fas.fa-chevron-down,
body.dark-mode #screen-feedback .date-dropdown.open,
body.dark-mode .mtg-card-info h4,
body.dark-mode #screen-event-card .diary-module.meeting-three-col textarea,
body.dark-mode .diary-day-tooltip.diary-day-tooltip-meetings .diary-meeting-tooltip-row,
body.dark-mode #screen-event-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.dark-mode #screen-event-card .input:not(textarea),
body.dark-mode #screen-event-card select,
body.dark-mode #screen-event-card .event-order-tab-panel .order-vat-form-group .order-vat-mode-select,
body.dark-mode #screen-event-card .event-order-tab-panel .order-quote-notes-content textarea.input,
body.dark-mode .documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-tag-chip,
body.dark-mode .documents-editor-container.print-preview-modal .modal-close,
body.dark-mode #screen-leads .table-row > div[data-label="מקור"] > span {
    color: var(--white) !important;
}

body.dark-mode .page-title,
body.dark-mode .kpi-card .kpi-label,
body.dark-mode .kpi-card.income>span,
body.dark-mode .card-title,
body.dark-mode .total-badge,
body.dark-mode .table-row,
body.dark-mode .event-desktop-tab-item,
body.dark-mode label,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child .input:focus,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child input:focus,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child select:focus,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child textarea,
body.dark-mode .table-head > div,
body.dark-mode #screen-leads .lead-details .editor-topbar .editor-title,
body.dark-mode #screen-leads .lead-details select.input.lead-main-crmstatus,
body.dark-mode .calendar-cell.head,
body.dark-mode .calendar-view-btn.active,
body.dark-mode #screen-feedback .feedback-modern,
body.dark-mode #screen-feedback .modal-title,
body.dark-mode .table-row:hover,
body.dark-mode #user-modal .modal-footer .btn-save,
body.dark-mode #user-modal .btn-close:hover,
body.dark-mode #screen-user-profile .info-item:hover .info-text>span,
body.dark-mode .user-details *,
body.dark-mode #switchUserRail .switch-user-close,
body.dark-mode #switchUserRail .switch-user-desc,
body.dark-mode #switchUserRail .user-info-row .fa-chevron-left,
body.dark-mode .meeting-modal .actions .btn.btn-primary,
body.dark-mode .meeting-modal .actions .btn#lead-save-main,
body.dark-mode .meeting-modal.is-open .meeting-form .form-tab-panel .field input:focus,
body.dark-mode .meeting-modal.is-open .meeting-form .form-tab-panel .field select:focus,
body.dark-mode .meeting-modal.is-open .meeting-form .form-tab-panel .field textarea:focus,
body.dark-mode .meeting-modal-title, .event-modal-title,
body.dark-mode .day-meetings-title,
body.dark-mode .day-meetings-close:hover,
body.dark-mode [data-tooltip]::before,
body.dark-mode .screen-header,
body.dark-mode .calendar-mini-day.active,
body.dark-mode .tw-ddl-item.selected,
body.dark-mode .meeting-pill,
body.dark-mode .calendar-cell.today .cell-day,
body.dark-mode .tasks-panel-active .tasks-panel-title,
body.dark-mode .zone-title,
body.dark-mode .popup-title,
body.dark-mode .btn-primary-done,
body.dark-mode .entity-actions .btn-icon-action,
body.dark-mode .task-list-edit-icon,
body.dark-mode .card-header-inner,
body.dark-mode .table-title-text,
body.dark-mode .inline-editable-input.is-editing,
body.dark-mode #screen-feedback .stat-title,
body.dark-mode #screen-feedback .review-details-desktop>div:first-child,
body.dark-mode #screen-feedback .sb-mid span,
body.dark-mode #screen-event-card .event-desktop-title,
body.dark-mode #screen-event-card .section-title,
body.dark-mode #screen-event-card .section-title i,
body.dark-mode .fas.fa-chevron-down.lsd-select-icon,
body.dark-mode .event-card-overlay-close.is-active,
body.dark-mode .mtg-sb-blue,
body.dark-mode #screen-event-card .diary-module.meeting-three-col .meeting-list-new-btn,
body.dark-mode .mtg-att-btn.mtg-att-pending,
body.dark-mode #screen-event-card .diary-module.meeting-three-col textarea:focus,
body.dark-mode #screen-event-card .event-order-tab-panel .order-lines-actions-row .order-btn-add,
body.dark-mode #screen-event-card .event-order-tab-panel .order-section-title,
body.dark-mode #screen-event-card .event-order-tab-panel .order-table-row.lines-grid input,
body.dark-mode #screen-event-card .event-order-tab-panel .order-quote-notes-content textarea.input:focus,
body.dark-mode #screen-event-card .event-card-section .event-payments-tab-panel .order-table-row input,
body.dark-mode #screen-event-card .event-card-section .event-payments-tab-panel .order-table-row select.input,
body.dark-mode #screen-event-card .event-tasks-card .lead-inline-task-form .lead-reminder-add-row input,
body.dark-mode .documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-panel-title {
    color: var(--black) !important;
}

body.dark-mode .diary-info-box p {
    color: var(--placeholder) !important;
}

body.dark-mode .top-btn.is-active,
body.dark-mode .btn-action,
body.dark-mode #screen-event-card .event-card-section .form-tabs-content > .form-tab-panel:first-child select,
body.dark-mode .tw-dp-trigger,
body.dark-mode .leads-history-row.timeline-item,
body.dark-mode #screen-leads .timeline-card-content,
body.dark-mode .tw-time-popover.tw-time-clock-picker .tw-picker-header,
body.dark-mode .task-card-assignee,
body.dark-mode .bell-icon-wrapper,
body.dark-mode .crm-toast,
body.dark-mode .tw-time-input-wrapper input,
body.dark-mode #screen-event-card .order-table-row .phone-delete,
body.dark-mode .tw-dp-foot-btn {
    background-color: var(--black) !important;
}

body.dark-mode .top-btn.is-active svg {
    stroke: var(--bg-app);
}

body.dark-mode #screen-leads .table-row > div[data-label="╫í╫ò╫Æ"] > span[data-lead-source="in-call"],
body.dark-mode #screen-leads .table-row > div[data-label="╫í╫ò╫Æ"] > span[data-lead-source="answered"] {
    --lead-source-color: #4CAF50;
}

body.dark-mode #screen-leads .table-row > div[data-label="╫ò╫ò╫É╫ÿ╫í╫É╫ñ"] .lead-whatsapp-cell-btn,
body.dark-mode #screen-leads .table-row > div[data-label="סוג"] > span[data-lead-source="in-call"],
body.dark-mode #screen-leads .table-row > div[data-label="סוג"] > span[data-lead-source="answered"],
body.dark-mode #screen-leads .table-row > div[data-label="וואטסאפ"] .lead-whatsapp-cell-btn {
    color: #4CAF50;
}

body.dark-mode #screen-leads .table-row > div[data-label="╫í╫ò╫Æ"] > span[data-lead-source="message"] {
    --lead-source-color: #5080f4;
}

body.dark-mode .status-label,
body.dark-mode .status-badge,
body.dark-mode .lead-crmstatus-label,
body.dark-mode .col-crmstatus,
body.dark-mode .col-crmstatus select.input {
    --status-bg: color-mix(in srgb, var(--status-color) 10%, var(--black));
}

body.dark-mode optgroup,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .comments-add textarea.input,
body.dark-mode #switchUserRail .user-card,
body.dark-mode .nav-link.active:hover,
body.dark-mode #screen-event-card .event-order-tab-panel .order-top-actions-bar .btn,
body.dark-mode #screen-event-card .event-payments-tab-panel .order-top-actions-bar .btn,
body.dark-mode #screen-event-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.dark-mode #screen-event-card .input:not(textarea),
body.dark-mode #screen-event-card select {
    border-color: var(--black) !important;
}

body.dark-mode .event-desktop-header,
body.dark-mode .screen-header-actions,
body.dark-mode input:focus,
body.dark-mode #screen-leads .lead-details input.input.lead-main-name,
body.dark-mode .modal-card,
body.dark-mode .crm-toast-icon-box {
    background: var(--white) !important;
}

body.dark-mode .status-label {
    border: 1px solid !important;
}

body.dark-mode .table-row:hover {
    background: rgb(0 0 0 / 50%);
}

body.dark-mode .nav-link:hover {
    background-color: var(--bg-hover);
    color: var(--text-main);
}

body.dark-mode .nav-link.nav-link-disabled::after {
    color: var(--black);
    background: var(--brand-primary);
    border-color: var(--brand-primary);
}

body.dark-mode .calendar-nav-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
}

body.dark-mode .nav-link.active,
body.dark-mode .nav-link.active:hover,
body.dark-mode .btn,
body.dark-mode .calendar-nav-tab.active,
body.dark-mode #screen-event-card .results .table-head,
body.dark-mode #screen-event-card .event-card-table-footer,
body.dark-mode #screen-leads .leads-layout .table-head,
body.dark-mode #screen-leads .leads-table-footer,
body.dark-mode #screen-users .table-head,
body.dark-mode .diary-cal-day.is-today.active {
    color: var(--black) !important;
    background-color: var(--brand-primary);
}

body.dark-mode .calendar-nav-tab.active,
body.dark-mode #screen-event-card .event-order-tab-panel .order-top-actions-bar .btn.primary,
body.dark-mode #screen-event-card .event-payments-tab-panel .order-top-actions-bar .btn.primary {
    border-color: var(--brand-primary) !important;
}

body.dark-mode #screen-users .btn-icon.btn-profile {
    filter: brightness(0) invert(1);
}

body.dark-mode #screen-feedback .stat-value {
    color: var(--primary);
}

body.dark-mode .btn svg,
body.dark-mode #screen-leads .lead-name-edit-btn.btn.icon-only svg,
body.dark-mode #screen-leads .btn.icon-only.inline-edit-icon svg,
body.dark-mode .order-line-delete-btn svg,
body.dark-mode .event-quick-note-fab svg,
body.dark-mode #screen-event-card .event-order-tab-panel .order-lines-actions-row .order-btn-add svg {
    stroke: var(--black) !important;
}

body.dark-mode #screen-leads .lead-details .lead-details-header-actions .btn:last-child svg {
    stroke: var(--white) !important;
}

body.dark-mode #screen-leads .table-row > div[data-label="╫ö╫ó╫¿╫ò╫¬"] .btn.icon-only.inline-edit-icon svg,
body.dark-mode .btn.icon-only.task-edit-icon svg,
body.dark-mode .btn.icon-only.task-edit-icon i {
    color: var(--black);
}

body.dark-mode .screen-header>svg,
body.dark-mode #screen-feedback .page-title svg {
    background-color: transparent;
}

body.dark-mode input {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

body.dark-mode .tasks-panel-header,
body.dark-mode #screen-event-card .section-title,
body.dark-mode #screen-event-card .diary-module.meeting-three-col .mtg-card{
    border-color: var(--text-main);
}

body.dark-mode #screen-event-card .diary-module.meeting-three-col .mtg-card {
    border-right-color: var(--brand-primary);
}

body.dark-mode .nav-link,
body.dark-mode .search-input::placeholder,
body.dark-mode .calendar-view-btn,
body.dark-mode .cell-hebrew,
body.dark-mode .summary-status-label,
body.dark-mode .calendar-mini-day-header,
body.dark-mode .lead-hint-text,
body.dark-mode .task-list-meta-info,
body.dark-mode .lead-reminder-popup .task-name,
body.dark-mode .task-list-item.task-done .task-list-title,
body.dark-mode #screen-feedback .review-card >div:nth-child(2) span,
body.dark-mode #screen-event-card .event-desktop-meta,
body.dark-mode #screen-event-card .event-fin-label,
body.dark-mode .placeholder-content,
body.dark-mode .diary-cal-day-name,
body.dark-mode #screen-event-card .event-order-tab-panel .order-summary-row .leads-history-meta,
body.dark-mode #screen-event-card .event-tasks-empty,
body.dark-mode #screen-event-card .event-task-meta {
    color: var(--text-muted) !important;
}

body.dark-mode .calendar-view-btn,
body.dark-mode .meeting-modal .actions .btn.btn-outline,
body.dark-mode #screen-event-card .diary-module.meeting-three-col .meeting-list-new-btn {
    border: 1px solid var(--border-color) !important;
}

body.dark-mode .module-locked-overlay {
    background: rgba(15, 23, 42, 0.32);
}

body.dark-mode .module-locked-card {
    background: var(--white);
    border-color: var(--primary);
}

body.dark-mode .module-locked-icon-wrap {
    background: var(--bg-app);
    color: var(--black);
}

body.dark-mode .module-locked-module-name,
body.dark-mode .module-locked-title {
    color: var(--black);
}

body.dark-mode .calendar-grid,
body.dark-mode .calendar-mini,
body.dark-mode .calendar-summary-card,
body.dark-mode .kpi-card,
body.dark-mode .chart-card,
body.dark-mode .card,
body.dark-mode .tasks-panel,
body.dark-mode .tasks-panel-completed,
body.dark-mode #screen-feedback .stat-card,
body.dark-mode #screen-feedback .filters-bar,
body.dark-mode #screen-feedback .review-card,
body.dark-mode #screen-event-card .event-fin-widget,
body.dark-mode #screen-event-card .event-card-section.event-timeline-card,
body.dark-mode #screen-event-card .form-section,
body.dark-mode #screen-event-card .diary-module.meeting-three-col .diary-calendar-widget,
body.dark-mode #screen-event-card .diary-module.event-three-col .diary-visuals,
body.dark-mode #screen-event-card .diary-visuals, body.dark-mode #screen-event-card .diary-form,
body.dark-mode #screen-event-card .diary-module.event-three-col .meeting-calendar-col .diary-calendar-widget,
body.dark-mode #screen-event-card .event-order-tab-panel .order-section-box,
body.dark-mode #screen-event-card .event-card-section .event-payments-tab-panel .order-table,
body.dark-mode #screen-event-card .event-tasks-card .lead-inline-task-form,
body.dark-mode #screen-event-card .event-tasks-col:first-child,
body.dark-mode .documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-category-card {
    background-color: var(--bg-card);
    border: 1px solid #334155;
}

body.dark-mode #screen-event-card .diary-module.meeting-three-col .mtg-card {
    background: #cce5ff;
}

body.dark-mode #screen-event-card .diary-module.meeting-three-col .diary-visuals,
body.dark-mode #screen-event-card .diary-module.meeting-three-col .diary-form {
    border-inline-color: var(--border-color);
}

body.dark-mode #screen-event-card .event-order-tab-panel .order-top-actions-bar,
body.dark-mode #screen-event-card .event-payments-tab-panel .order-top-actions-bar,
body.dark-mode #screen-event-card .event-card-section .event-order-tab-panel .order-table-head,
body.dark-mode #screen-event-card .event-order-tab-panel .order-summary-row,
body.dark-mode #screen-event-card .event-tasks-col-header,
body.dark-mode #screen-event-card .event-task-card .lead-task-edit-btn,
body.dark-mode .documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-category-header,
body.dark-mode .documents-editor-container.print-preview-modal .event-menu-doc-body .event-menu-dish-row {
    border-color: var(--light-border);
}

body.dark-mode #screen-event-card .event-order-tab-panel .order-lines-actions-row .order-btn-add {
    border: 1px solid var(--black) !important;
}

body.dark-mode .calendar-cell.head,
body.dark-mode #screen-event-card .event-card-table-footer,
body.dark-mode #screen-leads .leads-layout .table-head,
body.dark-mode #screen-leads .leads-table-footer,
body.dark-mode #screen-users .table-head,
body.dark-mode #screen-event-card .results .table-head,
body.dark-mode .calendar-cell.head:hover,
body.dark-mode #screen-event-card .event-tasks-card .lead-inline-task-form {
    background: var(--bg-card);
}

body.dark-mode #screen-event-card .order-table-row .phone-delete svg {
    stroke: var(--red) !important;
}

body.dark-mode #screen-event-card .event-tasks-col:last-child {
    background: #324159;
}

/* Digital Invitation Templates Checkboxes (Dark Mode) */
body.dark-mode #screen-event-card .digital-invite-templates .checkbox-label {
    background: linear-gradient(135deg, #2a3f5f 0%, #1e2d42 100%);
    border-color: #3d5a7f;
}

body.dark-mode #screen-event-card .digital-invite-templates .checkbox-label:hover {
    background: linear-gradient(135deg, #344d6f 0%, #253852 100%);
    border-color: #5a7fa8;
    box-shadow: 0 4px 12px rgba(90, 127, 168, 0.2);
}

body.dark-mode #screen-event-card .digital-invite-templates .checkbox-label .checkmark {
    background: #1e2d42;
    border-color: #4a5f7f;
}

body.dark-mode #screen-event-card .digital-invite-templates .checkbox-label input[type="checkbox"]:checked ~ .checkmark {
    background: linear-gradient(135deg, #5a7fa8 0%, #4a6f98 100%);
    border-color: #5a7fa8;
    box-shadow: 0 0 0 4px rgba(90, 127, 168, 0.15);
}

body.dark-mode #screen-event-card .digital-invite-templates .checkbox-label .checkbox-text {
    color: #cbd5e0;
}

body.dark-mode #screen-event-card .digital-invite-templates .checkbox-label:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, #5a7fa8 0%, #4a6f98 100%);
    border-color: #6a8fb8;
    box-shadow: 0 4px 16px rgba(90, 127, 168, 0.3);
}

body.dark-mode #screen-event-card .digital-invite-templates .checkbox-label:has(input[type="checkbox"]:checked):hover {
    background: linear-gradient(135deg, #6a8fb8 0%, #5a7fa8 100%);
}

body.dark-mode #screen-event-card .digital-invite-templates .checkbox-label input[type="checkbox"]:checked ~ .checkbox-text {
    color: #ffffff;
}

body.dark-mode #screen-event-card .ec-summary-dashboard {
    background: var(--white);
    border-color: var(--primary);
}

body.dark-mode #screen-event-card .ec-summary-icon {
    background: var(--bg-app);
    color: var(--primary);
}

body.dark-mode #screen-event-card .ec-summary-row-profit .ec-summary-icon {
    background: var(--bg-app);
    color: var(--lbl14);
}

body.dark-mode #screen-event-card .ec-summary-row-profit {
    border-color: var(--light-border);
}

body.dark-mode #screen-event-card .ec-summary-cell::after {
    background: var(--light-border);
}

body.dark-mode #screen-event-card .ec-summary-value {
    color: var(--black);
}

body.dark-mode #screen-event-card .ec-summary-value-profit {
    color: var(--black);
}

body.dark-mode #screen-event-card .event-payments-tab-panel .ec-docs-actions-bar {
    border-color: var(--light-border);
}