/* ========== GLOBAL & ROOT ========== */
:root {
  --primary: #64059f ;
  --primary-subtle: #7a1cac42;
  --primary-light: #f7e9ff;
  --primary-middle: #5e0f88;
  --primary-dark: #2b083e;
  
  --secondary: #ad49e1;
  --secondary-subtle: #ad49e142;
  --secondary-light: #cd72fe;    
  
  --transition: all 0.3s ease;
  --border-radius: 7px;
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --primary-shadow: 0 12px 40px -10px rgba(173, 26, 154, 0.25);
  
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 80px;
  --sidebar-color: rgba(255, 255, 255, 0.95);
  --sidebar-hover-bg: rgba(53, 11, 74, 0.4);
  --sidebar-active-bg: rgba(0, 160, 158, 0.3);
  --sidebar-transition: 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.0);
  
  --table-header: rgba(98, 97, 99, 0.04);
  --table-hover: rgba(98, 97, 99, 0.02);
  
  --text-dark: #2a3547;
  --text-light: #5a6a85;
  
  --light-gray: #bfc3c8;
  --light-gray-light: #d1d2d4;
  --light-gray-subtle: #bfc3c842;
  
  --body-bg: #fff;
  --body-font-size: 0.875rem;
  --body-font-weight: 400;
  --body-line-height: 1.5;
  --body-color: #5a6a85;
  
  --success: #2ba760;
  --success-subtle: #2ba76042;
  --success-light: #45c97a;
 
  --danger: #dc2626;
  --danger-subtle: #dc262642;
  --danger-light: #ef4444;
  
  --warning: #ffaf00;
  --warning-subtle: #ffaf0042;
  --warning-light: #ffc13a;
  
  --info: #2682DF;
  --info-subtle: #2683df42;
  --info-light: #4399EF;
  
  --light-indigo: #EBF3FE;

  --btn-disabled-opacity: 0.65;

  --pagination-white: #f8f9fa;
  --pagination-gray: #94a3b8;

  --gray: #808080;
  --gray-subtle: #80808042;

  --white: #fff;
}

body {
  margin: 0;
  font-size: var(--body-font-size);
  font-weight: var(--body-font-weight);
  line-height: var(--body-line-height);
  color: var(--body-color);
  background-color: var(--body-bg);
}

h1,h2,h3,h4,h5,h6 {
    margin-top: 0;
    margin-bottom: .5rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--bs-heading-color)
}

h1 {
    font-size: calc(1.34375rem + 1.125vw)
}

@media (min-width: 1200px) {
    h1 {
        font-size:2.1875rem
    }
}

h2 {
    font-size: calc(1.3rem + .6vw)
}

@media (min-width: 1200px) {
    h2 {
        font-size:1.75rem
    }
}

h3 {
    font-size: calc(1.278125rem + .3375vw)
}

@media (min-width: 1200px) {
    h3 {
        font-size:1.53125rem
    }
}

h4 {
    font-size: calc(1.25625rem + .075vw)
}

@media (min-width: 1200px) {
    h4 {
        font-size:1.3125rem
    }
}

h5 {
    font-size: 1.09375rem
}

h6 {
    font-size: .875rem
}

dt {
    font-weight: 500
}

dd {
    margin-bottom: .5rem;
    margin-left: 0
}

ul {
    list-style: none
}

html[dir=rtl] .text-start {
    text-align: right!important
}

html[dir=rtl] .text-end {
    text-align: left!important
}


@media (min-width: 576px) {
    html[dir=rtl] .text-sm-start {
        text-align:right!important
    }

    html[dir=rtl] .text-sm-end {
        text-align: left!important
    }

    html[dir=rtl] .text-sm-center {
        text-align: center!important
    }
}

@media (min-width: 768px) {
    html[dir=rtl] .text-md-start {
        text-align:right!important
    }

    html[dir=rtl] .text-md-end {
        text-align: left!important
    }

    html[dir=rtl] .text-md-center {
        text-align: center!important
    }
}

@media (min-width: 992px) {
    html[dir=rtl] .text-lg-start {
        text-align:right!important
    }

    html[dir=rtl] .text-lg-end {
        text-align: left!important
    }

    html[dir=rtl] .text-lg-center {
        text-align: center!important
    }
}

@media (min-width: 1300px) {
    html[dir=rtl] .text-xl-start {
        text-align:right!important
    }

    html[dir=rtl] .text-xl-end {
        text-align: left!important
    }

    html[dir=rtl] .text-xl-center {
        text-align: center!important
    }
}

@media (min-width: 1400px) {
    html[dir=rtl] .text-xxl-start {
        text-align:right!important
    }

    html[dir=rtl] .text-xxl-end {
        text-align: left!important
    }

    html[dir=rtl] .text-xxl-center {
        text-align: center!important
    }
}

.w-auto { 
    width: auto !important;
}
.mx-w-200-px{
   max-width: 200px !important; 
}

.mx-h-100-px{
    max-height: 100px !important;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.bg-secondary-subtle {
   background-color: var(--secondary-subtle) !important
}

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

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

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

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

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

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

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

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

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

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

.bg-white {
  background-color: white !important;
}

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

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

.bg-light-gray-subtle {
  background-color: var(--light-gray-subtle) !important;
}

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

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

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

.hidden {
  display: none; 
}

.rounded-circle {
    border-radius: 50%!important
}

.min-height-60 {
    min-height: 40vh !important;
}

/* Container & Row Helper */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    /* flex-direction: column !important;
    display: flex;
    align-items: center; */
}

@media (max-width: 576px) {
  .container{
    padding: 1rem 0rem !important;
  }
}

/* ========== SIDEBAR (main structure) ========== */
.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    height: 101vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-right: 1px solid var(--sidebar-border-color);
    transition: var(--sidebar-transition);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-wrapper.collapsed {
  width: var(--sidebar-collapsed-width); 
}

/* collapsed text / icon adjustments */
.sidebar-wrapper.collapsed .sidebar-link-text {
    opacity: 0;
    width: 0;
    visibility: hidden;
    margin-left: 0;
    transition: all 0.2s ease;
}


.sidebar-wrapper.collapsed .sidebar-link i {
  margin-right: 0;
  font-size: 1.2rem;
}

.sidebar-wrapper.collapsed .sidebar-header {
  padding: 25px 8px 10px 0px
}

/* sidebar header & logo */
.sidebar-header {
  padding: 25px 8px 10px 0px;
  border-bottom: 1px solid var(--sidebar-border-color);
  text-align: center;
  transition: var(--sidebar-transition);
}

#sidebarLogo {
  height: 50px;
  opacity: 1;
  transition: opacity 0.4s ease, width 0.4s ease;
}

/* menu */
.sidebar-menu {
  padding: 10px 0; 
}

.sidebar-section {
  /* margin-bottom: 6px;  */
}

/* Hide text & big logo during width transition */
.sidebar-wrapper:not(.collapsed).fade-transition .sidebar-link-text,
.sidebar-wrapper:not(.collapsed).fade-transition .sidebar-chevron,
.sidebar-wrapper:not(.collapsed).fade-transition .nested-chevron,
.sidebar-wrapper:not(.collapsed).fade-transition #poweredByText {
  opacity: 0 !important;
  visibility: visible !important; /* keep layout, only hide visually */
  transition: opacity 0.15s ease;
}

.sidebar-wrapper:not(.collapsed).fade-transition #poweredByText {
  opacity: 0 !important;
  visibility: visible !important; /* keep layout, only hide visually */
  transition: opacity 0.15s ease;
}
/* Smooth logo opacity */
#sidebarLogo {
  transition: opacity 0.2s ease;
}

/* Fix long text wrapping in sidebar */
.sidebar-link-text {
    overflow: hidden !important;
    min-width: 0;
    font-size: 1.05rem;
    font-weight: 500;
    transition: var(--sidebar-transition);
    white-space: nowrap !important;

}
a .sidebar-link-text{
    white-space: normal !important;
    font-size: 0.95rem;

}

.nested-dropdown-toggle .sidebar-link-text{
    font-size: 0.95rem;

}

.sidebar-dropdown-toggle {
    flex-wrap: nowrap !important;
    min-width: 0;
}

/* For any text-wrap class, override back to nowrap */
.sidebar-link-text.text-wrap {
    white-space: nowrap !important;
}
/* links (both normal and dropdown) */
.sidebar-link, .sidebar-dropdown-toggle, .nested-dropdown-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 57.19px; /*to match text size (do not change) */
    background: none;
    border: none;
    padding: 16px 20px;
    color: var(--sidebar-color);
    cursor: pointer;
    transition: var(--sidebar-transition);
    font-size: 0.95rem;
    font-weight: 500;
    gap: 12px;
    position: relative;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nested-dropdown-toggle{
  padding: 12px 36px !important;
}


/*sidebar spacer  */
.sidebar-section:not(:first-child) {
    position: relative;

}

.sidebar-section:not(:first-child)::before {
    position: relative;
    content: "";
    display: block;
    height: 2px;
    background: linear-gradient(
        90deg,
         rgba(152, 28, 194, 0.20),
        transparent,
        transparent
    );
}

html[dir="rtl"] .sidebar-link,
html[dir="rtl"] .sidebar-dropdown-toggle,
html[dir="rtl"] .nested-dropdown-toggle {
  border-left: none;
  border-right: 3px solid transparent;
}

.sidebar-link:hover, .sidebar-dropdown-toggle:hover, .nested-dropdown-toggle:hover {
  background: var(--sidebar-hover-bg);
  color: white;
}

html[dir="ltr"] .sidebar-link:hover,
html[dir="ltr"] .sidebar-dropdown-toggle:hover,
html[dir="ltr"] .nested-dropdown-toggle:hover {
  border-left-color: var(--secondary);
}
html[dir="rtl"] .sidebar-link:hover,
html[dir="rtl"] .sidebar-dropdown-toggle:hover,
html[dir="rtl"] .nested-dropdown-toggle:hover {
  border-right-color: var(--secondary);
}

.sidebar-link.active {
  background: var(--sidebar-active-bg);
  color: white;
  border-left-color: var(--secondary);
}

html[dir="rtl"] .sidebar-link.active { 
  border-right-color: var(--secondary);
}

/* icons inside links */
.sidebar-link i, .sidebar-dropdown-toggle i:first-child, .nested-dropdown-toggle i:first-child {
  font-size: 1.1rem;
  min-width: 24px;
  text-align: center;
  transition: var(--sidebar-transition);
  color: rgba(255, 255, 255, 0.8);
}

html[dir="rtl"] .sidebar-link i,
html[dir="rtl"] .sidebar-dropdown-toggle i:first-child,
html[dir="rtl"] .nested-dropdown-toggle i:first-child {
  margin-right: 0;
  margin-left: 12px;
}

.sidebar-link:hover i, .sidebar-link.active i,
.sidebar-dropdown-toggle:hover i:first-child,
.nested-dropdown-toggle:hover i:first-child {
  color: white;
}



/* main content */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 20px 5px;
  transition: var(--sidebar-transition);
  min-height: 100vh;
}

.main-content.expanded { 
  margin-left: var(--sidebar-collapsed-width); 
}

html[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: var(--sidebar-width);
}

html[dir="rtl"] .main-content.expanded { 
  margin-right: var(--sidebar-collapsed-width); 
}

/* ========== SIDEBAR DROPDOWNS (main & nested) ========== */
.sidebar-dropdown-toggle .sidebar-chevron,
.nested-dropdown-toggle .nested-chevron {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
  margin-left: auto;
}

html[dir="rtl"] .sidebar-dropdown-toggle .sidebar-chevron,
html[dir="rtl"] .nested-dropdown-toggle .nested-chevron {
  margin-left: 0;
  margin-right: auto;
}

.sidebar-dropdown.open .sidebar-dropdown-toggle .sidebar-chevron { 
  transform: rotate(90deg); 
}

html[dir="rtl"] .sidebar-dropdown.open .sidebar-dropdown-toggle .sidebar-chevron { 
  transform: rotate(-90deg); 
}

.nested-dropdown.open .nested-dropdown-toggle .nested-chevron { 
  transform: rotate(90deg); 
}

html[dir="rtl"] .nested-dropdown.open .nested-dropdown-toggle .nested-chevron { 
  transform: rotate(-90deg); 
}

/* submenus */
.sidebar-submenu, .nested-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar-dropdown.open .sidebar-submenu { 
  max-height: 1500px; 
  /* margin-bottom: 50px;  */
}

.sidebar-wrapper.collapsed .sidebar-submenu,
.sidebar-wrapper.collapsed .nested-submenu {
    max-height: 0 !important;
    margin-bottom: 0 !important;
    overflow: hidden;
    /* visibility: hidden; */
}

.nested-dropdown.open .nested-submenu { 
  max-height: 300px; 
  margin-bottom: 20px; 
}

/* indentation */
.sidebar-submenu .sidebar-link { 
  padding-left: 36px; 
}

.nested-submenu .sidebar-link { 
  padding-left: 50px !important; 
}

html[dir="rtl"] .sidebar-submenu .sidebar-link { 
  padding-left: 30px; 
  padding-right: 36px; 
}

html[dir="rtl"] .nested-submenu .sidebar-link { 
  padding-right: 50px !important; 
}

/* ========== COLLAPSED SIDEBAR BEHAVIOUR ========== */
.sidebar-wrapper.collapsed .sidebar-dropdown-toggle .sidebar-link-text,
.sidebar-wrapper.collapsed .sidebar-dropdown-toggle .sidebar-chevron,
.sidebar-wrapper.collapsed .nested-dropdown-toggle .sidebar-link-text,
.sidebar-wrapper.collapsed .nested-dropdown-toggle .nested-chevron {
  display: none;
}

/* REMOVE justify-content: center and gap:0 - keep icons at left/right edge */
.sidebar-wrapper.collapsed .sidebar-dropdown-toggle,
.sidebar-wrapper.collapsed .nested-dropdown-toggle {
  /* No centering - keep normal flex alignment */
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 20px;
}

.sidebar-wrapper.collapsed .sidebar-dropdown-toggle i:first-child,
.sidebar-wrapper.collapsed .nested-dropdown-toggle i:first-child {
  margin-right: 0;
}

html[dir="rtl"] .sidebar-wrapper.collapsed .sidebar-dropdown-toggle i:first-child,
html[dir="rtl"] .sidebar-wrapper.collapsed .nested-dropdown-toggle i:first-child {
  margin-left: 0;
}

/* hover‑expand temporary full width */
.sidebar-wrapper.hover-expanded .sidebar-logo-text,
.sidebar-wrapper.hover-expanded .sidebar-link-text {
    opacity: 1 !important;
    visibility: visible !important;
    width: auto !important;
}

.sidebar-wrapper.hover-expanded .sidebar-dropdown-toggle .sidebar-link-text,
.sidebar-wrapper.hover-expanded .sidebar-dropdown-toggle .sidebar-chevron,
.sidebar-wrapper.hover-expanded .nested-dropdown-toggle .sidebar-link-text,
.sidebar-wrapper.hover-expanded .nested-dropdown-toggle .nested-chevron {
    display: flex !important;
}

.sidebar-wrapper.hover-expanded .sidebar-dropdown-toggle,
.sidebar-wrapper.hover-expanded .nested-dropdown-toggle {
    padding: 16px 20px;
}

/* ========== TOP BAR (nav-controls) ========== */
.top-controls {
    display: flex;
    justify-content: flex-end; 
}

.nav-controls {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0 0.25rem;
  align-items: center;
  background: rgba(240, 240, 240, 0.75);
  backdrop-filter: blur(12px);
  border-radius: 60px;
  z-index: 1010;
}
html[dir="ltr"] .nav-controls{
 margin-right: 8px;
}
html[dir="rtl"] .nav-controls{
  margin-left: 8px;
}
.nav-control-item { 
  position: relative; 
}

.dropdown-trigger {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.dropdown-trigger:hover { transform: translateY(-2px); }
.dropdown-trigger i {
  font-size: 1.4rem;
  color: var(--primary-middle);
}
.dropdown-trigger .flag-image,
.dropdown-trigger .flag-icon {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 50%;
}

/* dropdown menus (top bar) */
.dropdown-menu-custom {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.02);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1050;
  overflow: hidden;
}

.dropdown-menu-wide { 
  min-width: 300px; 
}

html[dir="rtl"] .dropdown-menu-custom { 
  right: auto; 
  left: 0; 
}

.dropdown-custom.open .dropdown-menu-custom {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* dropdown inner */
.dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  font-weight: 600;
}

.dropdown-header h5 { 
  font-size: 1.1rem; margin: 0; 
}

.dropdown-body {
  padding: 0.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

.dropdown-item-custom {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-item-custom:hover {
  background: #f8fafc;
  text-decoration: none;
  color: #0f172a;
}

.dropdown-item-custom span, .dropdown-item-custom > div, .dropdown-item-custom small {
  font-size: 0.95rem;
}

.dropdown-item-custom span:not(.text-dark) {
  font-size: 1rem;
  font-weight: 500;
}

.dropdown-item-custom i {
  font-size: 1.2rem;
  width: 1.5rem;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background: #eef2f6;
  margin: 0.5rem 0;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.profile-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.profile-avatar-large { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; }
.dropdown-flag { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.notification-badge-custom {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background-color: #dc3545;
  border-radius: 50%;
  border: 2px solid white;
  display: none;
}

/* ========== SIDEBAR TOGGLE BUTTON ========== */
.sidebar-toggle-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1401;
  width: 40px;
  height: 40px;
  background: var(--primary-middle);
  border: none;
  border-radius: 7px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
      transition: left 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1), 
                right 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1),
                transform 0.25s ease, 
                background 0.2s ease;

  will-change: left, transform;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);

}


.sidebar-toggle-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
}

.sidebar-toggle-btn i { 
  transition: transform 0.25s ease; 
}

/* .sidebar-toggle-btn.collapsed i { 
  transform: rotate(180deg); 
} */

html[dir="rtl"] .sidebar-toggle-btn { 
  left: auto; 
  right: 20px; 
}

/* ========== MOBILE OVERLAY & RESPONSIVE ========== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 767px) {
    .sidebar-wrapper {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1); /* ADD THIS LINE */
    }
    .sidebar-wrapper.active { 
        transform: translateX(0) !important; 
    }
    .main-content { 
        margin-left: 0 !important; 
        padding: 20px; 
    }
    html[dir="rtl"] .main-content { 
        margin-right: 0 !important; 
    }
    .sidebar-toggle-btn { 
        display: flex !important; 
        margin-left: 2px;
    }
    .sidebar-overlay.active { 
        display: block; 
    }
    html[dir="rtl"] .sidebar-wrapper {
        transform: translateX(100%) !important;
        left: auto !important;
        right: 0 !important;
    }
    html[dir="rtl"] .sidebar-wrapper.active {
        transform: translateX(0) !important;
    }
    html[dir="rtl"] .sidebar-toggle-btn {
        left: auto;
        right: 20px;
    }    
}

@media (max-width: 768px) {
  .sidebar-wrapper { 
    width: 100%; 
    max-width: 280px; 
  }
}

@media (max-width: 576px) {
    .main-content {
        padding: 20px 10px;
    }
}


/* ========== SCROLLBAR ========== */
.sidebar-wrapper::-webkit-scrollbar { 
  width: 4px; 
}

.sidebar-wrapper::-webkit-scrollbar-track { 
  background: rgba(255, 255, 255, 0.05); 
}

.sidebar-wrapper::-webkit-scrollbar-thumb { 
  background: var(--secondary); 
  border-radius: 3px; 
}

/* ========== POWERED BY (wave animation) ========== */
#poweredByText {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
}

#poweredByText .sp-text-white { 
  color: rgba(255, 255, 255, 0.75); 
  font-weight: 400; 
}

.powered-by-sphereka-link {
    display: inline-flex;
    gap: 0.02em;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
    direction: ltr;
    unicode-bidi: embed;
    color: var(--secondary-light);
}

html[dir="rtl"] .powered-by-sphereka-link {
    direction: ltr;
    unicode-bidi: embed;
}

.wave-letter { 
  display: inline-block; 
  transition: 
  transform 0.2s; 
}

.powered-by-sphereka-link:hover .wave-letter {
  animation: waveLetter 0.8s ease-in-out forwards;
}

@keyframes waveLetter {
  0% { transform: translateY(0); }
  25% { transform: translateY(-3px); }
  50% { transform: translateY(2px); }
  75% { transform: translateY(-1px); }
  100% { transform: translateY(0); }
}

.sidebar-wrapper.collapsed #poweredByText {
  opacity: 0;
  visibility: hidden;
  width: 0;
  padding: 0;
  margin: 0;
  pointer-events: none;
}

.sidebar-wrapper.hover-expanded #poweredByText {
  opacity: 1;
  visibility: visible;
  width: auto;
  padding: 0.5rem 0.75rem;
  pointer-events: auto;
}

/* ========== RTL OVERRIDES (restored) ========== */
html[dir="rtl"] .sidebar-wrapper {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 1px solid var(--sidebar-border-color);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

html[dir="rtl"] .sidebar-wrapper.collapsed .sidebar-link i {
  margin-right: 0;
  margin-left: 0;
}

html[dir="rtl"] .sidebar-link {
  border-left: none;
  border-right: 3px solid transparent;
}

html[dir="rtl"] .sidebar-link:hover,
html[dir="rtl"] .sidebar-link.active {
  border-left-color: transparent;
  border-right-color: var(--secondary);
}

html[dir="rtl"] .sidebar-link i {
  margin-right: 0;
  margin-left: 12px;
}

html[dir="rtl"] .main-content {
  margin-left: 0;
  margin-right: var(--sidebar-width);
}

html[dir="rtl"] .main-content.expanded {
  margin-right: var(--sidebar-collapsed-width);
}

html[dir="rtl"] .sidebar-toggle-btn {
  left: auto;
  right: 20px;
}

/* RTL for nested dropdown toggle */
html[dir="rtl"] .sidebar-dropdown-toggle .sidebar-chevron,
html[dir="rtl"] .nested-dropdown-toggle .nested-chevron {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .sidebar-dropdown.open .sidebar-dropdown-toggle .sidebar-chevron {
  transform: rotate(-90deg);
}

html[dir="rtl"] .nested-dropdown.open .nested-dropdown-toggle .nested-chevron {
  transform: rotate(-90deg);
}

/* RTL for top‑bar dropdowns */
html[dir="rtl"] .dropdown-menu-custom {
  right: auto;
  left: 0;
}

.text-wrap {
    white-space: normal !important;
}

/* ===== OVERRIDE: Collapsed sidebar hover-expand as overlay (no content shift) ===== */
.sidebar-wrapper.collapsed.hover-expanded {
  width: var(--sidebar-width) !important;
  z-index: 1002;                   /* ensure it stays above main content */
}

/* Show link text, chevrons, and submenus when hover-expanded */
.sidebar-wrapper.collapsed.hover-expanded .sidebar-link-text,
.sidebar-wrapper.collapsed.hover-expanded .sidebar-chevron,
.sidebar-wrapper.collapsed.hover-expanded .nested-chevron {
  opacity: 1 !important;
  visibility: visible !important;
  width: auto !important;
}

/* Only open submenus that were already open */
.sidebar-wrapper.collapsed.hover-expanded .sidebar-dropdown.open .sidebar-submenu,
.sidebar-wrapper.collapsed.hover-expanded .nested-dropdown.open .nested-submenu {
  max-height: 1500px !important;
  overflow: visible !important;
}
.sidebar-toggle-btn {
  transition: left 0.2s ease, right 0.2s ease, transform 0.25s ease, background 0.2s ease;
}
/* Keep powered-by visible */
.sidebar-wrapper.collapsed.hover-expanded #poweredByText {
  opacity: 1 !important;
  visibility: visible !important;
  width: auto !important;
  padding: 0.5rem 0.75rem !important;
}

/* Ensure toggle button is not hidden behind expanded sidebar */



/* === Fix icons & spacing when collapsed sidebar is hover-expanded === */
.sidebar-wrapper.collapsed.hover-expanded .sidebar-link i,
.sidebar-wrapper.collapsed.hover-expanded .sidebar-dropdown-toggle i:first-child,
.sidebar-wrapper.collapsed.hover-expanded .nested-dropdown-toggle i:first-child {
  font-size: 1.1rem !important;    /* match normal expanded state */
}

/* Ensure dropdown toggles have same padding as normal expanded state */
.sidebar-wrapper.collapsed.hover-expanded .sidebar-dropdown-toggle,
.sidebar-wrapper.collapsed.hover-expanded .nested-dropdown-toggle {
  justify-content: flex-start !important;
  gap: 12px !important;
}

/* Fix submenu indentation and visibility when hover-expanded */
.sidebar-wrapper.collapsed.hover-expanded .sidebar-submenu .sidebar-link,
.sidebar-wrapper.collapsed.hover-expanded .nested-submenu .sidebar-link {
  padding-left: 36px !important;
}


html[dir="rtl"] .sidebar-wrapper.collapsed.hover-expanded .sidebar-submenu .sidebar-link,
html[dir="rtl"] .sidebar-wrapper.collapsed.hover-expanded .nested-submenu .sidebar-link {
  padding-right: 36px !important;
  padding-left: 0 !important;
}

.sidebar-wrapper.collapsed.hover-expanded 
.sidebar-submenu .nested-submenu > li > a.sidebar-link {
  padding-left: 50px !important;
}

html[dir="rtl"] .sidebar-wrapper.collapsed.hover-expanded 
.sidebar-submenu .nested-submenu > li > a.sidebar-link {
  padding-right: 50px !important;
}

/* === Performance & smoothness === */
/* ========== SIDEBAR TRANSITIONS – LIGHTWEIGHT & SMOOTH ========== */
.sidebar-wrapper {
  transition: width var(--sidebar-transition), transform var(--sidebar-transition);
  will-change: width, transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

/* Text & chevrons – fade out/in */
.sidebar-link-text,
.sidebar-chevron,
.nested-chevron,
#poweredByText {
  transition: opacity 0.2s ease, visibility 0.2s ease;
  opacity: 1;
  visibility: visible;
}

/* Icons – no transition (always visible) */
.sidebar-link i,
.sidebar-dropdown-toggle i:first-child,
.nested-dropdown-toggle i:first-child {
  transition: none;
}

/* When sidebar is collapsed – fade out text & chevrons */
.sidebar-wrapper.collapsed .sidebar-link-text,
.sidebar-wrapper.collapsed .sidebar-chevron,
.sidebar-wrapper.collapsed .nested-chevron,
.sidebar-wrapper.collapsed #poweredByText {
  opacity: 0;
  visibility: hidden;
}

/* When hover‑expanding – fade in with tiny delay to mask width change */
.sidebar-wrapper.collapsed.hover-expanded .sidebar-link-text,
.sidebar-wrapper.collapsed.hover-expanded .sidebar-chevron,
.sidebar-wrapper.collapsed.hover-expanded .nested-chevron,
.sidebar-wrapper.collapsed.hover-expanded #poweredByText {
  transition: opacity 0.15s ease 0.05s, visibility 0.15s ease 0.05s;
  opacity: 1;
  visibility: visible;
}

/* Submenus – fade + expand */
.sidebar-submenu,
.nested-submenu {
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 0;
}
.sidebar-dropdown.open .sidebar-submenu,
.nested-dropdown.open .nested-submenu {
  opacity: 1;
}

/* Logo – only width & opacity */
#sidebarLogo {
  transition: opacity 0.2s ease, width 0.2s ease;
}
/* ############################## tables start ################################### */

/* Modern Table Styles – matches new UI theme */
.modern-table-wrapper {
    border-radius: 7px;
    background: white;
    border: 1px solid #80808021;
    overflow: auto;
}

.modern-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}

/* Header styling */
.modern-data-table thead tr {
    background: var(--table-header);
    border-radius: 20px 20px 0 0;
}

.modern-data-table thead th {
    padding: .8rem;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: none;
}

.modern-data-table tbody tr:hover {
    /* background: rgba(122, 28, 172, 0.04); */
    background: var(--table-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.modern-data-table tbody tr.no-hover:hover {
    background: transparent !important;
    box-shadow: none !important;
}


.modern-data-table td {
    padding: 1rem 0.8rem;
    vertical-align: middle;
    color: var(--text-dark);
    border-bottom: 1px solid #f0f2f5;
    min-width: 120px;
}

.modern-data-table td.no-border {
    border-bottom: none;
}

/* Improve responsiveness - allow horizontal scroll on small screens */
@media (max-width: 768px) {
    .modern-data-table th,
    .modern-data-table td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-width: 120px;
    } 
}



/* Styling for rows with gradient bottom border */
.border-bottom-space {
    position: relative; /* Ensure pseudo-element is relative to row */
    border-style: hidden;
}

.border-bottom-space::after {
    content: ""; /* Create a pseudo-element for the gradient border */
    position: absolute;
    bottom: 0; /* Align at the bottom */
    left: 0;
    width: 100%; /* Full width of the row */
    height: 1px; /* Thickness of the border */
    background: #5e0f88; /* Gradient for the border */
    /* z-index: 1; */
    pointer-events: none; /* Prevent interaction with pseudo-element */
}

/* ############################## tables end ################################### */

/* ############################## tables link styles start ################################### */
.link-purple {
    position: relative;
    display: inline-block;
    cursor: pointer;
    text-decoration: none !important;
    
    /* Base text color (will be overlaid by gradient on hover) */
    color: var(--primary) !important;
    
    /* Optional: subtle font-weight change on hover (whole link, not progressive) */
    transition: font-weight 0.2s ease;
    
    /* Required for background-clip text effect */
    background: linear-gradient(
        to right,
        var(--primary) 0%,
        var(--secondary) 100%
    );
    background-size: 200% 100%;
    background-position: 100% 0;              /* start fully primary (right side hidden) */
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;                       /* text fill becomes transparent – shows gradient */
}

/* On hover, the gradient slides left → right, progressively revealing secondary color */
.link-purple:hover,
.link-purple:focus {
    animation: slideTextGradient 0.3s ease forwards;
    -webkit-text-stroke: 0.2px currentColor;
}

/* Underline pseudo-element (shares the same sliding gradient) */
.link-purple::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(
        to right,
        var(--primary) 0%,
        var(--secondary) 100%
    );
    background-size: 200% 100%;
    background-position: 100% 0;
    transform: scaleX(0);
    will-change: transform;
    backface-visibility: hidden;    
    transform-origin: left;
    transition: transform 0.3s ease;
}

/* On hover, underline expands and its gradient slides simultaneously */
.link-purple:hover::after,
.link-purple:focus::after {
    transform: scaleX(1);
    animation: slideUnderlineGradient 0.3s ease forwards;
}

/* Keyframes for sliding text gradient (LTR) */
@keyframes slideTextGradient {
    0% {
        background-position: 100% 0;          /* only primary visible */
    }
    100% {
        background-position: 0% 0;            /* secondary fully revealed */
    }
}

/* Keyframes for sliding underline gradient (LTR) */
@keyframes slideUnderlineGradient {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: 0% 0;
    }
}

/* ========== RTL SUPPORT ========== */
/* For RTL, gradients slide from right to left */
.link-purple:dir(rtl):hover,
.link-purple:dir(rtl):focus,
[dir="rtl"] .link-purple:hover,
[dir="rtl"] .link-purple:focus {
    animation-name: slideTextGradientRTL;
}

.link-purple:dir(rtl):hover::after,
.link-purple:dir(rtl):focus::after,
[dir="rtl"] .link-purple:hover::after,
[dir="rtl"] .link-purple:focus::after {
    animation-name: slideUnderlineGradientRTL;
    transform-origin: right;                  /* underline expands right → left */
}

/* RTL keyframes */
@keyframes slideTextGradientRTL {
    0% {
        background-position: -100% 0;         /* start from left side (primary) */
    }
    100% {
        background-position: 0% 0;            /* secondary reaches the right end */
    }
}

@keyframes slideUnderlineGradientRTL {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 0% 0;
    }
}

/* Adjust transform origin for RTL underline */
.link-purple:dir(rtl)::after,
[dir="rtl"] .link-purple::after {
    transform-origin: right;
}

/* ############################## tables link styles end ################################### */


/* ############################## paginations styles start ################################### */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding-left: 0;
    margin: 2rem 0 1rem;
    justify-content: center;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.875rem;
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: 7px;
    color: var(--primary-dark);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition, all 0.3s ease);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Hover state */
.page-link:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    transform: translateY(-0.5px);
    box-shadow: 0 2px 6px rgba(122, 28, 172, 0.1);
}

.page-link:focus {
    z-index: 3;
    color: var(--secondary);
    border-color: var(--pagination-white);
    background-color: var(--pagination-white);
    outline: 0;
    box-shadow: 0 0 0 0.25rem var(--secondary-subtle);
}

/* Active page */
.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(122, 28, 172, 0.2);
    pointer-events: none;   /* disables clicking */
}

/* Disabled state */
.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--pagination-white);
    border-color: var(--light-gray);
    color: var(--pagination-gray);
}

/* Focus state for accessibility */
.page-link:focus-visible {
    outline: 2px solid var(--primary, #7a1cac);
    outline-offset: 2px;
    border-radius: 7px;
}

/* First and last items with subtle rounding (optional, gap handles spacing) */
.page-item:first-child .page-link {
    border-radius: 7px;
}

.page-item:last-child .page-link {
    border-radius: 7px;
}

/* Optional: add icons/spacing for prev/next buttons via pseudo-elements */
.page-item:first-child .page-link i,
.page-item:last-child .page-link i {
    font-size: 0.85rem;
}

/* ========== RTL SUPPORT FOR PAGINATION ========== */
html[dir="rtl"] .pagination {
    padding-right: 0;
}

html[dir="rtl"] .page-link {
    /* Keep same visual, but icons may flip if needed */
    transform: scaleX(1);
}

/* For RTL, if using prev/next arrows, they should be mirrored */
html[dir="rtl"] .page-item:first-child .page-link i.fa-chevron-left,
html[dir="rtl"] .page-item:first-child .page-link i.fa-angle-left {
    transform: rotate(180deg);
    display: inline-block;
}

html[dir="rtl"] .page-item:last-child .page-link i.fa-chevron-right,
html[dir="rtl"] .page-item:last-child .page-link i.fa-angle-right {
    transform: rotate(180deg);
    display: inline-block;
}

/* ========== RESPONSIVE PAGINATION ========== */
@media (max-width: 768px) {
    .pagination {
        gap: 0.35rem;
        margin: 1.5rem 0;
    }
    
    .page-link {
        min-width: 2.2rem;
        height: 2.2rem;
        padding: 0 0.65rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .page-link {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.5rem;
        font-size: 0.8rem;
    }
}

/* Optional: Compact pagination variants - add class .pagination-sm if needed */
.pagination-sm .page-link {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.65rem;
    font-size: 0.8rem;
}

.pagination-sm .pagination {
    gap: 0.35rem;
}

/* ========== ALIGNMENT WITH MODERN TABLE THEME ========== */
/* Pagination wrapper consistency */
nav[aria-label*="pagination"] {
    margin-top: 0.5rem;
}

/* Subtle animation for page change (works with JS updates) */
.page-link {
    will-change: transform, background;
}

.page-item:not(.disabled) .page-link:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

/* ############################## paginations styles end ################################### */

/* ############################## button styles start ################################### */
.btn {
    font-weight: 500;
    font-size: var(--body-font-size);
    line-height: 1.5;
    color: white;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 7px;
    background-color: transparent;
    align-items: center !important;
    justify-content: center !important;
    display: inline-flex;
    padding: 0 0.875rem;
    min-width: 2.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    height: 2.9rem;
    text-decoration: none;
    transition: var(--transition, all 0.3s ease);
}

.btn i {
    font-size: 1.1rem !important;
}

.btn-round {
    border-radius: 50% !important;
    width: 48px;
    height: 48px;
}

.btn-primary{
    background: var(--primary-middle);
    border: 1px solid var(--primary-middle);
    color: white !important;
}

.btn-primary:hover{
    background: var(--secondary);
    border-color: var(--secondary);
    color: white !important;
}

.btn-primary:active{
    background: var(--primary);
    border-color: var(--primary);
    color: white !important;
}

.btn-primary:disabled, .btn-primary.disabled{
    background: var(--primary-subtle);
    border: transparent ;
    opacity: var(--btn-disabled-opacity);
}

.btn-primary-outline{
    background: transparent;
    border: 1px solid var(--primary-middle);
    color: var(--primary-middle) !important;
}

.btn-primary-outline:hover{
    background: var(--secondary);
    border-color: var(--secondary);
    color: white !important;
}

.btn-primary-outline.active{
    background: var(--secondary);
    border-color: var(--secondary);
    color: white !important;
}

.btn-secondary {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  border-color: var(--secondary-light);
  color: white !important;
}

.btn-secondary:disabled, .btn-secondary.disabled{
    background: var(--secondary-subtle);
    border: transparent ;
    opacity: var(--btn-disabled-opacity);
}

.btn-secondary-outline{
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary) !important;
    border-width: 2px;
}

.btn-secondary-outline:hover{
    background: var(--secondary);
    border-color: var(--secondary);
    color: white !important;
}

.btn-secondary-outline.active{
    background: var(--secondary);
    border-color: var(--secondary);
    color: white !important;
}

.btn-success {
  background-color: var(--success);
  border-color: var(--success);
  color: white;
}

.btn-success:hover {
  background-color: var(--success-light);
  border-color: var(--success-light);
  color: white !important;
}

.btn-success:disabled, .btn-success.disabled{
    background: var(--success-subtle);
    border: transparent ;
    opacity: var(--btn-disabled-opacity);
}

.btn-success-outline{
    background: transparent;
    border: 1px solid var(--success);
    color: var(--success) !important;
    border-width: 2px;
}

.btn-success-outline:hover{
    background: var(--success);
    border-color: var(--success);
    color: white !important;
}

.btn-success-outline.active{
    background: var(--success);
    border-color: var(--success);
    color: white !important;
}

.btn-danger {
  background-color: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn-danger:hover {
  background-color: var(--danger-light);
  border-color: var(--danger-light);
  color: white !important;
}

.btn-danger:disabled, .btn-danger.disabled{
    background: var(--danger-subtle);
    border: transparent ;
    opacity: var(--btn-disabled-opacity);
}

/* Warning button */
.btn-warning {
  background-color: var(--warning);
  border-color: var(--warning);
  color: white;
}
.btn-warning:hover {
  background-color: var(--warning-light) !important;
  border-color: var(--warning-light) !important;
  color: white !important;
}
.btn-warning:disabled, .btn-warning.disabled{
    background: var(--warning-subtle);
    border: transparent;
    color: white;
    opacity: var(--btn-disabled-opacity);
}

/* Info button */
.btn-info {
  background-color: var(--info) !important;
  border-color: var(--info) !important;
  color: white !important;
}

.btn-info:hover {
  background-color: var(--info-light) !important;
  border-color: var(--info-light) !important;
  color: white !important;
}

.btn-info:disabled, .btn-info.disabled{
    background: var(--info-subtle);
    border: transparent ;
    opacity: var(--btn-disabled-opacity);
}

.btn-info-outline{
    background: transparent;
    border: 1px solid var(--info);
    color: var(--info) !important;
    border-width: 2px;
}

.btn-info-outline:hover{
    background: var(--info);
    border-color: var(--info);
    color: white !important;
}

.btn-info-outline.active{
    background: var(--info);
    border-color: var(--info);
    color: white !important;
}

.btn-light{
    border: red !important;
    color: red !important;
    background-color: lightcoral;
 /* delete it later  */
}

.btn-light-gray{
    background: var(--light-gray);
    border: 1px solid var(--light-gray);
    color: white !important;
}

.btn-light-gray:hover{
    background: var(--light-gray-light);
    border-color: var(--light-gray-light);
    color: white !important;
}

.btn-light-gray:active{
    background: var(--light-gray);
    border-color: var(--light-gray);
    color: white !important;
}
.btn-light-gray:disabled, .btn-light-gray.disabled{
    background: var(--light-gray-light);
    border: transparent ;
    opacity: var(--btn-disabled-opacity);
}

/* ========== BUTTON PRESSED & ACTIVE STATES ========== */

/* Momentary click feedback – all buttons */
.btn:active {
    transform: scale(0.97);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: transform 0.08s linear, background 0.1s ease;
}

/* Darker backgrounds on press for each variant */
.btn-primary:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.btn-secondary:active {
    background-color: var(--secondary-light) !important;
    border-color: var(--secondary-light) !important;
}

.btn-success:active {
    background-color: #1e8b4b !important;
    border-color: #1e8b4b !important;
}

.btn-danger:active {
    background-color: #b91c1c !important;
    border-color: #b91c1c !important;
}

.btn-warning:active {
    background-color: #e69500 !important;
    border-color: #e69500 !important;
}

.btn-info:active {
    background-color: #1a6bbf !important;
    border-color: #1a6bbf !important;
}

/* Persistent active state for tab buttons (when a tab is selected) */
.btn-info.active,
.btn-info:active.active {
    background-color: #0f5b9e !important;
    border-color: #0f5b9e !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: none;   /* no scale while active */
    font-weight: 600;
}

.btn-warning.active {
    background-color: #cc8400 !important;
    border-color: #cc8400 !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: none;
    font-weight: 600;
}

.btn-danger.active {
    background-color: #991b1b !important;
    border-color: #991b1b !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: none;
    font-weight: 600;
}

.btn-secondary.active,
.btn-secondary:active.active {
    background-color: #9337c9 !important;
    border-color: #9337c9 !important;

    box-shadow: inset 0 2px 5px rgba(70, 16, 102, 0.3);

    transform: none;
    font-weight: 600;
}
/* Fallback for any other .btn.active (e.g., custom button states) */
.btn.active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    filter: brightness(0.95);
    transform: none;
}

/* Keep focus visible for keyboard navigation */
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ############################## button styles end ################################### */

/* ############################## inputs styles start ################################### */

/* ========== MODERN FORM ELEMENTS ========== */
/* Labels */
.modern-form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--body-color);
    transition: var(--transition);
}

/* Base input & select styling – same height & matching design */
.modern-form-control,
.modern-form-select {
    /* display: flex; */
    /* align-items: center; */
    width: 100%;
    padding: 0.1rem 0.55rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-dark);
    background-clip: padding-box;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Ensure both input & select have exactly the same height */
.modern-form-control,
.modern-form-select {
    height: calc(2.7rem + 2px); /* consistent height ~44px */
}

/* For textareas or other variants, keep height auto */
.modern-form-control {
    height: auto;
    min-height: calc(2.7rem + 2px);
}

/* Select custom arrow (modern) */
.modern-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a1cac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.1rem;
    padding-right: 2.5rem;
}

/* RTL support for select arrow */
html[dir="rtl"] .modern-form-select {
    background-position: left 0.9rem center;
    padding-right: 0.9rem;
    padding-left: 2.5rem;
}

/* Focus state – matches theme primary color */
.modern-form-control:focus,
.modern-form-select:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 3px 2px rgba(122, 28, 172, 0.1);
    background-color: #fff;
}

/* Hover state */
.modern-form-control:hover,
.modern-form-select:hover {
    border-color: var(--secondary);
}

/* Placeholder styling */
.modern-form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
    opacity: 1;
}

/* Disabled / readonly */
.modern-form-control:disabled,
.modern-form-select:disabled,
.modern-form-control[readonly] {
    background-color: #f8fafc;
    opacity: 0.7;
    cursor: not-allowed;
}
  
.modern-form-control:disabled:hover,
.modern-form-select:disabled:hover {
    border-color: var(--light-gray);
}

input[type="color"].modern-form-control {
    background-color: #fff;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch {
    height: 10px;
    border-radius: 7px;
    border-color: transparent !important;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

/* Chrome, Safari, Edge, Opera */
.modern-form-control::-webkit-outer-spin-button,
.modern-form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
.modern-form-control[type=number] {
    -moz-appearance: textfield;
}

/* ========== CHOICES.JS – MODERN THEME INTEGRATION ========== */
/* Base container – matches modern-form-control height & appearance */
.choices {
    border: 1px solid var(--light-gray, #e2e8f0);
    border-radius: var(--border-radius);
    background: #fff;
    transition: var(--transition, all 0.3s ease);
    /* Ensure consistent height overall */
    height: calc(2.7rem + 2px);
}

/* Hover state like modern inputs */
.choices:hover {
    border-color: var(--secondary, #ad49e1);
}

/* Focus state on the whole component (when opened or focused) */
.choices:focus-within {
    border-color: var(--primary, #7a1cac);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(122, 28, 172, 0.2);
}

/* Inner wrapper – remove all default padding/border */
.choices__inner {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    min-height: auto !important;
    border-radius: 0 !important;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Single select – selected value area */
.choices__list--single {
    padding: 0 0.9rem !important;
    display: flex !important;
    align-items: center;
    height: 100%;
}

/* The text of the selected option */
.choices__list--single .choices__item {
    color: var(--text-dark, #2a3547);
    line-height: 1.5;
}

/* Placeholder text */
.choices__placeholder {
    color: #a0aec0;
    opacity: 1;
}

/* Dropdown arrow (native-like chevron) – we keep the custom arrow already defined.
   But ensure it's vertically centered. The existing background-image is fine,
   though we may need to adjust positioning because of the new height. */
.choices[data-type*=select-one]::after {
    display: none;
}

.choices[data-type*=select-one] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a1cac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.1rem;
    /* Add extra right padding to prevent text from overlapping the arrow */
    padding-right: 2.5rem;
}

.choices[data-type*=select-one].is-disabled, .choices[data-type*=select-one].is-disabled .choices__button {
    background-image: none;
    cursor: not-allowed;
}

html[dir="rtl"] .choices[data-type*=select-one] {
    background-position: left 0.9rem center;
    padding-right: 0.9rem;
    padding-left: 2.5rem;
}

.choices[data-type*=select-one] .choices__button {
  margin-right: 30px !important;
}

.choices[data-type*=select-one][dir=rtl] .choices__button {
  margin-left: 30px !important;
}

.choices[data-type*=select-one].is-open {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a1cac' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'%3E%3C/polyline%3E%3C/svg%3E");
}

.choices[data-type*=select-one] .choices__inner {
    padding-right: 0 !important;
}

/* RTL arrow */
html[dir="rtl"] .choices[data-type*=select-one]::after {
    right: auto;
    left: 0.9rem;
}

/* When open, rotate arrow */
.choices[data-type*=select-one].is-open::after {
    border-width: 0 5px 5px 5px;
    border-color: transparent transparent var(--primary, #7a1cac) transparent;
}

/* Remove the default inner pseudo-element if not needed */
.choices[data-type*=select-one] .choices__inner {
    padding-bottom: 0;
}

/* Search input inside the dropdown – matches modern-form-control */
.choices__input {
    background-color: #fff !important;
    border: 1px solid var(--light-gray, #e2e8f0) !important;
    border-radius: var(--border-radius) !important;
    padding: 0.5rem 0.8rem !important;
    margin: 0.5rem !important;
    width: calc(100% - 1rem) !important;
    transition: var(--transition);
}

.choices__input:focus {
    border-color: var(--primary, #7a1cac) !important;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(122, 28, 172, 0.2);
}

/* Dropdown menu */
.choices__list--dropdown {
    z-index: 1400 !important;
    border: 1px solid var(--light-gray, #e2e8f0) !important;
    border-radius: var(--border-radius) !important;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    margin-top: 0.5rem;
    top: 100% !important;
    bottom: auto !important;
    transform: none !important;
}

/* Dropdown items */
.choices__list--dropdown .choices__item {
    padding: 0.6rem 0.9rem;
    color: var(--text-dark, #2a3547);
}

/* Hover on dropdown items */
.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: var(--primary-light, #f7e9ff);
    color: var(--primary-dark, #350b4a);
}

/* Selected item in dropdown (when highlighted/active) */
.choices__list--dropdown .choices__item--selected {
    background-color: var(--primary, #7a1cac);
    color: #fff;
}

/* Multiple select – tags (selected items) */
.choices__list--multiple .choices__item {
    background-color: var(--primary, #7a1cac) !important;
    border: 1px solid var(--primary, #7a1cac) !important;
    border-radius: 8px;
    padding: 0.2rem 0.6rem;
    color: #fff;
}

/* Remove button inside multiple tags */
.choices__list--multiple .choices__button {
    border-left: 1px solid rgba(255, 255, 255, 0.3) !important;
    background-size: 8px;
    opacity: 0.7;
}

.choices__list--multiple .choices__button:hover {
    opacity: 1;
}

/* Disabled state */
.choices.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.choices.is-disabled .choices__inner {
    background-color: #f8fafc;
}

.choices.is-disabled:hover {
    border-color: var(--light-gray);
}

/* RTL adjustments for the dropdown items */
html[dir="rtl"] .choices__list--dropdown .choices__item,
html[dir="rtl"] .choices__list--single .choices__item {
    text-align: right;
}

/* Ensure the main container height is consistent even when no value selected */
.choices__list--single {
    min-height: 100%;
}

/* Fix for when there are multiple items – the container height may grow.
   For consistency, we keep auto height but limit to single-line by default.
   If you want fixed height even with multiple, override. */
.choices[data-type*=select-multiple] {
    height: auto;
    min-height: calc(2.7rem + 2px);
}

.choices[data-type*=select-multiple] .choices__inner {
    flex-wrap: wrap;
    padding: 0.2rem 0.5rem !important;
    gap: 0.25rem;
}

.choices.is-disabled .choices__item{
    color: var(--text-dark) !important;
}

/* Responsive – keep similar adjustments as modern forms */
@media (max-width: 768px) {
    .choices {
        height: calc(2.5rem + 2px);
    }
    .choices[data-type*=select-multiple] {
        min-height: calc(2.5rem + 2px);
    }
    .choices__list--single {
        padding: 0 0.75rem !important;
    }
    .choices__list--dropdown .choices__item {
        padding: 0.5rem 0.75rem;
    }
}

/* ============================================
   SUFFIX SYMBOL (for text inputs only)
   Works with .modern-form-control
   ============================================ */

/* Container that holds the input + symbol */
.input-group-suffix {
  position: relative;
  display: block;
  width: 100%;
}

/* The suffix symbol itself (positioned at the end on the right side) */
.input-symbol-suffix {
  position: absolute;
  right: 0.4rem;           /* aligns with the input's original padding-right */
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 500;
  pointer-events: auto; 
  z-index: 1;
  white-space: nowrap;
}

.input-symbol-suffix:hover {
    cursor: default;
}

/* Adjust input padding to make room for the symbol */
.input-group-suffix .modern-form-control {
  padding-right: 2.5rem !important;
}

/* ----- RTL (right-to-left) support ----- */
/* In RTL, the "end" becomes the left side, so mirror everything */
html[dir="rtl"] .input-group-suffix .input-symbol-suffix {
  right: auto;
  left: 0.9rem;            /* symbol moves to left side */
}

html[dir="rtl"] .input-group-suffix .modern-form-control {
  padding-right: 0.3rem !important;
  padding-left: 2.5rem !important;   /* mirror padding */
}

/* ----- Responsive adjustments (optional) ----- */
@media (max-width: 768px) {
  .input-symbol-suffix {
    font-size: 0.85rem;
  }
  .input-group-suffix .modern-form-control {
    padding-right: 2.2rem !important;
  }
  html[dir="rtl"] .input-group-suffix .modern-form-control {
    padding-left: 2.2rem !important;
  }
}

.quantity-inline-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.quantity-inline-group .modern-form-control {
  flex: 1 1 auto;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.quantity-inline-suffix {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  white-space: nowrap;
  border: 1px solid var(--bs-border-color);
  border-left: 0;
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  color: var(--primary);
  background: var(--bs-body-bg);
  flex: 0 0 auto;
}

/* RTL */
html[dir="rtl"] .quantity-inline-group {
  flex-direction: row-reverse;
}

html[dir="rtl"] .quantity-inline-group .modern-form-control {
  border-top-right-radius: 0.375rem;
  border-bottom-right-radius: 0.375rem;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

html[dir="rtl"] .quantity-inline-suffix {
  border-left: 1px solid var(--bs-border-color);
  border-right: 0;
  border-top-left-radius: 0.375rem;
  border-bottom-left-radius: 0.375rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}


/* ############################## inputs styles end ################################### */

/* ############################## card styles start ################################### */

.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--light-gray);
  border-top: 4px solid var(--primary);
  border-radius: 7px !important;
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.03);
  /* overflow: hidden; */
  width: 100%;
  color: var(--body-color);
  margin: auto;
}

.card-1300px {
  max-width: 1300px;

}

.card-1200px {
  max-width: 1200px;

}

.card-1100px {
  max-width: 1100px;

}

.card-1060px {
  max-width: 1060px;

}

.card-1000px {
  max-width: 1000px;

}

.card-700px {
  max-width: 700px;
}

.overview-card{
    border-top: 1px solid var(--light-gray);
    box-shadow: none;
}

.card-header {
  background: transparent;
  padding: 20px;
  border-bottom: 1px solid var(--light-gray);
}

/* ############################## card styles end ################################### */

/* ############################## modal styles start ################################### */

.modal {
    --bs-modal-zindex: 1055;
    --bs-modal-width: 500px;
    --bs-modal-padding: 1rem;
    --bs-modal-margin: 0.5rem;
    --bs-modal-bg: #f8f9ff;
    --bs-modal-border-width: 0;
    --bs-modal-border-radius: 7px;
    --bs-modal-box-shadow: var(--bs-box-shadow-sm);
    --bs-modal-inner-border-radius: 7px;
    --bs-modal-header-padding-x: 1rem;
    --bs-modal-header-padding-y: 1rem;
    --bs-modal-header-padding: 1rem 1rem;
    --bs-modal-header-border-width: 0;
    --bs-modal-title-line-height: 1.5;
    --bs-modal-footer-gap: 0.5rem;
    --bs-modal-footer-border-width: 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--bs-modal-zindex);
    display: none;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background-color: #0000004a;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: var(--bs-modal-margin);
    pointer-events: none
}

.modal.fade .modal-dialog {
    transition: transform .3s ease-out;
    transform: translate(0,-50px)
}

@media (prefers-reduced-motion:reduce) {
    .modal.fade .modal-dialog {
        transition: none
    }
}

.modal.show .modal-dialog {
    transform: none
}

.modal.modal-static .modal-dialog {
    transform: scale(1.02)
}

.modal-dialog-scrollable {
    height: calc(100% - var(--bs-modal-margin) * 2)
}

.modal-dialog-scrollable .modal-content {
    max-height: 100%;
    overflow: hidden
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto
}

.modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - var(--bs-modal-margin) * 2)
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    color: var(--bs-modal-color);
    pointer-events: auto;
    background-color: var(--bs-modal-bg);
    background-clip: padding-box;
    border: var(--bs-modal-border-width) solid var(--bs-modal-border-color);
    border-radius: var(--bs-modal-border-radius);
    box-shadow: var(--bs-modal-box-shadow);
    outline: 0
}

.modal-backdrop {
    --bs-backdrop-zindex: 1050;
    --bs-backdrop-bg: #000;
    --bs-backdrop-opacity: 0.5;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--bs-backdrop-zindex);
    width: 100vw;
    height: 100vh;
    background-color: #00000000
}

.modal-backdrop.fade {
    opacity: 0
}

.modal-backdrop.show {
    opacity: var(--bs-backdrop-opacity)
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: var(--bs-modal-header-padding);
    border-bottom: var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);
    background: linear-gradient(135deg, var(--primary-middle), var(--primary)) !important;
    border-bottom: none !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 7px 7px 0 0 !important;    
}

.modal-header.bg-danger {
  background: var(--danger) !important;
}

.modal-header.bg-warning {
  background: var(--warning) !important;
}

.modal-header .btn-close {
    color: var(--light-gray);
    padding: calc(var(--bs-modal-header-padding-y) * .5) calc(var(--bs-modal-header-padding-x) * .5);
    margin: calc(-.5 * var(--bs-modal-header-padding-y)) calc(-.5 * var(--bs-modal-header-padding-x)) calc(-.5 * var(--bs-modal-header-padding-y)) auto
}

.modal-title {
    margin-bottom: 0;
    line-height: var(--bs-modal-title-line-height)
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: var(--bs-modal-padding)
}

.modal-footer {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);
    background-color: var(--bs-modal-footer-bg);
    border-top: var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);
    border-bottom-right-radius: var(--bs-modal-inner-border-radius);
    border-bottom-left-radius: var(--bs-modal-inner-border-radius)
}

.modal-footer>* {
    margin: calc(var(--bs-modal-footer-gap) * .5)
}

@media (min-width: 576px) {
    .modal {
        --bs-modal-margin:1.75rem;
        --bs-modal-box-shadow: var(--bs-box-shadow)
    }

    .modal-dialog {
        max-width: var(--bs-modal-width);
        margin-right: auto;
        margin-left: auto
    }

    .modal-sm {
        --bs-modal-width: 300px
    }
}

@media (min-width: 992px) {
    .modal-lg,.modal-xl {
        --bs-modal-width:800px
    }
}

@media (min-width: 1300px) {
    .modal-xl {
        --bs-modal-width:1140px
    }
}

.modal-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0
}

.modal-fullscreen .modal-content {
    height: 100%;
    border: 0;
    border-radius: 0
}

.modal-fullscreen .modal-footer,.modal-fullscreen .modal-header {
    border-radius: 0
}

.modal-fullscreen .modal-body {
    overflow-y: auto
}

@media (max-width: 575.98px) {
    .modal-fullscreen-sm-down {
        width:100vw;
        max-width: none;
        height: 100%;
        margin: 0
    }

    .modal-fullscreen-sm-down .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0
    }

    .modal-fullscreen-sm-down .modal-footer,.modal-fullscreen-sm-down .modal-header {
        border-radius: 0
    }

    .modal-fullscreen-sm-down .modal-body {
        overflow-y: auto
    }
}

@media (max-width: 767.98px) {
    .modal-fullscreen-md-down {
        width:100vw;
        max-width: none;
        height: 100%;
        margin: 0
    }

    .modal-fullscreen-md-down .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0
    }

    .modal-fullscreen-md-down .modal-footer,.modal-fullscreen-md-down .modal-header {
        border-radius: 0
    }

    .modal-fullscreen-md-down .modal-body {
        overflow-y: auto
    }
}

@media (max-width: 991.98px) {
    .modal-fullscreen-lg-down {
        width:100vw;
        max-width: none;
        height: 100%;
        margin: 0
    }

    .modal-fullscreen-lg-down .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0
    }

    .modal-fullscreen-lg-down .modal-footer,.modal-fullscreen-lg-down .modal-header {
        border-radius: 0
    }

    .modal-fullscreen-lg-down .modal-body {
        overflow-y: auto
    }
}

@media (max-width: 1299.98px) {
    .modal-fullscreen-xl-down {
        width:100vw;
        max-width: none;
        height: 100%;
        margin: 0
    }

    .modal-fullscreen-xl-down .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0
    }

    .modal-fullscreen-xl-down .modal-footer,.modal-fullscreen-xl-down .modal-header {
        border-radius: 0
    }

    .modal-fullscreen-xl-down .modal-body {
        overflow-y: auto
    }
}

@media (max-width: 1399.98px) {
    .modal-fullscreen-xxl-down {
        width:100vw;
        max-width: none;
        height: 100%;
        margin: 0
    }

    .modal-fullscreen-xxl-down .modal-content {
        height: 100%;
        border: 0;
        border-radius: 0
    }

    .modal-fullscreen-xxl-down .modal-footer,.modal-fullscreen-xxl-down .modal-header {
        border-radius: 0
    }

    .modal-fullscreen-xxl-down .modal-body {
        overflow-y: auto
    }
}




.btn-close {
    --bs-btn-close-color: var(--light-gray);
    --bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23bfc3c8'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    --bs-btn-close-hover-opacity: 0.75;
    --bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(239, 93, 255, 0.25);
    --bs-btn-close-focus-opacity: 1;
    --bs-btn-close-disabled-opacity: 0.25;
    --bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: .25em .25em;
    color: var(--light-gray);
    background: transparent var(--bs-btn-close-bg) center/1em auto no-repeat;
    border: 0;
    border-radius: 7px;
}

.btn-close:hover {
    color: var(--bs-btn-close-color);
    text-decoration: none;
    opacity: var(--bs-btn-close-hover-opacity)
}

.btn-close:focus {
    outline: 0;
    box-shadow: var(--bs-btn-close-focus-shadow);
    opacity: var(--bs-btn-close-focus-opacity)
}

.btn-close.disabled,.btn-close:disabled {
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    opacity: var(--bs-btn-close-disabled-opacity)
}

.btn-close-white {
    filter: var(--bs-btn-close-white-filter)
}

[data-bs-theme=dark] .btn-close {
    filter: var(--bs-btn-close-white-filter)
}

/* ############################## modal styles end ################################### */

/* ############################## settings side tabs styles start ################################### */

 /* Tabs (settings-nav) - modern pill style */
  .settings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  }

  .settings-nav .list-group-item {
    border: none;
    background: transparent;
    padding: 0.75rem 1.25rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    width: 100%;
  }
  
  [dir="ltr"] .settings-nav .list-group-item {
    /* tab shape for LTR */
    border-radius: 0 7px 7px 0;
    padding-left: 1.25rem;
  }

  [dir="rtl"] .settings-nav .list-group-item {
    /* tab shape for RTL */
    border-radius: 7px 0 0 7px;
    padding-right: 1.25rem;
  }  

  /* Icon styling */
  .settings-nav .list-group-item i {
    width: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    color: var(--primary);
    transition: var(--transition);
  }

  /* Hover state */
  .settings-nav .list-group-item:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding-left: calc(1.25rem + 2px);
  }
  .settings-nav .list-group-item:hover i {
    color: var(--primary-dark);
  }

  /* Active tab - gradient background */
  .settings-nav .list-group-item.active {
    background: linear-gradient(135deg, var(--primary-middle), var(--primary));
    color: white;
    box-shadow: 0 4px 12px rgba(122, 28, 172, 0.25);
  }
  .settings-nav .list-group-item.active i {
    color: white;
  }

  /* RTL adjustments */
  [dir="rtl"] .settings-nav .list-group-item:hover {
    padding-right: calc(1.25rem + 2px);
  }
  [dir="rtl"] .settings-nav .list-group-item i {
    margin-left: 0;
    margin-right: 0;
  }

  /* Responsive: horizontal scroll on small screens */
  @media (max-width: 767px) {
    .settings-nav {
      flex-direction: column;
      overflow-x: auto;
      padding-bottom: 0.5rem;
      gap: 0.5rem;
      scrollbar-width: thin;
    }
    .settings-nav .list-group-item {
      white-space: nowrap;
      margin-bottom: 0;
    }
  }

  /* Weekday rows for pattern days */
  .weekday-row {
    border: 1px solid var(--light-gray);
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: #fff;
    transition: var(--transition);
  }
  .weekday-row:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(122, 28, 172, 0.05);
  }

/* ############################## settings side tabs styles end ################################### */

/* ############################## form check styles start ################################### */
.form-check {
    display: flex;
    align-items: start;
    min-height: 1.5rem;
    padding-left: 1.5em;
    margin-left: 0.3rem;
}

.form-check-input:checked, .form-check-input[type=checkbox]:indeterminate {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check .form-check-input {
    float: left;
    margin-left: -1.5em;
}

input[type="checkbox"] {
    margin-right: 0.5rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    width: 1.1rem;
    height: 1.1rem;
}

.form-check-input {
    flex-shrink: 0;
    width: 1em;
    height: 1em;
    margin-top: 0;
    vertical-align: top;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: var(--bs-form-check-bg-image);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.form-check-input:focus {
    border-color: var(--secondary);
    outline: 0;
    box-shadow: 0 0 0 .25rem var(--primary-subtle);
}

/* ############################## dropzone styles end ################################### */

/* ############################## badge styles start ################################### */
.sp-badge {
  padding: 0.35rem 0.6rem !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  font-size: inherit !important;
}
/* ############################## badge styles start ################################### */

/* ***************** title separator start ****************** */
.section-separator {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.section-separator::before {
    content: "";
    flex: 0.1;
    height: 1px;
    background: var(--light-gray-light);
}

.section-separator::after {
    content: "";
    flex: 1.9;
    height: 1px;
    background: var(--light-gray-light);
}

/* ***************** title separator end ****************** */

/* ############################## radio styles start ################################### */
input[type="radio"] {
    accent-color: var(--primary);
    margin-right: 0.5rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    width: 1.1rem;
    height: 1.1rem;
}

/* ############################## radio styles end ################################### */

/* ############################## scrollbar styles end ################################### */

::-webkit-scrollbar {
  width: 0.45rem;
  height: 0.45rem;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.7);
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background-color: rgba(241, 245, 249, 0.8);
}
/* ############################## scrollbar styles end ################################### */

/* ############################## item image upload styles start ################################### */
.item-image-preview-box {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.item-image-placeholder {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1 / 1;
    border: 1px dashed #ced4da;
    border-radius: 0.75rem;
    background: #fff;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.3;
}

.item-image-dropzone {
    min-height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease-in-out;
    outline: none;
    border: 2px dashed var(--primary);
    border-radius:7px;
    padding: 20px;
    background: var(--primary-light) !important;
  
}

.item-image-dropzone:hover {
    border-color: var(--secondary) !important;
    background: var(--primary-subtle) !important;
}

.item-image-dropzone .file-name {
    word-break: break-word;
    white-space: normal;
    margin-bottom: 0;
}

.item-image-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.item-image-upload-actions .btn {
    border-radius: 0.6rem;
}

@media (max-width: 576px) {
.item-image-preview-box,
.item-image-placeholder {
    max-width: 150px;
    margin-inline: auto;
}
}

.item-image-preview-wrap {
  position: relative;
  width: 100%;
  max-width: 180px;
}


.item-image-clear-btn {
  position: absolute;
  top: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--danger) !important;
  background-color: rgba(196, 196, 196, 0.395);
  min-width: 1rem !important;
  border: 1px solid var(--light-gray);
}

.item-image-clear-btn:hover{
    border: 1px solid var(--light-gray);
    background-color: rgba(196, 196, 196, 0.648);
}

html[dir="rtl"] .item-image-clear-btn {
    left: 6px;
}

html[dir="ltr"] .item-image-clear-btn  {
    right: 6px;
}

.item-image-clear-btn i {
  font-size: 0.8rem;
}  


.item-image-view-btn {
  position: absolute;
  top: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--info) !important;
  background-color: rgba(196, 196, 196, 0.395);
  min-width: 1rem !important;
  border: 1px solid var(--light-gray);
}

.item-image-view-btn:hover{
    border: 1px solid var(--light-gray);
    background-color: rgba(196, 196, 196, 0.648);
}

html[dir="rtl"] .item-image-view-btn {
    left: 40px;
}

html[dir="ltr"] .item-image-view-btn  {
    right: 40px;
}

.item-image-view-btn i {
  font-size: 0.8rem;
}  

/* ############################## item image upload styles end ################################### */

.icon-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.icon-btn:hover {
    opacity: 70%;
}

/* #################################### */

.border-primary-subtle{
    border-left: 3px solid var(--primary-subtle);
}

html[dir=rtl] .border-primary-subtle{
    border-right: 3px solid var(--primary-subtle);
}


/* ################################## progress bar ########################################### */
.progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: var(--white);
    text-align: center;
    white-space: nowrap;
    background-color: var(--secondary);
    transition: width 0.6s ease;
}

.progress, .progress-stacked {
    display: flex;
    height: 1rem;
    overflow: hidden;
    background-color: var(--light-gray-subtle);
    border-radius: 0.375rem;
}

.progress-bar-container {
    width: 110px;
}

/* ########################################################################## */
.width-20 {
    width: 20%;
}

/* ################### margin / padding rtl friendly ####################### */
html[dir=rtl] .me-0 {
    margin-right: unset!important;
    margin-left: 0!important
}

html[dir=rtl] .me-1 {
    margin-right: unset!important;
    margin-left: .25rem!important
}

html[dir=rtl] .me-2 {
    margin-right: unset!important;
    margin-left: .5rem!important
}

html[dir=rtl] .me-3 {
    margin-right: unset!important;
    margin-left: 1rem!important
}

html[dir=rtl] .me-4 {
    margin-right: unset!important;
    margin-left: 1.5rem!important
}

html[dir=rtl] .me-5 {
    margin-right: unset!important;
    margin-left: 3rem!important
}

html[dir=rtl] .ms-0 {
    margin-left: unset!important;
    margin-right: 0!important
}

html[dir=rtl] .ms-1 {
    margin-left: unset!important;
    margin-right: .25rem!important
}

html[dir=rtl] .ms-2 {
    margin-left: unset!important;
    margin-right: .5rem!important
}

html[dir=rtl] .ms-3 {
    /* margin-left: unset!important; */
    margin-right: 1rem!important
}

html[dir=rtl] .ms-4 {
    margin-left: unset!important;
    margin-right: 1.5rem!important
}

html[dir=rtl] .ms-5 {
    margin-left: unset!important;
    margin-right: 3rem!important
}

html[dir=rtl] .pe-0 {
    padding-right: unset!important;
    padding-left: 0!important
}

html[dir=rtl] .pe-1 {
    padding-right: unset!important;
    padding-left: .25rem!important
}

html[dir=rtl] .pe-2 {
    padding-right: unset!important;
    padding-left: .5rem!important
}

html[dir=rtl] .pe-3 {
    padding-right: unset!important;
    padding-left: 1rem!important
}

html[dir=rtl] .pe-4 {
    padding-right: unset!important;
    padding-left: 1.5rem!important
}

html[dir=rtl] .pe-5 {
    padding-right: unset!important;
    padding-left: 3rem!important
}

html[dir=rtl] .ps-0 {
    padding-left: unset!important;
    padding-right: 0!important
}

html[dir=rtl] .ps-1 {
    padding-left: unset!important;
    padding-right: .25rem!important
}


html[dir=rtl] .ps-2 {
    padding-left: unset!important;
    padding-right: .5rem!important
}

html[dir=rtl] .ps-3 {
    padding-left: unset!important;
    padding-right: 1rem!important
}
html[dir=rtl] .ps-4 {
    padding-left: unset!important;
    padding-right: 1.5rem!important
}

html[dir=rtl] .ps-5 {
    padding-left: unset!important;
    padding-right: 3rem!important
}

/* ############################## attachemnts styles start ################################### */

/* Attachment list wrapper */
.attachment-list-wrap {
  background: rgba(248, 249, 250, 0.55);
  border: 1px solid rgba(128, 128, 128, 0.15);
  border-radius: 7px;
  padding: 0.5rem;
  transition: var(--transition);
  max-height: 200px;
  overflow-y: auto;
}

/* Row */
.attachment-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.5rem;
  border-bottom: 1px solid rgba(122, 28, 172, 0.08);
  transition: var(--transition);
}

.attachment-list-item:last-child {
  border-bottom: none;
}

.attachment-list-item:hover {
  background: rgba(122, 28, 172, 0.03);
  border-radius: 7px;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.attachment-list-item:hover:not(:first-child) {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

/* File info area */
.attachment-file-info {
  display: flex;
  align-items: center;
}

/* File icon */
.attachment-file-icon {
  color: var(--primary);
  transition: var(--transition);
  padding: 5px;
}

.attachment-list-item:hover .attachment-file-icon {
  transform: scale(1.05);
  color: var(--secondary);
}

/* File name */
.attachment-file-name {
  min-width: 0;
  font-size: 0.85rem;
  color: var(--text-dark);
  text-decoration: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Actions */
.attachment-file-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
  font-size: 1rem;
}


/* ############################## attachemnts styles end ################################### */

/* ############################## dropzone styles start ################################### */

.custom-dropzone {
  position: relative;
  border: 2px dashed var(--primary);
  border-radius: 12px;
  padding: 20px;
  background: var(--primary-light);
  cursor: pointer;
  transition: 0.2s ease;
  text-align: center;
}

.custom-dropzone:hover,
.custom-dropzone.dragover {
  border-color: var(--secondary);
  background: var(--primary-subtle);
}

.custom-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  transition: 0.2s ease;
}

.file-item:hover {
  background: var(--primary-light);
  /* border-color: var(--primary); */
  transform: translateY(-1px);
}

.file-name {
  font-weight: 500;
  color: #0f172a;
}

.file-size {
  font-size: 12px;
  color: #64748b;
}

/* ############################## dropzone styles end ################################### */

/* ############################## restaurant kitchen order card styles styles start ################################### */

/* small card grid styles (keeps your existing theme classes) */
.order-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.order-card {
  background: #fff;
  border-radius: 7px;
  box-shadow: 1px 3px 10px 0px rgba(0, 0, 0, 0.1);
  padding: 10px;
  cursor: pointer;
  min-height: 110px;
  box-sizing: border-box;
  word-wrap: break-word;
  white-space: normal;
  transition: transform .08s ease, box-shadow .08s ease;

  flex: 1 1 calc(33.333% - 1rem);
  max-width: calc(33.333% - 1rem);
}
@media (max-width: 1200px) {
  .order-card {
    flex-basis: calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  .order-card {
    flex-basis: 100%;
    max-width: 100%;
  }
}
.order-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16,24,40,0.08);
}

.order-empty {
  text-align:center;
  padding: 2rem;
  color: #6c757d;
}

/* ############################## restaurant kitchen order card styles end ################################### */

/* ===== Shared control box (matches .modern-form-control spec) ===== */
/* .sp-control-text {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}
.sp-control-text.sp-placeholder { color: var(--light-gray); font-weight: 500; }

.sp-control-icon {
    flex: 0 0 auto;
    margin: 10px;
    color: var(--primary);
    display: flex;
    align-items: center;
} */

/* Far-right clear (x) */
/* .sp-clear-x {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    border: none;
    background: transparent;
    color: var(--light-gray);
    font-size: 16px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
}
.sp-clear-x.sp-show { display: flex; }
.sp-clear-x:hover { background: var(--primary-light); color: var(--primary); } */

/* ===== Popup (calendar / select menu) ===== */
/* .sp-popup {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 50;
    width: 300px;
    max-width: 92vw;
    background: #fff;
    border: 1px solid var(--primary-light);
    border-radius: 0.5rem;
    box-shadow: var(--primary-shadow);
    padding: 14px;
    display: none;
    animation: sp-pop .16s ease;
}
.sp-popup.sp-open { display: block; }
.sp-popup.sp-menu { padding: 6px; width: 100%; }

@keyframes sp-pop {
from { opacity: 0; transform: translateY(-6px); }
to   { opacity: 1; transform: translateY(0); }
}

.sp-anchor { position: relative; } */

/* ===== Calendar internals (shared by range + single) ===== */
/* .sp-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.sp-month-nav { display: flex; align-items: center; gap: 6px; }
.sp-nav-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--light-gray);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, transform .1s;
}
.sp-nav-btn:hover { background: var(--primary-light); border-color: var(--primary); }
.sp-nav-btn:active { transform: scale(.9); }

.sp-month-label {
    min-width: 70px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
}
.sp-year-input {
    width: 60px;
    height: 30px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    border: 1.5px solid var(--light-gray);
    border-radius: 8px;
    color: var(--primary-dark);
    outline: none;
    -moz-appearance: textfield;
}
.sp-year-input::-webkit-outer-spin-button,
.sp-year-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sp-year-input:focus {
    border-color: var(--primary);
}

.sp-weekdays, .sp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.sp-weekdays { margin-bottom: 6px; }
.sp-weekdays span {
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--light-gray);
    padding: 4px 0;
}

.sp-day {
    position: relative;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: none;
    background: transparent;
    color: var(--primary-dark);
    cursor: pointer;
    border-radius: 8px;
    transition: background .12s, color .12s;
}
.sp-day.sp-empty { cursor: default; }
.sp-day:not(.sp-empty):not(.sp-in-range):not(.sp-selected):hover {
    background: var(--primary-light);
    color: var(--primary-light-text);
} */

/* Today = dot underneath */
/* .sp-day.sp-today::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--primary-dark);
}
.sp-day.sp-today.sp-selected::after { background: #fff; }

.sp-day.sp-in-range {
    background: var(--primary-light);
    color: var(--primary-light-text);
    border-radius: 0;
}
.sp-day.sp-selected {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}
.sp-day.sp-selected:hover { background: var(--primary-hover); }
.sp-day.sp-range-start { border-radius: 8px 0 0 8px; }
.sp-day.sp-range-end   { border-radius: 0 8px 8px 0; }
.sp-day.sp-range-start.sp-range-end { border-radius: 8px; } */

/* Calendar footer: Today + Clear + tiny Confirm */
/* .sp-cal-footer {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--primary-light);
    justify-content: flex-end;
}
.sp-foot-btn {
    height: 22px;
    padding: 0 10px;
    border: 0px;
    border-radius: 7px;
    background: #fff;
    border: 1.5px solid var(--light-gray);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
}


.sp-foot-btn:hover { background: var(--primary-light); border-color: var(--primary); }
.sp-foot-btn.sp-solid {
    background: var(--primary);
    border: 1.5px solid var(--primary);
    color: #fff;
}
.sp-foot-btn.sp-solid:hover { background: var(--primary-hover); }
.sp-foot-btn:active { transform: scale(.96); } */

/* ===== Custom select menu (Yes/No) ===== */
/* .sp-option {
    width: 100%;
    text-align: left;
    padding: 7px 11px;
    margin: 4px 0px;
    border: none;
    background: transparent;
    color: var(--text-dark);
    border-radius: 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background .12s, color .12s;
}
.sp-option:hover { background: var(--primary-light); color: var(--primary); }
.sp-option.sp-chosen { background: var(--primary); color: #fff; }
.sp-option .sp-check { opacity: 0; }
.sp-option.sp-chosen .sp-check { opacity: 1; }

.sp-chev { transition: transform .18s ease; }
.sp-control.sp-active .sp-chev { transform: rotate(180deg); }

@media (max-width: 880px) {
.sp-preview { grid-template-columns: 1fr; max-width: 420px; }
} */




/* ############################## Login Start ################################### */


@keyframes floatingBackground {
  0% {
    transform: scale(1.01) translate3d(0, 0, 0);
  }

  25% {
    transform: scale(1.06) translate3d(-10px, -6px, 0);
  }

  50% {
    transform: scale(1.1) translate3d(6px, -12px, 0);
  }

  75% {
    transform: scale(1.06) translate3d(10px, 4px, 0);
  }

  100% {
    transform: scale(1.01) translate3d(0, 0, 0);
  }
}

.override-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    padding-bottom: 4.5rem; /* reserve space for footer */
    box-sizing: border-box;
}

.login-card {
    background: rgba(0,0,0,0.24);

    backdrop-filter: blur(3px);

    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;

    box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);

    overflow: hidden;
    width: 100%;
    max-width: 450px;
}

.login-card-header {
    background: transparent;
    padding: 2rem 1.5rem 0;
    text-align: center;
}

.login-card-header img {
    max-width: 260px;
    margin-bottom: 1rem;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-card-header h2 {
    color: #fff;
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

.login-card-body {
    padding: 1rem 2rem 2rem;
}

.form-label {
    display: block;
    margin-bottom: .5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.login-btn-primary {
    display: block;
    width: 100%;
    background: linear-gradient(289deg, #64059f, #2b083e);
    
    border: none;
    border-radius: .5rem;
    padding: .75rem 1.5rem;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background .2s, opacity .2s ease;
    margin-top: 1rem;
}

.login-btn-primary:hover {
    background: linear-gradient(289deg, #6f03ad, #3a0069);
    transform: translateY(-1px);

    box-shadow:
    0 8px 20px rgba(96, 0, 151, 0.35),
    0 0 15px rgba(122, 0, 194, 0.25);
}

.login-btn-primary:disabled,
.login-btn-primary.is-loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.btn-text,
.btn-spinner {
    vertical-align: middle;
}

.btn-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    margin-inline-end: .5rem;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.login-btn-primary.is-loading .btn-spinner {
    display: inline-block;
}

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

.alert-danger {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    border-radius: .5rem;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
}

.footer-text {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 1rem;
    z-index: 2;
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    color: #fdebfc;
    padding-inline: 1rem;
    pointer-events: auto;
}

.footer-link {
    color: #b805ff;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #fa65ff;
}

.link {
    color: #b95af0;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s, text-decoration 0.3s;
}

.link:hover {
    color: fa65ff;
}


.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    padding-right: 40px;
    box-sizing: border-box;
}

.toggle-password {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #dee2e6;
    font-size: 1.05rem;
    padding: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .8;
    transition: opacity .2s ease, color .2s ease, background-color .2s ease;
    border-radius: 50%;
}

.toggle-password:hover {
    opacity: 1;
    color: #ffffff;
    background-color: rgba(255,255,255,0.08);
}

.toggle-password:focus {
    outline: none;
    box-shadow: none;
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

html[dir="rtl"] .toggle-password {
    right: auto;
    left: 12px;
}

html[dir="rtl"] .password-wrapper input {
    padding-left: 40px;
    padding-right: 10px;
}

.caps-lock-hint {
    display: none;
    margin-top: .5rem;
    font-size: .8rem;
    font-weight: 600;
    color: #ffd27f;
}

.caps-lock-hint.show {
    display: block;
}

.tooltip .tooltip-inner {
    background-color: rgba(32, 24, 40, 0.96);
    color: #fff;
    border-radius: .55rem;
    padding: .45rem .65rem;
    font-size: .8rem;
    box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.24);
}

.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
    border-top-color: rgba(32, 24, 40, 0.96);
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.flag-icon,
.flag-image {
    display: inline-block;
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}



.flag-icon:hover,
.flag-image:hover {
    filter: brightness(1.1);
    transition: filter 0.2s ease-in-out;
}

.login-lang-switcher {
  position: absolute;
  top: 1.25rem;
  inset-inline-end: 1.25rem;
  z-index: 20;
}

.login-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.55rem 0.8rem;
  border-radius: 999px;

  color: #fff;
  text-decoration: none;

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border: 1px solid rgba(255, 255, 255, 0.14);

  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);

  transition: all 0.2s ease;
}

.login-lang-btn:hover,
.login-lang-btn:focus {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.lang-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.login-lang-btn .bi {
  font-size: 0.75rem;
  opacity: 0.8;
}

.flag-image,
.flag-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.login-lang-menu {
  min-width: 180px;
  margin-top: 0.6rem;
  padding: 0.45rem;

  border-radius: 1rem;

  background: rgba(25, 12, 40, 0.72);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);

  border: 1px solid rgba(255, 255, 255, 0.12);

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-lang-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;

  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;

  color: #fff;
  text-decoration: none;

  transition: all 0.18s ease;
}

.login-lang-item:hover {
  background: rgba(124, 58, 237, 0.22);
  color: #fff;
}

.login-lang-item p {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
}

    html[dir="rtl"] .login-lang-switcher {
      right: auto;
      left: 1rem;
    }

    .login-lang-btn {
      display: inline-flex;
      align-items: center;
      gap: .55rem;
      min-height: 42px;
      padding: .5rem .85rem;
      border: 1px solid rgba(255,255,255,.16);
      border-radius: 999px;
      background: rgba(44, 0, 79, 0.5);
      color: #fff;
      text-decoration: none;
      box-shadow: 0 0.35rem 1.2rem rgba(0, 0, 0, 0.22);
      transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
    }

    .login-lang-btn:hover {
      color: #fff;
      background: rgba(44, 0, 79, 0.6);
      border-color: rgba(255,255,255,.28);
      transform: translateY(-1px);
    }

    .login-lang-btn:focus {
      color: #fff;
      outline: none;
      box-shadow: 0 0 0 0.15rem rgba(94, 62, 126, 0.55);
    }

    .login-lang-btn .lang-label {
      font-size: .88rem;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
    }

    .login-lang-menu {
      min-width: 220px;
      background: rgba(44, 0, 79, 0.5);
      border: 1px solid rgba(255,255,255,.12);
      border-radius: .8rem;
      padding: 0;
      box-shadow: 0 1rem 2.5rem rgba(0,0,0,.28);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      overflow: hidden;
    }

    .login-lang-item {
      display: flex;
      align-items: center;
      gap: .75rem;
      padding: .8rem 1rem;
      color: #fff;
      text-decoration: none;
      transition: background-color .2s ease;
    }

    .login-lang-item:hover {
      background-color: rgba(255,255,255,.08);
      color: #fff;
    }

    /* round hover corners */
    .login-lang-item:first-child:hover {
      border-top-left-radius: .8rem;
      border-top-right-radius: .8rem;
    }

    .login-lang-item:last-child:hover {
      border-bottom-left-radius: .8rem;
      border-bottom-right-radius: .8rem;
    }

    .login-lang-item p {
      margin: 0;
      font-size: .92rem;
      color: #fff;
    }

    @media (max-width: 575.98px) {
      .login-card {
        max-width: 100%;
      }

      .login-card-header {
        padding: 1.5rem 1.25rem;
      }

      .login-card-body {
        padding: 1.5rem 1.25rem;
      }

      .form-label {
        font-size: 1rem;
      }

      .footer-text {
        font-size: 0.8rem;
      }

      .login-lang-switcher {
        top: .75rem;
        right: .75rem;
      }

      html[dir="rtl"] .login-lang-switcher {
        left: .75rem;
      }

      .login-lang-btn {
        min-height: 38px;
        padding: .45rem .7rem;
      }

      .login-lang-btn .lang-label {
        display: none;
      }
    }

    @media (max-width: 575.98px) {
      .footer-text {
        font-size: 0.8rem;
        bottom: 0.75rem;
      }
    }

    @media (max-height: 720px) {
      body, html {
        overflow-y: auto;
      }

      .override-wrapper {
        min-height: 100vh;
        align-items: flex-start;
        padding-top: 4rem;
        padding-bottom: 5rem;
      }

      .footer-text {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0.75rem;
        margin-top: 0;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      .background-animation,
      .btn-spinner {
        animation: none !important;
      }
    }

    .info-text{
        color: #dbdbdb;
    }
/* ############################## Login End ################################### */






/* ############################## General Config Start ################################### */
.errorlist{
    padding: 0 5px;
    margin: 5px 0 0 0 ;
}

.modern-form-select[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}
/* ############################## General Config End ################################### */

/* ############################## entry card , finance summary and bubblt button Start ################################### */

/* finance summary & po style specific */
.entry-card {
    padding: 0.9rem 0.35rem;
    border: 2px solid #d3d5e3;
    border-radius: 0.85rem;
    background: #fff;
    margin-bottom: 0.75rem;    
}

@media (max-width: 991.98px) {
    #finance-summary-col {
        margin-top: 1rem;
    }
}

/* ========== FLOATING BUBBLE BUTTON (Finance Summary) ========== */
#toggle-summary-btn {
  position: fixed;
  bottom: 7rem;
  right: 2rem;
  z-index: 1050;
  width: 56px;
  height: 56px;
  border-radius: 50% !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: none;
}

/* Hover effect – lift & stronger shadow */
#toggle-summary-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25);
}

/* ========== RTL (Right‑to‑Left) support ========== */
html[dir="rtl"] #toggle-summary-btn {
  right: auto;
  left: 1.5rem;
}

/* ========== Responsive: smaller bubble on mobile ========== */
@media (max-width: 768px) {
  #toggle-summary-btn {
    width: 48px;
    height: 48px;
    bottom: 1rem;
    right: 1rem;
  }
  
  #toggle-summary-btn i {
    font-size: 1.5rem;
  }
  
  html[dir="rtl"] #toggle-summary-btn {
    right: auto;
    left: 1rem;
  }
}  


/* Floating Summary Card – draggable & resizable with smooth enter/exit */
.floating-summary-card {
  position: fixed;
  z-index: 1050;
  width: 500px;
  min-width: 280px;
  max-width: 90vw !important;          /* never wider than 90% of viewport width */
  max-height: 90vh !important;         /* never taller than 90% of viewport height */  
  /* Hidden by default (will be shown via .open class) */
  opacity: 0;
  transform: scale(0.9);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1),
              transform 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1),
              visibility 0.2s;
}

.floating-summary-card.open {
  opacity: 1;
  transform: scale(1);
  visibility: visible;
  pointer-events: none;   /* wrapper still transparent, inner handles clicks */
}

.floating-summary-inner {
  pointer-events: auto;   /* card itself is clickable */
  width: 100%;
  height: 100%;
}

/* Rest of the styles (draggable, resizable, scroll) unchanged */
.floating-summary-card .card {
  border: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  background: white;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 500px;
  min-height: 200px;
  max-height: 90vh;         /* inner card also respects max height */
  overflow: hidden;         /* prevent overflow outside the card */  
}

.draggable-handle {
  cursor: move;
  user-select: none;
}

.resize-handle {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  cursor: nw-resize;
  z-index: 10;
}

.resize-handle::after {
  content: "◢";
  position: absolute;
  bottom: 0;
  right: 2px;
  font-size: 12px;
  color: #666;
}

.floating-summary-card .card-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.floating-summary-card .finance-summary-table-wrap {
  overflow-x: auto;
}

/* ========== MOBILE STYLES ========== */
@media (max-width: 768px) {
  .floating-summary-card {
    width: 90% !important;
    max-width: 90% !important;
    /* No forced top/left – will be set by JS */
  }
  
  /* Make resize handle easier to tap (larger touch area) */
  .resize-handle {
    width: 24px !important;
    height: 24px !important;
    bottom: 8px !important;
    right: 8px !important;
  }
  
  .resize-handle::after {
    font-size: 16px !important;
    right: 4px !important;
    bottom: 2px !important;
  }
}

.modern-data-table th {
  font-size: .8rem !important;
}

.modern-data-table td {
  padding: 1rem .3rem !important;
}

/* ############################## entry card , finance summary and bubblt button Start ################################### */

/* ############################## quil text editor Start ################################### */

.ql-toolbar.ql-snow {
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.ql-container {
    border-radius: 0 0 0.5rem 0.5rem !important;
}

/* ############################## quil text editor end ################################### */

/* ############################## tree Start ################################### */

/* Permissions Tree */
.tree-toggle:focus {
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.3);
}

.permission-list {
    list-style: none;
}

.permission-list li {
    margin-bottom: 0.25rem;
}

.tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree li {
    margin-bottom: 0.75rem;
}

.tree-toggle {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    /* transition: background 0.2s; */
    outline: none;
}

.tree-toggle:hover {
    background: #e9ecef;
}

.active>.tree-toggle .fa-caret-right {
    transform: rotate(90deg);
}

.active>.tree-toggle .fa-caret-left {
    transform: rotate(-90deg);
}

.nested {
    list-style: none;
    display: none;
}

.active>.nested {
    display: block;
}

/* Accounts Tree */
.folder-icon {
    margin: 0 0.3rem;
    color: var(--primary);
    cursor: pointer;
    position: relative;
}

.folder-icon.en::after {
    content: "\25BA";
    display: inline-block;
    margin: 0 0.3rem;
    /* transition: transform 0.3s ease; */
}

.folder-icon.ar::after {
    content: "\25C4";
    display: inline-block;
    margin: 0 0.3rem;
    /* transition: transform 0.3s ease; */
}

.active>.folder-icon.en::after {
    transform: rotate(90deg);
}

.active>.folder-icon.ar::after {
    transform: rotate(-90deg);
}

.file-icon {
    margin: 0 0.3rem;
    color: var(--secondary);
}

.nested-tree li {
    margin: 0;
    padding: 0 1.5rem;
    line-height: 1.6rem;
    position: relative;
    /* transition: background-color 0.3s ease; */
}

.nested-tree li:hover {
    background-color: #f9f9f9;
}

.nested-tree li::before {
    content: "";
    position: absolute;
    top: 0;
    width: 0;
    height: 100%;
    border-left: 1px solid #ccc;
}

.nested-tree.en li::before {
    left: 0.4rem;
}

.nested-tree.ar li::before {
    right: 0.4rem;
}

.nested-tree li::after {
    content: "";
    position: absolute;
    top: 1.0rem;
    width: 1rem;
    height: 0;
    border-top: 1px solid #ccc;
}

.nested-tree.en li::after {
    left: 0;
}

.nested-tree.ar li::after {
    right: 0;
}

.nested-tree li:last-child::before {
    height: 1rem;
}

.tree-item-label {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nested {
    display: none;
    /* transition: all 0.3s ease; */
    padding: 0 1rem;
    margin: 0 0.7rem;
}

.nested.en {
    border-left: 1px dashed #ccc;
}

.nested.ar {
    border-right: 1px dashed #ccc;
}

/* ############################## tree End ################################### */

.custom-form-field {
    height: auto;
    min-height: calc(2.7rem + 2px);
    width: 100%;
    padding: 0.1rem 0.4rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-dark);
    background-clip: padding-box;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.custom-form-field.disabled {
    background-color: #f8fafc;
    opacity: 0.7;
    cursor: not-allowed;
}

/* ############################## Calendar Style Start ################################### */
.app-calendar .fc .fc-daygrid-day-frame {
    max-height: 120px;
}


.app-calendar .fc-event-title {
    font-weight: 600
}

.app-calendar .fc-toolbar-title {
    color: var(--primary);
    font-size: 18px
}

.app-calendar .fc-daygrid-event {
    border-radius: 4px 20px 20px 4px
}

.app-calendar .fc .fc-col-header-cell-cushion,.app-calendar .fc .fc-daygrid-day-number {
    color: var(--text-dark);
    text-decoration: none
}

.app-calendar .fc .fc-button-primary {
    background-color: var(--light-gray-subtle);
    border-color: var(--light-gray-subtle);
    letter-spacing: 1px;
    font-size: 14px;
    color: white;
}

.app-calendar .fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--primary);
    font-weight: 400;
    border-color: var(--primary);
    color: #fff
}

.app-calendar .fc .fc-button-primary:hover {
    background-color: var(--text-dark);
    color: white;
    border-color: var(--text-dark)
}

.app-calendar .fc .fc-button-primary:not(:disabled):active {
    background-color: var(--light-gray-subtle);
    border-color: var(--light-gray-subtle)
    
}

.app-calendar .fc .fc-button-primary:focus {
    box-shadow: none!important
}

.app-calendar .fc .fc-button-primary:active:focus {
    box-shadow: none!important
}

.app-calendar .fc .fc-list-sticky .fc-list-day>* {
    background-color: white
}

.app-calendar .fc .fc-daygrid-body {
    width: 100%!important
}

.app-calendar .fc .fc-scrollgrid-section table {
    width: 100%!important
}

.app-calendar .fc .fc-scrollgrid-section-body table {
    width: 100%!important
}

.app-calendar .fc .fc-button {
    border-radius: 7px;
    padding: 7px 20px;
    text-transform: capitalize;
    color: var(--bs-heading-color)
}

.app-calendar .fc .fc-button:hover {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary)
}

.app-calendar .fc .fc-next-button {
    border-radius: 0 7px 7px 0
}

.app-calendar .fc .fc-prev-button {
    border-radius: 7px 0 0 7px
}

.app-calendar .fc .fc-next-button,.app-calendar .fc .fc-prev-button {
    padding: 7px 10px
}

.app-calendar .fc .fc-toolbar>*>:not(:first-child) {
    margin-left: 4px!important
}

.app-calendar .fc .fc-addEventButton-button {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 400;
    margin-left: 12px!important
}

.app-calendar .fc .fc-addEventButton-button:hover {
    background-color: var(--text-dark);
    border-color: var(--text-dark);
    box-shadow: none;
    color: white
}

.app-calendar .fc .fc-addEventButton-button:not(:disabled):active {
    background-color: var(--primary);
    box-shadow: none;
    color: white
}

.app-calendar .fc .fc-daygrid-day.fc-day-today {
    background-color: transparent;
    padding: 3px;
    border-radius: 23px
}

.app-calendar .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame {
    background-color: var(--light-gray-subtle);
    border-radius: 7px
}

.app-calendar .fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-frame .fc-daygrid-day-number {
    font-size: 15px;
    font-weight: 800
}

.app-calendar .fc .fc-list-event:hover td {
    background-color: var(--light-gray-subtle)
}

.app-calendar .fc-theme-standard .fc-list-day-cushion {
    background-color: white
}

.app-calendar .fc-theme-standard .fc-list {
    border: 1px solid var(--light-gray-subtle)
}

.app-calendar .fc-theme-standard .fc-scrollgrid {
    border: 0 solid var(--light-gray-subtle);
    border-width: 0
}

.app-calendar .fc-theme-standard td {
    border: 1px solid var(--light-gray-subtle)
}

.app-calendar .fc-theme-standard th {
    border: 1px solid var(--light-gray-subtle);
    border-bottom: 0;
    border-width: 0;
    height: 56px;
    background-color: var(--light-gray-subtle);
    vertical-align: middle;
    color: #5a6a85
}

/* .app-calendar .fc-v-event .fc-event-main {
    color: var(--light-gray-subtle)
} */

.app-calendar .fc-timegrid-event-harness-inset .fc-timegrid-event {
    box-shadow: none
}

.app-calendar .fc-timegrid-event.fc-event-mirror {
    box-shadow: none
}

.app-calendar .fc-timegrid-more-link {
    box-shadow: none
}

.app-calendar .event-fc-color {
    background-color: var(--secondary);
    border-width: 0 0 0 4px;
    border-style: solid;
    padding: 3px 5px;
    margin-bottom: 1px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer
}

.app-calendar .event-fc-color:hover {
    background-color: var(--light-gray-subtle)
}

.app-calendar .fc-daygrid-event-dot {
    margin: 0 6px 0 0
}

.app-calendar .fc-bg-primary {
    color: var(--primary) !important;
    background-color: var(--primary-bg-subtle);
    border-color: var(--primary)
}

.app-calendar .fc-bg-primary .fc-daygrid-event-dot {
    border-color: var(--primary)
}

.app-calendar .fc-bg-primary.fc-h-event .fc-event-main {
    color: var(--primary)
}

.app-calendar .fc-bg-success {
    color: var(--success);
    background-color: var(--success-subtle);
    border-color: var(--success)
}

.app-calendar .fc-bg-success .fc-daygrid-event-dot {
    border-color: var(--success)
}

.app-calendar .fc-bg-success.fc-h-event .fc-event-main {
    color: var(--success)
}

.app-calendar .fc-bg-warning {
    color: var(--warning);
    background-color: var(--warning-subtle);
    border-color: var(--warning)
}

.app-calendar .fc-bg-warning .fc-daygrid-event-dot {
    border-color: var(--warning)
}

.app-calendar .fc-bg-warning.fc-h-event .fc-event-main {
    color: var(--warning)
}

.app-calendar .fc-bg-danger {
    color: var(--danger);
    background-color: var(--danger-subtle);
    border-color: var(--danger)
}

.app-calendar .fc-bg-danger .fc-daygrid-event-dot {
    border-color: var(--danger)
}

.app-calendar .fc-bg-danger.fc-h-event .fc-event-main {
    color: var(--danger)
}

.app-calendar .btn-update-event {
    display: none
}

@media (max-width: 1199px) {
    .app-calendar .calendar-container {
        padding:30px 0 0 0
    }

    .app-calendar .fc-theme-standard .fc-list {
        border: none
    }

    .app-calendar .fc .fc-toolbar {
        align-items: center;
        flex-direction: column
    }

    .app-calendar .fc .fc-toolbar.fc-header-toolbar {
        margin-bottom: 50px
    }

    .app-calendar .fc-toolbar-chunk:not(:first-child) {
        margin-top: 35px
    }
}

/* ############################## Calendar Style End ################################### */