/* استيراد الخط العربي من Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');

/* تعيين الخط الأساسي للصفحة */
body,
html,
*:not([class*="font"]):not([class*="icon"]):not(i):not(.anticon):not(.fa) {
  font-family: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* تطبيق الخط على العناصر الرئيسية */
body,
html,
input,
button,
select,
textarea,
.ant-btn,
.ant-input,
.ant-select,
.ant-modal,
.ant-drawer,
.ant-menu,
.ant-tabs,
.ant-card,
.ant-table,
.ant-form,
.ant-dropdown,
.ant-popover,
.ant-tooltip {
  font-family: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
}

/* الحفاظ على الخط في الأيقونات (عدم تغييرها) */
.anticon,
i,
.fa,
.fas,
.far,
.fal,
.fab,
[class*="icon"],
[class^="icon-"] {
  font-family: inherit !important;
}

/* إعدادات RTL للصفحة */
html[dir="rtl"],
body[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* فئات مساعدة للخط */
.ibm-plex-thin {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.ibm-plex-extralight {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 200;
  font-style: normal;
}

.ibm-plex-light {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.ibm-plex-regular {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.ibm-plex-medium {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.ibm-plex-semibold {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.ibm-plex-bold {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-style: normal;
}

/* إعدادات الخلفية */
.bg-setting-sidebar {
  background-color: #fff;
}

/* جداول responsive */
.table-responsive .ant-table-content {
  display: block;
  width: 100%;
  overflow-x: auto;
}

.table-responsive .ant-table-content .ant-table-cell,
.table-responsive .ant-table-content tbody td,
.table-responsive .ant-table-body td {
  white-space: nowrap;
}

/* تبويبات */
.ant-tabs-bar {
  border-bottom: 1px solid #d4d4d4;
}

/* الحقول المطلوبة */
.required label:before {
  display: inline-block;
  margin-right: 4px;
  color: #ff4d4f;
  font-size: 16px;
  font-family: SimSun, sans-serif;
  line-height: 1;
  content: "*";
}

/* حدود */
.col-border-right {
  border-right: 1px solid #f0f0f0;
}

/* هوامش علوية */
.mt-0 { margin-top: 0; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }
.mt-80 { margin-top: 80px; }

/* هوامش سفلية */
.mb-0 { margin-bottom: 0; }
.mb-5 { margin-bottom: 5px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }

/* هوامش يسرى */
.ml-5 { margin-left: 5px; }
.ml-15 { margin-left: 15px; }
.ml-20 { margin-left: 20px; }
.ml-25 { margin-left: 25px; }

/* هوامش يمنى */
.mr-5 { margin-right: 5px; }
.mr-20 { margin-right: 20px; }
.mr-25 { margin-right: 25px; }

/* حشوات */
.pd-10 { padding: 10px; }
.pl-0 { padding-left: 0; }
.pl-5 { padding-left: 5px; }
.pl-15 { padding-left: 15px; }
.pt-0 { padding-top: 0; }
.pt-10 { padding-top: 10px; }
.pt-30 { padding-top: 30px; }
.pb-10 { padding-bottom: 10px; }
.p-0 { padding: 0 !important; }
.p-5 { padding: 5px; }
.pl-24 { padding-left: 24px; }

/* نصوص صغيرة */
.small-text-message {
  color: #7c8db5 !important;
}

/* محاذاة النصوص */
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-center { text-align: center; }

/* حاويات */
.dashboard-container {
  min-height: calc(100vh - 400px);
}

.front-sidebar {
  min-height: 100vh;
}

/* قوائم منسدلة */
.top-dropdown-box .ant-dropdown-content {
  margin-top: 13px;
  min-width: 200px;
}

.top-dropdown-box li {
  padding-top: 2px;
  padding-bottom: 2px;
}

.top-dropdown-box .ant-menu-submenu-title {
  padding-left: 50px;
}

/* شريط جانبي للتصنيفات */
.categories-page-lefbar {
  padding: 30px 25px 30px 0;
  border: 0px;
}

.categories-page-lefbar .ant-menu-sub.ant-menu-inline {
  background: #fff;
}

.category-page-container {
  min-height: calc(100vh - 400px);
}

/* رأس الصفحة */
.page-content-sub-header {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

/* إعدادات الشريط الجانبي */
.settings-sidebar-content-container {
  min-height: calc(100vh - 190px);
}

.no-border-radius {
  border-radius: 0 !important;
}

.sidebar-right-border {
  border-right: 1px solid #f0f0f0;
}

/* السمة الفاتحة */
.light_theme .bg-white,
.light_theme .bg-setting-sidebar,
.light_theme .bg-color {
  background: #fff;
}

.light_theme .bt-1 {
  border-top: 1px solid #f0f0f0;
}

.light_theme .bb-1 {
  border-bottom: 1px solid #f0f0f0;
}

.light_theme .sidebar-right-border {
  border-right: 1px solid #f0f0f0 !important;
}

.light_theme .breadcrumb-left-border {
  border-left: none !important;
}

/* السمة الداكنة */
.dark_theme .bg-white {
  background: #1f1f1f;
}

.dark_theme .bg-setting-sidebar {
  background: #141414;
}

.dark_theme .bg-color {
  background: transparent !important;
}

.dark_theme .bt-1 {
  border-top: 1px solid #434343;
}

.dark_theme .bb-1 {
  border-bottom: 1px solid #434343;
}

.dark_theme .setting-sidebar {
  border: 1px solid #303030;
}

.dark_theme .sidebar-right-border {
  border-right: 1px solid #303030;
}

.dark_theme .breadcrumb-left-border {
  border-left: none !important;
}

/* بطاقات الودجت المخصصة */
.custom-card-widget {
  display: flex;
  margin: 0;
  position: relative;
}

.custom-card-widget h2,
.custom-card-widget p {
  margin: 0;
}

.custom-card-widget figcaption .more {
  position: absolute;
  top: 0;
  left: 0;
}

.custom-card-widget figcaption .more a {
  color: #888;
}

.custom-card-widget figcaption h2 {
  font-size: 20px;
  font-weight: 600;
}

.custom-card-widget figcaption p {
  font-size: 14px;
  color: #9299b8;
}

.custom-card-widget-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: "#5F63F2";
  margin-right: 20px;
}

[dir="rtl"] .custom-card-widget-icon {
  margin-left: 20px;
  margin-right: 0;
}

/* مكونات النافذة المنبثقة */
.ant-modal-content {
  padding: 0 !important;
}

.ant-modal-header {
  border-bottom: 1px solid #f0f0f0;
  padding: 16px 24px;
  margin-bottom: 0 !important;
}

.ant-modal-body {
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.5715;
  padding: 24px;
}

.ant-modal-footer {
  border-top: 1px solid #f0f0f0;
  padding: 10px 16px;
  margin-top: 0 !important;
}

/* الفواتير - دعم RTL */
.invoice-header {
  text-align: center;
  border-bottom: 1px dotted #ddd !important;
}

.invoice-logo {
  width: 200px;
}

.company-details {
  text-align: center;
  margin-top: 5px;
  border-bottom: 2px dotted #ddd !important;
}

.company-address {
  white-space: pre;
  margin-bottom: 0;
}

.invoice-customer-details {
  width: 100%;
  margin-bottom: 5px;
}

.tax-invoice-title {
  text-align: center;
  margin-top: 5px;
}

.tax-invoice-items {
  margin-top: 10px;
}

.item-row {
  border-bottom: 1px dotted #ddd !important;
}

.tax-invoice-totals {
  margin-top: 5px;
  border-top: 2px dotted #ddd !important;
  border-bottom: 2px dotted #ddd !important;
}

.paid-amount-deatils {
  margin-top: 10px;
  text-align: center;
}

.paid-amount-row {
  border-top: 2px dotted #ddd !important;
  border-bottom: 2px dotted #ddd !important;
}

.thanks-details {
  margin-top: 5px;
  text-align: center;
}

.barcode-details {
  margin-top: 10px;
  text-align: center;
}

.footer-button {
  text-align: center !important;
}

.discount-details {
  padding: 5px 0;
  border-top: 2px dotted #ddd !important;
  border-bottom: 2px dotted #ddd !important;
}

.discount-details p {
  margin-bottom: 0;
}

/* إعدادات الفاتورة للـ RTL */
[dir="rtl"] .invoice-customer-details td:first-child,
[dir="rtl"] .tax-invoice-items td:first-child,
[dir="rtl"] .discount-details td:first-child {
  text-align: right;
}

[dir="rtl"] .invoice-customer-details td:last-child,
[dir="rtl"] .tax-invoice-items td:last-child,
[dir="rtl"] .discount-details td:last-child {
  text-align: left;
}

/* إعدادات عامة */
html, body {
  width: 100%;
  height: 100%;
}

input::-ms-clear,
input::-ms-reveal {
  display: none;
}

*,
*:before,
*:after {
  box-sizing: border-box;
}

html {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -ms-overflow-style: scrollbar;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

@-ms-viewport {
  width: device-width;
}

body {
  margin: 0;
  background: #f0f2f5 !important;
}

[tabindex="-1"]:focus {
  outline: none;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: .5em;
  font-weight: 500;
}

p {
  margin-top: 0;
  margin-bottom: 1em;
}

abbr[title],
abbr[data-original-title] {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline;
  text-decoration: underline dotted;
  border-bottom: 0;
  cursor: help;
}

address {
  margin-bottom: 1em;
  font-style: normal;
  line-height: inherit;
}

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  -webkit-appearance: none;
}

ol, ul, dl {
  margin-top: 0;
  margin-bottom: 1em;
}

ol ol, ul ul, ol ul, ul ol {
  margin-bottom: 0;
}

dt {
  font-weight: 500;
}

dd {
  margin-bottom: .5em;
  margin-left: 0;
}

[dir="rtl"] dd {
  margin-right: 0;
  margin-left: auto;
}

blockquote {
  margin: 0 0 1em;
}

dfn {
  font-style: italic;
}

b, strong {
  font-weight: bolder;
}

small {
  font-size: 80%;
}

sub, sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
  vertical-align: baseline;
}

sub {
  bottom: -.25em;
}

sup {
  top: -.5em;
}

pre, code, kbd, samp {
  font-size: 1em;
  font-family: "IBM Plex Sans Arabic", SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
}

pre {
  margin-top: 0;
  margin-bottom: 1em;
  overflow: auto;
}

figure {
  margin: 0 0 1em;
}

img {
  vertical-align: middle;
  border-style: none;
}

a, area, button, [role="button"], input:not([type="range"]), label, select, summary, textarea {
  touch-action: manipulation;
}

table {
  border-collapse: collapse;
}

caption {
  padding-top: .75em;
  padding-bottom: .3em;
  text-align: left;
  caption-side: bottom;
}

[dir="rtl"] caption {
  text-align: right;
}

input, button, select, optgroup, textarea {
  margin: 0;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  line-height: inherit;
}

button, input {
  overflow: visible;
}

button, select {
  text-transform: none;
}

button, html [type="button"], [type="reset"], [type="submit"] {
  -webkit-appearance: button;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
  padding: 0;
  border-style: none;
}

input[type="radio"],
input[type="checkbox"] {
  box-sizing: border-box;
  padding: 0;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
  -webkit-appearance: listbox;
}

textarea {
  overflow: auto;
  resize: vertical;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: .5em;
  padding: 0;
  color: inherit;
  font-size: 1.5em;
  line-height: inherit;
  white-space: normal;
}

progress {
  vertical-align: baseline;
}

[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
  height: auto;
}

[type="search"] {
  outline-offset: -2px;
  -webkit-appearance: none;
}

[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  font: inherit;
  -webkit-appearance: button;
}

output {
  display: inline-block;
}

summary {
  display: list-item;
}

template {
  display: none;
}

[hidden] {
  display: none !important;
}

mark {
  padding: .2em;
  background-color: #feffe6;
}

/* شاشة تحميل التطبيق */
.loading-app-container[data-v-c2a22665] {
  height: 100%;
  width: 100%;
  display: flex;
  position: fixed;
  align-items: center;
  justify-content: center;
  background: #f8f8ff;
}

/* شريط التمرير المخصص */
.ps {
  overflow: hidden !important;
  overflow-anchor: none;
  -ms-overflow-style: none;
  touch-action: auto;
  -ms-touch-action: auto;
  position: relative;
}

.ps__rail-x {
  display: none;
  opacity: 0;
  transition: background-color .2s linear, opacity .2s linear;
  -webkit-transition: background-color .2s linear, opacity .2s linear;
  height: 15px;
  bottom: 0;
  position: absolute;
}

.ps__rail-y {
  display: none;
  opacity: 0;
  transition: background-color .2s linear, opacity .2s linear;
  -webkit-transition: background-color .2s linear, opacity .2s linear;
  width: 15px;
  right: 0;
  position: absolute;
}

[dir="rtl"] .ps__rail-y {
  right: auto;
  left: 0;
}

.ps--active-x > .ps__rail-x,
.ps--active-y > .ps__rail-y {
  display: block;
  background-color: transparent;
}

.ps:hover > .ps__rail-x,
.ps:hover > .ps__rail-y,
.ps--focus > .ps__rail-x,
.ps--focus > .ps__rail-y,
.ps--scrolling-x > .ps__rail-x,
.ps--scrolling-y > .ps__rail-y {
  opacity: .6;
}

.ps .ps__rail-x:hover,
.ps .ps__rail-y:hover,
.ps .ps__rail-x:focus,
.ps .ps__rail-y:focus,
.ps .ps__rail-x.ps--clicking,
.ps .ps__rail-y.ps--clicking {
  background-color: #eee;
  opacity: .9;
}

.ps__thumb-x {
  background-color: #aaa;
  border-radius: 6px;
  transition: background-color .2s linear, height .2s ease-in-out;
  -webkit-transition: background-color .2s linear, height .2s ease-in-out;
  height: 6px;
  bottom: 2px;
  position: absolute;
}

.ps__thumb-y {
  background-color: #aaa;
  border-radius: 6px;
  transition: background-color .2s linear, width .2s ease-in-out;
  -webkit-transition: background-color .2s linear, width .2s ease-in-out;
  width: 6px;
  right: 2px;
  position: absolute;
}

[dir="rtl"] .ps__thumb-y {
  right: auto;
  left: 2px;
}

.ps__rail-x:hover > .ps__thumb-x,
.ps__rail-x:focus > .ps__thumb-x,
.ps__rail-x.ps--clicking .ps__thumb-x {
  background-color: #999;
  height: 11px;
}

.ps__rail-y:hover > .ps__thumb-y,
.ps__rail-y:focus > .ps__thumb-y,
.ps__rail-y.ps--clicking .ps__thumb-y {
  background-color: #999;
  width: 11px;
}

@supports (-ms-overflow-style: none) {
  .ps {
    overflow: auto !important;
  }
}

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .ps {
    overflow: auto !important;
  }
}