@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap);*{box-sizing:border-box;padding:0}*,body{margin:0}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,Outfit,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}html{scroll-behavior:smooth}::-webkit-scrollbar{height:8px;width:8px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#888;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#555}::view-transition-new(root),::view-transition-old(root){animation:none;mix-blend-mode:normal}::view-transition-old(root){z-index:1}::view-transition-new(root){z-index:9999}.react-flow__attribution{display:none}.react-flow{direction:ltr}.react-flow__container{height:100%;left:0;position:absolute;top:0;width:100%}.react-flow__pane{cursor:grab;z-index:1}.react-flow__pane.selection{cursor:pointer}.react-flow__pane.dragging{cursor:grabbing}.react-flow__viewport{pointer-events:none;transform-origin:0 0;z-index:2}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow .react-flow__edges{overflow:visible;pointer-events:none}.react-flow__connection-path,.react-flow__edge-path{stroke:#b1b1b7;stroke-width:1;fill:none}.react-flow__edge{cursor:pointer;pointer-events:visibleStroke}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge:focus .react-flow__edge-path,.react-flow__edge:focus-visible .react-flow__edge-path{stroke:#555}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge-textbg{fill:#fff}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__connectionline{z-index:1001}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{box-sizing:border-box;cursor:grab;pointer-events:all;position:absolute;transform-origin:0 0;-webkit-user-select:none;user-select:none}.react-flow__node.dragging{cursor:grabbing}.react-flow__nodesselection{pointer-events:none;transform-origin:left top;z-index:3}.react-flow__nodesselection-rect{cursor:grab;pointer-events:all;position:absolute}.react-flow__handle{background:#1a192b;border:1px solid #fff;border-radius:100%;height:6px;min-height:5px;min-width:5px;pointer-events:none;position:absolute;width:6px}.react-flow__handle.connectionindicator{cursor:crosshair;pointer-events:all}.react-flow__handle-bottom{bottom:-4px;left:50%;top:auto;transform:translate(-50%)}.react-flow__handle-top{left:50%;top:-4px;transform:translate(-50%)}.react-flow__handle-left{left:-4px;top:50%;transform:translateY(-50%)}.react-flow__handle-right{right:-4px;top:50%;transform:translateY(-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{margin:15px;position:absolute;z-index:5}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translateX(-50%)}.react-flow__attribution{background:#ffffff80;font-size:10px;margin:0;padding:2px 3px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{height:100%;pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;width:100%}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-default,.react-flow__node-group,.react-flow__node-input,.react-flow__node-output{background-color:#fff;border:1px solid #1a192b;border-radius:3px;color:#222;font-size:12px;padding:10px;text-align:center;width:150px}.react-flow__node-default.selectable:hover,.react-flow__node-group.selectable:hover,.react-flow__node-input.selectable:hover,.react-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible,.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible{box-shadow:0 0 0 .5px #1a192b}.react-flow__node-group{background-color:#f0f0f040}.react-flow__nodesselection-rect,.react-flow__selection{background:#0059dc14;border:1px dotted #0059dccc}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls{box-shadow:0 0 2px 1px #00000014}.react-flow__controls-button{align-items:center;background:#fefefe;border:none;border-bottom:1px solid #eee;box-sizing:initial;cursor:pointer;display:flex;height:16px;justify-content:center;padding:5px;-webkit-user-select:none;user-select:none;width:16px}.react-flow__controls-button:hover{background:#f4f4f4}.react-flow__controls-button svg{max-height:12px;max-width:12px;width:100%}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__minimap{background-color:#fff}.react-flow__minimap svg{display:block}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.bottom,.react-flow__resize-control.top{cursor:ns-resize}.react-flow__resize-control.bottom.right,.react-flow__resize-control.top.left{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:#3367d9;border:1px solid #fff;border-radius:1px;height:4px;transform:translate(-50%,-50%);width:4px}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.bottom.left,.react-flow__resize-control.handle.top.left{left:0}.react-flow__resize-control.handle.bottom.right,.react-flow__resize-control.handle.top.right{left:100%}.react-flow__resize-control.line{border:0 solid #3367d9}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{height:100%;top:0;transform:translate(-50%);width:1px}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.bottom,.react-flow__resize-control.line.top{height:1px;left:0;transform:translateY(-50%);width:100%}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}
/* ==========================================================================
   Comprehensive Arabic & RTL Support for WhatsCRM
   Supports Buttons, Cards, Inputs, Tables, Modals, Sidebar & Navigation
   ========================================================================== */

/* 1. Arabic Typography */
[dir="rtl"],
[dir="rtl"] body,
[dir="rtl"] button,
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select,
[dir="rtl"] .MuiTypography-root,
[dir="rtl"] .MuiInputBase-root,
[dir="rtl"] .MuiButton-root,
[dir="rtl"] .MuiTab-root,
[dir="rtl"] .MuiTableCell-root,
[dir="rtl"] .MuiMenuItem-root,
[dir="rtl"] .MuiChip-label,
[dir="rtl"] .MuiAlert-message {
  font-family: "Almarai", "Segoe UI", Tahoma, Arial, sans-serif !important;
  letter-spacing: 0 !important;
}

[dir="rtl"] body {
  direction: rtl;
  text-align: start;
}

/* 2. Technical LTR Content Preservations */
[dir="rtl"] code,
[dir="rtl"] pre,
[dir="rtl"] kbd,
[dir="rtl"] samp,
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[type="url"],
[dir="rtl"] input[type="email"],
[dir="rtl"] input[type="password"],
[dir="rtl"] input[type="number"],
[dir="rtl"] .code-font,
[dir="rtl"] .ltr-content,
[dir="rtl"] .direction-ltr {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: embed;
}

/* Chat & Natural Message Flow */
.chat-message-content,
.chat-msg-text,
.message-bubble-content {
  unicode-bidi: plaintext;
  text-align: start;
}

/* React Flow Builder Canvas coordinates MUST remain LTR */
.react-flow,
.react-flow__renderer,
.react-flow__viewport,
.react-flow__container {
  direction: ltr !important;
}

/* 3. Buttons (MuiButton, MuiIconButton, MuiButtonGroup) */
[dir="rtl"] .MuiButton-startIcon {
  margin-left: 8px !important;
  margin-right: -4px !important;
}

[dir="rtl"] .MuiButton-endIcon {
  margin-right: 8px !important;
  margin-left: -4px !important;
}

[dir="rtl"] .MuiButton-iconSizeSmall.MuiButton-startIcon {
  margin-left: 6px !important;
  margin-right: -2px !important;
}

[dir="rtl"] .MuiButton-iconSizeSmall.MuiButton-endIcon {
  margin-right: 6px !important;
  margin-left: -2px !important;
}

[dir="rtl"] .MuiButton-iconSizeLarge.MuiButton-startIcon {
  margin-left: 12px !important;
  margin-right: -4px !important;
}

[dir="rtl"] .MuiButton-iconSizeLarge.MuiButton-endIcon {
  margin-right: 12px !important;
  margin-left: -4px !important;
}

[dir="rtl"] .MuiButtonGroup-root .MuiButtonGroup-grouped:not(:last-of-type) {
  border-left-color: inherit;
  border-right-color: transparent;
}

[dir="rtl"] .MuiButtonGroup-root .MuiButtonGroup-grouped:first-of-type {
  border-top-right-radius: inherit;
  border-bottom-right-radius: inherit;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

[dir="rtl"] .MuiButtonGroup-root .MuiButtonGroup-grouped:last-of-type {
  border-top-left-radius: inherit;
  border-bottom-left-radius: inherit;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* 4. Cards & Containers (MuiCard, MuiCardHeader, MuiCardActions, MuiPaper) */


[dir="rtl"] .MuiCardHeader-root {
  text-align: right;
}

[dir="rtl"] .MuiCardHeader-avatar {
  margin-left: 16px !important;
  margin-right: 0 !important;
}

[dir="rtl"] .MuiCardHeader-action {
  margin-left: -8px !important;
  margin-right: auto !important;
}

[dir="rtl"] .MuiCardHeader-content {
  text-align: right !important;
}

[dir="rtl"] .MuiCardActions-root {
  justify-content: flex-start !important;
}

[dir="rtl"] .MuiCardActions-root > :not(:first-of-type) {
  margin-right: 8px !important;
  margin-left: 0 !important;
}

/* 5. Inputs, Outlined Inputs, Legends & Labels */
[dir="rtl"] input:not([type="tel"]):not([type="email"]):not([type="url"]):not([type="number"]):not([type="password"]):not(.ltr-input),
[dir="rtl"] textarea,
[dir="rtl"] .MuiInputBase-input {
  text-align: right !important;
  direction: rtl;
}

/* Input Adornments */
[dir="rtl"] .MuiInputAdornment-positionStart {
  margin-left: 8px !important;
  margin-right: 0 !important;
}

[dir="rtl"] .MuiInputAdornment-positionEnd {
  margin-right: 8px !important;
  margin-left: 0 !important;
}

/* Floating Label & Outlined Notch Fixes */
[dir="rtl"] .MuiInputLabel-root {
  right: 0 !important;
  left: auto !important;
  transform-origin: top right !important;
  text-align: right !important;
}

[dir="rtl"] .MuiInputLabel-outlined {
  transform: translate(-14px, 16px) scale(1);
}

[dir="rtl"] .MuiInputLabel-outlined.MuiInputLabel-shrink {
  transform: translate(-14px, -9px) scale(0.75) !important;
}

[dir="rtl"] .MuiInputLabel-outlined.MuiInputLabel-sizeSmall {
  transform: translate(-14px, 9px) scale(1);
}

[dir="rtl"] .MuiInputLabel-outlined.MuiInputLabel-sizeSmall.MuiInputLabel-shrink {
  transform: translate(-14px, -9px) scale(0.75) !important;
}

[dir="rtl"] .MuiOutlinedInput-notchedOutline {
  text-align: right !important;
}

[dir="rtl"] .MuiOutlinedInput-notchedOutline legend {
  text-align: right !important;
  margin-right: -2px !important;
  margin-left: 0 !important;
}

/* Select Dropdown */
[dir="rtl"] .MuiSelect-select {
  padding-left: 32px !important;
  padding-right: 14px !important;
  text-align: right !important;
}

[dir="rtl"] .MuiSelect-icon {
  right: auto !important;
  left: 7px !important;
}

[dir="rtl"] .MuiAutocomplete-endAdornment {
  right: auto !important;
  left: 9px !important;
}

[dir="rtl"] .MuiAutocomplete-inputRoot {
  padding-left: 65px !important;
  padding-right: 14px !important;
}

/* Helper text */
[dir="rtl"] .MuiFormHelperText-root {
  text-align: right !important;
  margin-right: 14px !important;
  margin-left: 0 !important;
}

/* 6. Form Controls: Checkbox, Radio & Switch */
[dir="rtl"] .MuiFormControlLabel-root {
  margin-right: -11px !important;
  margin-left: 16px !important;
  flex-direction: row !important;
}

[dir="rtl"] .MuiFormControlLabel-label {
  margin-right: 8px !important;
  margin-left: 0 !important;
}

/* 7. Tables, DataGrids & Pagination */
[dir="rtl"] .MuiTableCell-root {
  text-align: right !important;
}

[dir="rtl"] .MuiTableCell-alignRight {
  text-align: left !important;
}

[dir="rtl"] .MuiTableCell-alignLeft {
  text-align: right !important;
}

[dir="rtl"] .MuiTableCell-alignCenter {
  text-align: center !important;
}



[dir="rtl"] .MuiTablePagination-spacer {
  flex: 1 1 100%;
}

[dir="rtl"] .MuiTablePagination-selectLabel,
[dir="rtl"] .MuiTablePagination-displayedRows {
  direction: rtl;
}

[dir="rtl"] .MuiDataGrid-root {
  direction: rtl;
}

[dir="rtl"] .MuiDataGrid-columnHeaderTitleContainer {
  flex-direction: row;
}

[dir="rtl"] .MuiDataGrid-cell {
  text-align: right !important;
  justify-content: flex-start !important;
}

[dir="rtl"] .MuiDataGrid-columnSeparator {
  right: auto !important;
  left: 0 !important;
}

/* 8. Lists, Menus & Submenus */
[dir="rtl"] .MuiListItemIcon-root {
  min-width: 36px !important;
  margin-left: 10px !important;
  margin-right: 0 !important;
}

[dir="rtl"] .MuiListItemText-root {
  text-align: right !important;
}

[dir="rtl"] .MuiMenuItem-root {
  text-align: right !important;
}

/* 9. Chips, Badges, Alerts, Snackbars & Tooltips */
[dir="rtl"] .MuiChip-icon {
  margin-right: 5px !important;
  margin-left: -6px !important;
}

[dir="rtl"] .MuiChip-deleteIcon {
  margin-left: 5px !important;
  margin-right: -6px !important;
}

[dir="rtl"] .MuiAlert-icon {
  margin-left: 12px !important;
  margin-right: 0 !important;
}

[dir="rtl"] .MuiAlert-action {
  margin-left: -8px !important;
  margin-right: auto !important;
}

[dir="rtl"] .MuiAlert-message {
  text-align: right !important;
}

[dir="rtl"] .MuiBadge-anchorOriginTopRightRectangular {
  left: 0;
  right: auto;
  transform: scale(1) translate(-50%, -50%);
}

/* 10. Dialogs & Modals */






/* 11. Breadcrumbs */


[dir="rtl"] .MuiBreadcrumbs-ol {
  flex-direction: row;
}

/* 12. Accordions */
[dir="rtl"] .MuiAccordionSummary-expandIconWrapper {
  margin-left: 0 !important;
  margin-right: auto !important;
}

[dir="rtl"] .MuiAccordionSummary-content {
  margin-left: 16px !important;
  margin-right: 0 !important;
}

/* 13. Dashboard Sidebar & Drawer Specific Enhancements */
[dir="rtl"] .MuiDrawer-root.MuiDrawer-docked .MuiDrawer-paper {
  right: 0 !important;
  left: auto !important;
}

/* Active item highlight indicator bar */
[dir="rtl"] .MuiListItemButton-root.Mui-selected::before {
  right: 0 !important;
  left: auto !important;
  border-radius: 3px 0 0 3px !important;
}

/* Smooth transitions for sidebar width and padding */
.MuiDrawer-paper {
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
