/* ================================================
   INLINE INVOICE DISCOUNTS - Custom Styles
   ================================================ */
/* إظهار افتراضي (الموبايل) */
li.nav-item.main-hamburger-menu {
    display: block;
}

/* إخفاؤه في الشاشات الكبيرة (Desktop) */
@media (min-width: 992px) {
    li.nav-item.main-hamburger-menu {
        display: none;
    }
}
@media (min-width: 768px) {
    .navbar-expand-md .navbar-collapse {
        display: -ms-flexbox!important;
        display: flex !important;
        -ms-flex-preferred-size: auto;
        flex-basis: 100%;
    }
}

[dir="rtl"]  .modal .modal-dialog .modal-header button.close {
    position: absolute;
    left: 20px;
    top: 20px;
    text-shadow: none;
    background-color: #21b4dc;
    padding: 5px;
    font-size: 30px;
    border-radius: 50%;
    border: none;
}
/* Discount column styling */
.bill_col_discount {
    min-width: 150px;
}

.bill_col_discount .input-group-append {
    width: 60px;
}

.bill_col_discount .js_item_discount_type {
    font-size: 12px;
    padding: 0.25rem;
}

/* Hide discount column when needed */
.bill_col_discount.hidden {
    display: none !important;
}

/* Disabled button styling */
button.disabled,
a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ================================================
   PROJECT MODAL - Professional Styling
   ================================================ */

/* Date fields row - two columns side-by-side */
.project-date-fields {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.project-date-fields .date-field-col {
    flex: 1;
    min-width: 0;
}

.project-date-fields .date-field-col label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13px;
    color: #545454;
}

.project-date-fields .date-field-col .form-control {
    width: 100%;
}

/* Section dividers in modal */
#js-projects-modal-add-edit .spacer.row {
    margin-top: 10px;
    margin-bottom: 5px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#js-projects-modal-add-edit .spacer.row .title {
    font-weight: 600;
    font-size: 13.5px;
    color: #3c4858;
}

/* Line dividers styling */
#js-projects-modal-add-edit .line {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 15px;
    margin-bottom: 10px;
}

/* Modal meta data info */
#js-projects-modal-add-edit .modal-meta-data {
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fc;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Highlighted panel refinement */
#js-projects-modal-add-edit .highlighted-panel {
    background: #f8f9fc;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

/* Form group spacing refinement */
#js-projects-modal-add-edit .form-group.row {
    margin-bottom: 12px;
}

/* Required field indicator */
#js-projects-modal-add-edit label.required::after {
    content: '';
}

/* RTL Date fields */
[dir="rtl"] .project-date-fields {
    flex-direction: row-reverse;
}

[dir="rtl"] .project-date-fields .date-field-col label {
    text-align: right;
}

/* Fix modal being unresponsive after toggle clicks */
.modal.show .modal-dialog {
    pointer-events: auto;
}
/* ================================================
   INLINE INVOICE DISCOUNTS - Custom Styles
   ================================================ */

/* Discount column styling */
.bill_col_discount {
    min-width: 150px;
}

.bill_col_discount .input-group-append {
    width: 60px;
}

.bill_col_discount .js_item_discount_type {
    font-size: 12px;
    padding: 0.25rem;
}

/* Hide discount column when needed */
.bill_col_discount.hidden {
    display: none !important;
}

/* Disabled button styling */
button.disabled,
a.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ================================================
   PROJECT MODAL - Professional Styling
   ================================================ */

/* Date fields row - two columns side-by-side */
.project-date-fields {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.project-date-fields .date-field-col {
    flex: 1;
    min-width: 0;
}

.project-date-fields .date-field-col label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 13px;
    color: #545454;
}

.project-date-fields .date-field-col .form-control {
    width: 100%;
}

/* Section dividers in modal */
#js-projects-modal-add-edit .spacer.row {
    margin-top: 10px;
    margin-bottom: 5px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#js-projects-modal-add-edit .spacer.row .title {
    font-weight: 600;
    font-size: 13.5px;
    color: #3c4858;
}

/* Line dividers styling */
#js-projects-modal-add-edit .line {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 15px;
    margin-bottom: 10px;
}

/* Modal meta data info */
#js-projects-modal-add-edit .modal-meta-data {
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f9fc;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Highlighted panel refinement */
#js-projects-modal-add-edit .highlighted-panel {
    background: #f8f9fc;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

/* Form group spacing refinement */
#js-projects-modal-add-edit .form-group.row {
    margin-bottom: 12px;
}

/* Required field indicator */
#js-projects-modal-add-edit label.required::after {
    content: '';
}

/* RTL Date fields */
[dir="rtl"] .project-date-fields {
    flex-direction: row-reverse;
}

[dir="rtl"] .project-date-fields .date-field-col label {
    text-align: right;
}

/* Fix modal being unresponsive after toggle clicks */
.modal.show .modal-dialog {
    pointer-events: auto;
}

/* Ensure datepicker renders above modal */
.datepicker {
    z-index: 1060 !important;
}
.list-table-wrapper {
   /* min-height: 250px;*/
    /*overflow: visible;*/
}


.dash-progress-wrapper {
    padding: 0 20px 14px;
    display: none;
}
/* ============================================================
   ALRABEH TECH CRM — MODERN DASHBOARD ENHANCEMENT
   Pure CSS · RTL-Ready · 2025 Design System
   ============================================================ */

/* ─────────────── 1. DESIGN TOKENS ─────────────── */
:root {
  /* Brand */
  --brand-primary: #4361ee;
  --brand-primary-rgb: 67, 97, 238;
  --brand-secondary: #3fa9a0;
  --brand-accent: #7c3aed;

  /* Surfaces */
  --surface-body: #f0f2f5;
  --surface-card: #ffffff;
  --surface-sidebar: #0f172a;
  --surface-sidebar-hover: rgba(255, 255, 255, 0.06);
  --surface-sidebar-active: rgba(67, 97, 238, 0.15);
  --surface-topbar: #ffffff;

  /* Text */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #ffffff;

  /* Status */
  --clr-success: #10b981;
  --clr-success-bg: #ecfdf5;
  --clr-warning: #f59e0b;
  --clr-warning-bg: #fffbeb;
  --clr-danger: #ef4444;
  --clr-danger-bg: #fef2f2;
  --clr-info: #06b6d4;
  --clr-info-bg: #ecfeff;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #4361ee 0%, #7c3aed 100%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --grad-info: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 20px 40px -12px rgba(0, 0, 0, 0.12);
  --shadow-colored: 0 10px 30px -8px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-full: 9999px;

  /* Transition */
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.15s var(--ease-smooth);
  --t-normal: 0.25s var(--ease-smooth);
  --t-slow: 0.35s var(--ease-smooth);

  /* Spacing */
  --page-padding: 24px;
  --sidebar-width: 250px;
  --sidebar-collapsed: 70px;
  --topbar-height: 64px;
}

/* ─────────────── 2. GLOBAL BASE ─────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}


::selection {
  background: rgba(var(--brand-primary-rgb), 0.15);
  color: var(--brand-primary);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

a {
  transition: color var(--t-fast);
}

/* ─────────────── 3. TOP NAVIGATION BAR ─────────────── */


/* Custom Scrollbar for Sidebar */
.scroll-sidebar::-webkit-scrollbar {
  width: 4px;
}

.scroll-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}


.sidebar-nav ul {
  background: transparent !important;
}

/* Menu Items */
.sidenav-menu-item {
  margin-bottom: 2px;
}




.sidenav-menu-item > a .hide-menu {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidenav-menu-item > a:hover {
  background: var(--surface-sidebar-hover) !important;
  color: var(--text-sidebar-active) !important;
}

.sidenav-menu-item > a:hover i {
  opacity: 1;
  color: var(--brand-primary);
}





/* Submenu */
.sidenav-menu-item .collapse,
.sidenav-menu-item .collapsing {
  background: transparent !important;
}

.sidenav-submenu {
  margin: 1px 0;
}

.sidenav-submenu a {
  color: var(--text-sidebar) !important;
  font-size: 13px !important;
  padding: 9px 16px 9px 50px !important;
  border-radius: var(--r-sm) !important;
  transition: all var(--t-fast);
  display: block;
  position: relative;
  font-weight: 400;
  margin: 0 12px;
}

[dir="rtl"] .sidenav-submenu a {
  padding: 9px 50px 9px 16px !important;
}

.sidenav-submenu a::before {
   display: none !important;
    content: none !important;
  content: '';
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-sidebar);
  opacity: 0.3;
  transition: all var(--t-fast);
}

[dir="rtl"] .sidenav-submenu a::before {
  left: auto;
  right: 24px;
}

.sidenav-submenu a:hover {
  color: var(--text-sidebar-active) !important;
  background: var(--surface-sidebar-hover) !important;
}

.sidenav-submenu a:hover::before {
  background: var(--brand-primary);
  opacity: 1;
  transform: translateY(-50%) scale(1.3);
}

/* Arrow indicator for expandable */



/* Sidebar Section Label (if any) */
.sidebar-nav .nav-small-cap {
  color: var(--text-muted) !important;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 20px 20px 8px;
  opacity: 0.5;
}

/* ─────────────── 5. PAGE WRAPPER ─────────────── */
.page-wrapper {
  background: var(--surface-body) !important;
}

.page-wrapper > .container-fluid {
  padding: var(--page-padding) !important;
  max-width: 1600px;
}

/* ─────────────── 6. GENERAL CARD STYLES ─────────────── */
.card {
  border: none !important;
  border-radius: var(--r-xl) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all var(--t-normal);
  background: var(--surface-card) !important;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md) !important;
}

.card-body {
  padding: 24px !important;
}

.card-title {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.01em;
}

/* ─────────────── 7. DASHBOARD STAT CARDS (Top Row) ─────────────── */
.dash-card {
  border-radius: var(--r-xl) !important;
  overflow: hidden;
  position: relative;
  transition: all var(--t-normal);
  cursor: pointer;
  border: none !important;
}

/* Gradient backgrounds */
.dash-card.bg-gradient-primary {
  background: var(--grad-primary) !important;
}

.dash-card.bg-gradient-warning {
  background: var(--grad-warning) !important;
}

.dash-card.bg-gradient-danger {
  background: var(--grad-danger) !important;
}

.dash-card.bg-gradient-success {
  background: var(--grad-success) !important;
}

/* Hover lift */
.click-url .dash-card[class*="bg-gradient"] {
  transform: translateY(0);
  transition: all var(--t-normal);
  position: relative;
  overflow: hidden;
}

.click-url .dash-card[class*="bg-gradient"]::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 160px;
  height: 160px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  transition: all var(--t-slow);
}

.click-url .dash-card[class*="bg-gradient"]::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  transition: all var(--t-slow);
}

.click-url:hover .dash-card[class*="bg-gradient"] {
  transform: translateY(-6px);
  box-shadow: var(--shadow-colored) rgba(0, 0, 0, 0.2) !important;
}

.click-url:hover .dash-card.bg-gradient-primary {
  box-shadow: var(--shadow-colored) rgba(var(--brand-primary-rgb), 0.35) !important;
}

.click-url:hover .dash-card.bg-gradient-warning {
  box-shadow: var(--shadow-colored) rgba(245, 158, 11, 0.35) !important;
}

.click-url:hover .dash-card.bg-gradient-danger {
  box-shadow: var(--shadow-colored) rgba(239, 68, 68, 0.35) !important;
}

.click-url:hover .dash-card.bg-gradient-success {
  box-shadow: var(--shadow-colored) rgba(16, 185, 129, 0.35) !important;
}

.click-url:hover .dash-card[class*="bg-gradient"]::before {
  transform: scale(1.3);
}

/* Stat Text */
.dash-title {
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.85;
}

.dash-value {
  font-size: 32px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dash-title-white,
.dash-value-white {
  color: #fff !important;
}

/* Icon Circle */
.icon-circle-bg {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.18) !important;
  backdrop-filter: blur(6px);
  font-size: 24px;
  transition: all var(--t-normal);
}

.click-url:hover .icon-circle-bg {
  background: rgba(255, 255, 255, 0.28) !important;
  transform: rotate(-5deg) scale(1.1);
}

/* Progress under stat card */
.dash-progress-wrapper {
  padding: 0 20px 14px;
}

.dash-progress {
  height: 4px !important;
  border-radius: var(--r-full);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15) !important;
}

.dash-progress .progress-bar {
  border-radius: var(--r-full);
  opacity: 0.5 !important;
}

/* Animate stat cards on load */
.click-url {
  animation: fadeUpIn 0.5s var(--ease-smooth) both;
}

.click-url:nth-child(1) { animation-delay: 0.05s; }
.click-url:nth-child(2) { animation-delay: 0.1s; }
.click-url:nth-child(3) { animation-delay: 0.15s; }
.click-url:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────── 8. PROJECT OVERVIEW CARD ─────────────── */
#dashboard-admin-project-overview .card {
  animation: fadeUpIn 0.5s var(--ease-smooth) 0.25s both;
}

#dashboard-admin-project-overview .card-title {
  position: relative;
  padding-bottom: 12px;
}

#dashboard-admin-project-overview .card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
}

[dir="rtl"] #dashboard-admin-project-overview .card-title::after {
  right: 0;
  left: auto;
}

/* Status Pills */
.status-pill {
  padding: 16px 12px;
  border-radius: var(--r-lg);
  background: var(--surface-body);
  transition: all var(--t-normal);
  border: 1px solid transparent;
}

.status-pill:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(var(--brand-primary-rgb), 0.1);
}

.status-pill h1 {
  font-size: 36px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  transition: transform var(--t-fast);
}

.status-pill:hover h1 {
  transform: scale(1.08);
}

.status-pill span {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
}

/* Progress bar in project overview */
#dashboard-admin-project-overview .progress {
  height: 10px !important;
  border-radius: var(--r-full) !important;
  background: var(--surface-body) !important;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

#dashboard-admin-project-overview .progress-bar {
  border-radius: var(--r-full) !important;
  transition: width 1.2s var(--ease-smooth);
  position: relative;
}

#dashboard-admin-project-overview .progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: progressShimmer 2.5s infinite;
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Summary Row */
#dashboard-admin-project-overview .row.text-center.m-t-30:last-child > div {
  padding: 16px;
  position: relative;
}

#dashboard-admin-project-overview .row.text-center.m-t-30:last-child h3 {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
}

#dashboard-admin-project-overview .row.text-center.m-t-30:last-child small {
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em;
}

.border-left {
  border-color: var(--surface-body) !important;
}

/* ─────────────── 9. LEADS & TICKETS WIDGETS ─────────────── */
#dashboard-widgets-leads .card,
#dashboard-widgets-tickets .card {
  animation: fadeUpIn 0.5s var(--ease-smooth) 0.3s both;
}

#dashboard-widgets-leads .card-title,
#dashboard-widgets-tickets .card-title {
  position: relative;
  padding-bottom: 12px;
}

#dashboard-widgets-leads .card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--grad-success);
  border-radius: var(--r-full);
}

#dashboard-widgets-tickets .card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--grad-info);
  border-radius: var(--r-full);
}

[dir="rtl"] #dashboard-widgets-leads .card-title::after,
[dir="rtl"] #dashboard-widgets-tickets .card-title::after {
  right: 0;
  left: auto;
}

/* Widget Legend Labels */
.list-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 0;
  list-style: none;
}

.list-inline li {
  margin: 0 !important;
  padding: 0 !important;
}

.label-rounded {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  border-radius: var(--r-full) !important;
  font-size: 11px !important;
  font-weight: 600;
  background: var(--surface-body) !important;
  color: var(--text-secondary) !important;
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all var(--t-fast);
}

.label-rounded:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.label-rounded .fa-circle {
  font-size: 8px;
}

/* Year badge */
.text-muted.font-12.text-uppercase.font-weight-500 {
  background: var(--surface-body);
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 11px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
}

/* ─────────────── 10. TIMELINE / ACTIVITY FEED ─────────────── */
.dash-timeline-card {
  animation: fadeUpIn 0.5s var(--ease-smooth) 0.35s both;
}

.dash-timeline-card .card-title {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 20px !important;
}

.dash-timeline-card .card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--grad-primary);
  border-radius: var(--r-full);
}

[dir="rtl"] .dash-timeline-card .card-title::after {
  right: 0;
  left: auto;
}

/* Timeline Items */
.profiletimeline {
  position: relative;
  padding-right: 0;
}

[dir="rtl"] .profiletimeline {
  padding-right: 0;
  padding-left: 0;
}

.sl-item.timeline {
  position: relative;
  padding: 16px 0;
  padding-inline-start: 60px;
  border-bottom: 1px solid var(--surface-body);
  transition: all var(--t-fast);
}

.sl-item.timeline:last-child {
  border-bottom: none;
}

.sl-item.timeline:hover {
  background: rgba(var(--brand-primary-rgb), 0.02);
  border-radius: var(--r-md);
}

/* Timeline vertical line */
.profiletimeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--brand-primary), transparent);
  opacity: 0.15;
  border-radius: var(--r-full);
}

[dir="rtl"] .profiletimeline::before {
  right: 22px;
  left: auto;
}

[dir="ltr"] .profiletimeline::before {
  left: 22px;
  right: auto;
}

/* Avatar */
.sl-item .sl-left {
  position: absolute !important;
  top: 18px;
  width: 44px;
  height: 44px;
}

[dir="rtl"] .sl-item .sl-left {
  right: 0;
  left: auto;
}

[dir="ltr"] .sl-item .sl-left {
  left: 0;
  right: auto;
}

.sl-item .sl-left img {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  object-fit: cover;
  border: 3px solid var(--surface-card) !important;
  box-shadow: var(--shadow-sm);
  transition: all var(--t-fast);
}

.sl-item:hover .sl-left img {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

/* Timeline Content */
.sl-item .sl-right {
  padding: 0;
}

.x-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.x-meta a {
  font-weight: 700;
  color: var(--text-primary) !important;
  text-decoration: none;
  font-size: 13.5px;
}

.x-meta a:hover {
  color: var(--brand-primary) !important;
}

.sl-date {
  font-size: 11px !important;
  color: var(--text-muted) !important;
  font-weight: 500;
  background: var(--surface-body);
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.x-title {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.x-title a {
  color: var(--brand-primary) !important;
  text-decoration: none;
  font-weight: 600;
  transition: all var(--t-fast);
  background: rgba(var(--brand-primary-rgb), 0.06);
  padding: 2px 8px;
  border-radius: var(--r-sm);
  display: inline;
}

.x-title a:hover {
  background: rgba(var(--brand-primary-rgb), 0.12);
}

.x-description {
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--surface-body);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text-secondary);
  border-inline-start: 3px solid var(--brand-primary);
}

.x-description a {
  color: var(--brand-primary) !important;
  text-decoration: none;
  font-weight: 600;
}

.x-description strong {
  color: var(--text-primary);
  font-weight: 700;
}

.x-reference {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ─────────────── 11. C3 CHART OVERRIDES ─────────────── */
.c3 svg {
  font-family: 'Cairo', 'Inter', sans-serif !important;
}

.c3-chart-arc text {
  font-size: 12px !important;
  font-weight: 600 !important;
  fill: var(--text-primary) !important;
}

.c3-tooltip {
  border-radius: var(--r-sm) !important;
  box-shadow: var(--shadow-lg) !important;
  border: none !important;
  overflow: hidden;
}

.c3-tooltip th {
  background: var(--text-primary) !important;
  font-weight: 600;
  padding: 8px 12px;
}

.c3-tooltip td {
  padding: 6px 12px;
  font-size: 12px;
}

/* ─────────────── 12. PRELOADER ─────────────── */
.preloader {
  background: var(--surface-card) !important;
}

.loader-loading {
  border-color: rgba(var(--brand-primary-rgb), 0.15) !important;
  border-top-color: var(--brand-primary) !important;
}

/* ─────────────── 13. BUTTONS GLOBAL ─────────────── */


.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}
[dir="rtl"] .project-date-fields {
    flex-direction: unset;
}
.btn-danger,
.btn-rounded-x.btn-danger {
  background: var(--grad-primary) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.25);
}

.btn-rounded-x.btn-danger:hover {
  box-shadow: 0 6px 20px rgba(var(--brand-primary-rgb), 0.35) !important;
  transform: translateY(-2px);
}

.btn-rounded-x {
  border-radius: var(--r-full) !important;
}

/* ─────────────── 14. FORM CONTROLS ─────────────── */
.form-control {
  border: 1.5px solid var(--surface-body) !important;
  border-radius: var(--r-sm) !important;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-primary);
  transition: all var(--t-fast);
  background: var(--surface-body);
}

.form-control:focus {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), 0.1) !important;
  background: var(--surface-card);
}

/* ─────────────── 15. MODALS ─────────────── */
.modal-content {
  border: none !important;
  border-radius: var(--r-xl) !important;
  box-shadow: var(--shadow-xl) !important;
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid var(--surface-body) !important;
  padding: 20px 24px;
}

.modal-title {
  font-weight: 700;
  font-size: 16px;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--surface-body) !important;
  padding: 16px 24px;
}

.modal-backdrop.show {
  opacity: 0.4;
  backdrop-filter: blur(4px);
}

/* ─────────────── 16. SEARCH MODAL ─────────────── */
#searchModal .modal-content {
  border-radius: var(--r-xl) !important;
  box-shadow: var(--shadow-xl);
}

/* ─────────────── 17. NOTIFICATION / STARRED SIDEPANEL ─────────────── */
.right-sidebar {
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1) !important;
  border-radius: var(--r-xl) 0 0 var(--r-xl);
  border: none !important;
  background: var(--surface-card) !important;
}

[dir="rtl"] .right-sidebar {
  border-radius: 0 var(--r-xl) var(--r-xl) 0;
}

/* ─────────────── 18. BADGE / LABEL ENHANCEMENTS ─────────────── */
.label {
  font-weight: 600 !important;
  font-size: 11px !important;
  border-radius: var(--r-full) !important;
  padding: 4px 10px !important;
  letter-spacing: 0.02em;
}

/* ─────────────── 19. TOOLTIP ─────────────── */
.tooltip-inner {
  background: var(--text-primary) !important;
  border-radius: var(--r-sm) !important;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
}

.tooltip.bs-tooltip-top .arrow::before,
.tooltip.bs-tooltip-auto[x-placement^="top"] .arrow::before {
  border-top-color: var(--text-primary) !important;
}

/* ─────────────── 20. RESPONSIVE ENHANCEMENTS ─────────────── */
@media (max-width: 1199px) {
  .page-wrapper > .container-fluid {
    padding: 16px !important;
  }

  .dash-value {
    font-size: 26px !important;
  }

  .status-pill h1 {
    font-size: 28px !important;
  }
}

@media (max-width: 991px) {
  .top-search-container {
    min-width: 200px;
  }

  .card-body {
    padding: 18px !important;
  }

  .sl-item.timeline {
    padding-inline-start: 52px;
  }

  .sl-item .sl-left img {
    width: 36px !important;
    height: 36px !important;
  }

  .sl-item .sl-left {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 767px) {
  :root {
    --page-padding: 12px;
  }

  .top-search-container {
    display: none !important;
  }

  .dash-card .card-body {
    padding: 16px !important;
  }

  .dash-value {
    font-size: 24px !important;
  }

  .icon-circle-bg {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }

  .status-pill {
    padding: 12px 8px;
  }

  .status-pill h1 {
    font-size: 24px !important;
  }

  .profile-pic {
    padding: 4px 8px !important;
  }

  .profile-pic #topnav_username {
    display: none;
  }

  .card {
    border-radius: var(--r-lg) !important;
  }

  .navbar-top-right .nav-link {
    width: 36px;
    height: 36px;
    margin: 0 1px;
  }

  .sl-item.timeline {
    padding-inline-start: 48px;
  }

  .sl-item .sl-left img {
    width: 32px !important;
    height: 32px !important;
  }

  .sl-item .sl-left {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 576px) {
  .page-wrapper > .container-fluid {
    padding: 8px !important;
  }

  .card-body {
    padding: 14px !important;
  }

  .dash-title {
    font-size: 11px !important;
  }

  .dash-value {
    font-size: 22px !important;
  }

  .icon-circle-bg {
    width: 38px;
    height: 38px;
    font-size: 18px;
    border-radius: var(--r-md);
  }
}

/* ─────────────── 21. PRINT STYLES ─────────────── */
@media print {
  .topbar,
  .left-sidebar,
  .page-wrapper-overlay,
  .preloader {
    display: none !important;
  }

  .page-wrapper {
    margin: 0 !important;
    padding: 0 !important;
  }

  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }

  body {
    background: #fff !important;
  }
}

/* ─────────────── 22. SKELETON / LOADING STATES ─────────────── */
@keyframes skeletonPulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.3; }
  100% { opacity: 0.6; }
}

.loading .card-body {
  position: relative;
}

.loading .card-body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--surface-card);
  animation: skeletonPulse 1.5s infinite;
  z-index: 5;
  border-radius: inherit;
}

/* ─────────────── 23. SMOOTH PAGE TRANSITIONS ─────────────── */
.container-fluid {
  animation: pageEntrance 0.4s var(--ease-smooth);
}

@keyframes pageEntrance {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ─────────────── 24. ACCENT COLORS OVERRIDES ─────────────── */
.text-info {
  color: var(--clr-info) !important;
}

.text-warning {
  color: var(--clr-warning) !important;
}

.text-danger {
  color: var(--clr-danger) !important;
}

.text-success {
  color: var(--clr-success) !important;
}

.bg-info {
  background-color: var(--clr-info) !important;
}

.bg-warning {
  background-color: var(--clr-warning) !important;
}

.bg-danger {
  background-color: var(--clr-danger) !important;
}

.bg-success {
  background-color: var(--clr-success) !important;
}

/* ─────────────── 25. EXTRA POLISH ─────────────── */

/* Smooth row spacing */
#js-trigger-home-admin-wrapper > .row {
  margin-bottom: 4px;
}

#js-trigger-home-admin-wrapper > .row > [class*="col-"] {
  padding-left: 12px;
  padding-right: 12px;
  margin-bottom: 8px;
}

/* Better no-block flex */
.d-flex.no-block {
  align-items: center;
}

/* Hide ugly default borders */
.no-wrap {
  border: none !important;
}

/* Card subtle inner glow on white cards */
.dash-card:not([class*="bg-gradient"]) {
  position: relative;
}

.dash-card:not([class*="bg-gradient"])::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.08), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Subtle hover glow for white cards */
.dash-card:not([class*="bg-gradient"]):hover::before {
  background: linear-gradient(135deg, rgba(var(--brand-primary-rgb), 0.12), transparent 60%);
}

/* Align the sidebar with topbar */
.left-sidebar {
  padding-top: 0;
}

/* Better collapsed sidebar look */
.mini-sidebar .left-sidebar,
.mini-sidebar .scroll-sidebar,
.mini-sidebar .sidebar-nav {
  overflow: visible !important;
}

.mini-sidebar .sidenav-menu-item > a {
  justify-content: center;
  padding: 12px !important;
}

.mini-sidebar .sidenav-menu-item:hover > a {
  justify-content: flex-start;
}

.mini-sidebar .hide-menu {
  display: none;
}

.mini-sidebar .sidenav-menu-item > a i {
  margin: 0;
  font-size: 20px;
}

.mini-sidebar .sidenav-menu-item:hover > a i {
  margin-inline-end: 15px;
}
html[dir="rtl"] .modal-content {
    overflow: visible !important;
}
[dir="rtl"] .custom-control {
    position: relative !important;
}
[dir="rtl"] .right-sidebar .r-panel-body {
    padding: 20px;
    overflow: visible !important;
}

/* ============================================================
   PROJECTS TABLE — PROFESSIONAL UI/UX ENHANCEMENT (FIXED)
   ============================================================ */

/* ─────────── DESIGN TOKENS ─────────── */
#projects-view-wrapper {
  --tbl-primary: #4361ee;
  --tbl-primary-rgb: 67, 97, 238;
  --tbl-primary-light: #eef2ff;
  --tbl-primary-dark: #3651d4;
  --tbl-success: #10b981;
  --tbl-success-light: #ecfdf5;
  --tbl-danger: #ef4444;
  --tbl-danger-light: #fef2f2;
  --tbl-warning: #f59e0b;
  --tbl-warning-light: #fffbeb;
  --tbl-info: #06b6d4;
  --tbl-info-light: #ecfeff;
  --tbl-surface: #ffffff;
  --tbl-surface-alt: #f8fafc;
  --tbl-surface-hover: #f1f5f9;
  --tbl-border: #e2e8f0;
  --tbl-border-light: #f1f5f9;
  --tbl-text-primary: #1e293b;
  --tbl-text-secondary: #475569;
  --tbl-text-muted: #94a3b8;
  --tbl-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --tbl-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --tbl-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --tbl-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --tbl-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --tbl-r-sm: 8px;
  --tbl-r-md: 12px;
  --tbl-r-lg: 16px;
  --tbl-r-xl: 20px;
  --tbl-r-full: 9999px;
  --tbl-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tbl-t-fast: 0.15s var(--tbl-ease);
  --tbl-t-normal: 0.25s var(--tbl-ease);
}

/* ─────────── 1. WRAPPER & CARD ─────────── */
#projects-view-wrapper {
  animation: tblFadeIn 0.4s var(--tbl-ease);
}

@keyframes tblFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

#projects-view-wrapper > .card {
  border: none !important;
  border-radius: var(--tbl-r-xl) !important;
  box-shadow: var(--tbl-shadow-sm) !important;
  overflow: hidden;
  background: var(--tbl-surface) !important;
  transition: box-shadow var(--tbl-t-normal);
  position: relative;
}

#projects-view-wrapper > .card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(var(--tbl-primary-rgb), 0.1), transparent 40%, transparent 60%, rgba(var(--tbl-primary-rgb), 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

#projects-view-wrapper > .card:hover {
  box-shadow: var(--tbl-shadow-md) !important;
}

#projects-view-wrapper > .card > .card-body {
  padding: 0 !important;
}

/* ─────────── 2. TABLE SCROLL WRAPPER (FIX #1) ─────────── */
/*
   IMPORTANT: We keep overflow-x: auto so the horizontal
   scrollbar appears when columns exceed the viewport.
   Dropdowns are handled via position: fixed workaround.
*/
#projects-view-wrapper .table-responsive.list-table-wrapper {
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch;
  min-height: 200px;
  scrollbar-width: thin;
  scrollbar-color: var(--tbl-border) transparent;
  position: relative;
}

/* Custom scrollbar track & thumb */
#projects-view-wrapper .table-responsive.list-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

#projects-view-wrapper .table-responsive.list-table-wrapper::-webkit-scrollbar-track {
  background: var(--tbl-surface-alt);
  border-radius: 0 0 var(--tbl-r-xl) var(--tbl-r-xl);
}

#projects-view-wrapper .table-responsive.list-table-wrapper::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, var(--tbl-border), var(--tbl-text-muted));
  border-radius: 10px;
  border: 2px solid var(--tbl-surface-alt);
}

#projects-view-wrapper .table-responsive.list-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, var(--tbl-text-muted), var(--tbl-text-secondary));
}

/* Show a subtle gradient hint when scrollable */
#projects-view-wrapper .table-responsive.list-table-wrapper::after {
  content: '';
  position: sticky;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  pointer-events: none;
  background: linear-gradient(to left, rgba(255,255,255,0.8), transparent);
  z-index: 5;
  display: block;
  float: right;
  height: 100%;
  margin-top: -100%;
}

[dir="rtl"] #projects-view-wrapper .table-responsive.list-table-wrapper::after {
  right: auto;
  left: 0;
  float: left;
  background: linear-gradient(to right, rgba(255,255,255,0.8), transparent);
}

/* ─────────── 3. TABLE BASE ─────────── */
#projects-list-table {
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100%;
}

/* ─────────── 4. THEAD ─────────── */
#projects-list-table > thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

#projects-list-table > thead > tr {
  background: linear-gradient(180deg, var(--tbl-surface-alt) 0%, var(--tbl-surface) 100%) !important;
}

#projects-list-table > thead > tr > th {
  padding: 14px 16px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--tbl-text-muted) !important;
  border: none !important;
  border-bottom: 2px solid var(--tbl-border-light) !important;
  white-space: nowrap;
  vertical-align: middle !important;
  transition: background var(--tbl-t-fast), color var(--tbl-t-fast);
  background: transparent;
}

#projects-list-table > thead > tr > th:first-child {
  padding-inline-start: 20px !important;
}

#projects-list-table > thead > tr > th:hover {
  background: rgba(var(--tbl-primary-rgb), 0.03);
  color: var(--tbl-text-secondary) !important;
}

/* Header links */
#projects-list-table > thead th a {
  color: inherit !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700 !important;
  transition: color var(--tbl-t-fast);
  white-space: nowrap;
}

#projects-list-table > thead th a:hover {
  color: var(--tbl-primary) !important;
}

/* Sorting icons */
#projects-list-table .sorting-icons {
  display: inline-flex;
  align-items: center;
  opacity: 0.35;
  transition: all var(--tbl-t-fast);
  margin-inline-start: 3px;
  font-size: 10px;
}

#projects-list-table > thead th:hover .sorting-icons,
#projects-list-table > thead th a:hover .sorting-icons {
  opacity: 0.8;
  color: var(--tbl-primary);
}

/* ─────────── 5. CONFIG ICON (FIX #2) ─────────── */
/*
   The gear icon sits inside the last <th> alongside the "إجراء" link.
   We must NOT set display:flex on <th> — it breaks table layout.
   Instead we style children inline.
*/
#projects-list-table th.with-table-config-icon {
  /* DO NOT set display:flex here */
  position: relative;
  white-space: nowrap;
}

#projects-list-table th.with-table-config-icon > a {
  vertical-align: middle;
}

#projects-list-table .table-config-icon {
  display: inline-block !important;
  vertical-align: middle;
  margin-inline-start: 8px;
  position: relative;
  z-index: 2;
}

#projects-list-table .table-config-icon .text-default,
#projects-list-table .table-config-icon span {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--tbl-t-fast);
  color: var(--tbl-text-muted);
  font-size: 16px;
  background: transparent;
  border: 1.5px solid transparent;
  visibility: visible !important;
  opacity: 1 !important;
}

#projects-list-table .table-config-icon .text-default:hover,
#projects-list-table .table-config-icon span:hover {
  background: var(--tbl-surface-hover);
  border-color: var(--tbl-border);
  color: var(--tbl-primary);
  transform: rotate(90deg);
  box-shadow: var(--tbl-shadow-sm);
}


/* ─────────── 6. TBODY ROWS ─────────── */
#projects-list-table > tbody > tr {
  transition: all var(--tbl-t-normal);
  position: relative;
  background: var(--tbl-surface);
}

#projects-list-table > tbody > tr:nth-child(even) {
  background: var(--tbl-surface-alt);
}

#projects-list-table > tbody > tr:hover {
  background: var(--tbl-primary-light) !important;
}

/* Row separator line */
#projects-list-table > tbody > tr > td {
  border-bottom: 1px solid var(--tbl-border-light) !important;
  border-top: none !important;
}

#projects-list-table > tbody > tr:last-child > td {
  border-bottom: none !important;
}

/* ─────────── 7. PINNED ROW ─────────── */
#projects-list-table > tbody > tr.pinned {
  background: linear-gradient(90deg, rgba(var(--tbl-primary-rgb), 0.04) 0%, transparent 40%) !important;
}

[dir="rtl"] #projects-list-table > tbody > tr.pinned {
  background: linear-gradient(270deg, rgba(var(--tbl-primary-rgb), 0.04) 0%, transparent 40%) !important;
}

#projects-list-table > tbody > tr.pinned > td:first-child {
  position: relative;
}

#projects-list-table > tbody > tr.pinned > td:first-child::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tbl-primary);
}

[dir="ltr"] #projects-list-table > tbody > tr.pinned > td:first-child::before { left: 0; }
[dir="rtl"] #projects-list-table > tbody > tr.pinned > td:first-child::before { right: 0; border-radius: 3px 0 0 3px; }

#projects-list-table > tbody > tr.pinned:hover {
  background: linear-gradient(90deg, rgba(var(--tbl-primary-rgb), 0.07) 0%, var(--tbl-primary-light) 100%) !important;
}

[dir="rtl"] #projects-list-table > tbody > tr.pinned:hover {
  background: linear-gradient(270deg, rgba(var(--tbl-primary-rgb), 0.07) 0%, var(--tbl-primary-light) 100%) !important;
}

#projects-list-table > tbody > tr.pinned .js-toggle-pinning {
  opacity: 1 !important;
  color: var(--tbl-primary) !important;
  border-color: var(--tbl-primary) !important;
  background: var(--tbl-primary-light) !important;
}

/* ─────────── 8. TD CELLS ─────────── */
#projects-list-table > tbody > tr > td {
  padding: 14px 16px !important;
  font-size: 13.5px !important;
  color: var(--tbl-text-secondary) !important;
  border-left: none !important;
  border-right: none !important;
  vertical-align: middle !important;
  transition: all var(--tbl-t-fast);
  white-space: nowrap;
}

#projects-list-table > tbody > tr > td:first-child {
  padding-inline-start: 20px !important;
}

#projects-list-table > tbody > tr > td:last-child {
  padding-inline-end: 20px !important;
}

/* ─────────── 9. CHECKBOX ─────────── */
#projects-list-table .list-checkbox-wrapper,
#projects-list-table .projects_col_checkbox {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  text-align: center !important;
}

#projects-list-table .list-checkboxes label {
  cursor: pointer;
}

#projects-list-table .list-checkboxes label::before {
  border-radius: 5px !important;
  border-width: 2px !important;
  transition: all var(--tbl-t-fast) !important;
}

#projects-list-table .list-checkboxes label:hover::before {
  border-color: var(--tbl-primary) !important;
}

#projects-list-table .chk-col-light-blue:checked + label::before {
  border-color: var(--tbl-primary) !important;
  background-color: var(--tbl-primary) !important;
  box-shadow: 0 2px 6px rgba(var(--tbl-primary-rgb), 0.3);
}

/* ─────────── 10. ID COLUMN ─────────── */
#projects-list-table .projects_col_id { width: 60px; min-width: 60px; }

#projects-list-table .projects_col_id a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 26px;
  padding: 0 10px;
  background: var(--tbl-primary-light);
  color: var(--tbl-primary) !important;
  border-radius: var(--tbl-r-full);
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: all var(--tbl-t-fast);
}

#projects-list-table .projects_col_id a:hover {
  background: var(--tbl-primary);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(var(--tbl-primary-rgb), 0.3);
}

/* Hover row → auto-fill ID */
#projects-list-table > tbody > tr:hover .projects_col_id a {
  background: var(--tbl-primary);
  color: #fff !important;
}

/* ─────────── 11. PROJECT TITLE ─────────── */
#projects-list-table .projects_col_project { min-width: 180px; max-width: 280px; }

#projects-list-table .projects_col_project > a:first-of-type {
  color: var(--tbl-text-primary) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
  display: inline-block;
  position: relative;
  transition: all var(--tbl-t-fast);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-bottom: 2px;
}

#projects-list-table .projects_col_project > a:first-of-type::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--tbl-primary);
  border-radius: 2px;
  transition: width var(--tbl-t-normal);
}

[dir="ltr"] #projects-list-table .projects_col_project > a:first-of-type::after { left: 0; }
[dir="rtl"] #projects-list-table .projects_col_project > a:first-of-type::after { right: 0; }

#projects-list-table .projects_col_project > a:first-of-type:hover {
  color: var(--tbl-primary) !important;
}

#projects-list-table .projects_col_project > a:first-of-type:hover::after {
  width: 100%;
}

/* Hide broken empty <a> tags */
#projects-list-table .projects_col_project a:empty,
#projects-list-table .projects_col_project a:not([href]),
#projects-list-table td a:not([href]) {
  display: none !important;
}

/* ─────────── 12. CLIENT COLUMN ─────────── */
#projects-list-table .projects_col_client a {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--tbl-surface-alt);
  border: 1px solid var(--tbl-border-light);
  border-radius: var(--tbl-r-full);
  color: var(--tbl-text-secondary) !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: all var(--tbl-t-fast);
  white-space: nowrap;
}

#projects-list-table .projects_col_client a:hover {
  background: var(--tbl-info-light);
  border-color: var(--tbl-info);
  color: var(--tbl-info) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.15);
}

/* ─────────── 13. DATE COLUMNS ─────────── */
#projects-list-table .projects_col_start_date,
#projects-list-table .projects_col_end_date {
  font-variant-numeric: tabular-nums !important;
  font-size: 13px !important;
  color: var(--tbl-text-muted) !important;
  font-weight: 500 !important;
}

/* ─────────── 14. TAGS ─────────── */
#projects-list-table .projects_col_tags span {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--tbl-r-full);
  font-size: 11.5px;
  font-weight: 500;
  background: var(--tbl-surface-alt);
  color: var(--tbl-text-muted);
  border: 1px solid var(--tbl-border-light);
}

/* ════════════════════════════════════════════════
   15. PROGRESS BAR (FIX #3 — COMPLETELY REDESIGNED)
   ════════════════════════════════════════════════ */
#projects-list-table .projects_col_progress {
  min-width: 150px;
  padding-inline-end: 24px !important;
}

/* Outer progress container */
#projects-list-table .projects_col_progress .progress {
  height: 22px !important;
  border-radius: var(--tbl-r-full) !important;
  background: var(--tbl-surface-alt) !important;
  overflow: visible !important;
  border: 1.5px solid var(--tbl-border-light) !important;
  min-width: 110px;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
}

/* Inner progress fill bar */
#projects-list-table .projects_col_progress .progress-bar {
  height: 100% !important;
  border-radius: var(--tbl-r-full) !important;
  transition: width 0.8s var(--tbl-ease);
  position: relative;
  min-width: 0 !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: visible !important;
  font-size: 0; /* hide default text */
}

/* Color tiers based on width */
#projects-list-table .projects_col_progress .progress-bar.bg-info {
  background: linear-gradient(90deg, #818cf8, var(--tbl-primary)) !important;
  box-shadow: 0 2px 8px rgba(var(--tbl-primary-rgb), 0.25);
}

/* Percentage tooltip dot at end of bar */
#projects-list-table .projects_col_progress .progress-bar:not(.w-0)::after {
  content: '';
  position: absolute;
  inset-inline-end: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--tbl-surface);
  border: 2.5px solid var(--tbl-primary);
  box-shadow: 0 2px 6px rgba(var(--tbl-primary-rgb), 0.35);
  z-index: 3;
  transition: all var(--tbl-t-fast);
}

#projects-list-table > tbody > tr:hover .projects_col_progress .progress-bar:not(.w-0)::after {
  transform: translateY(-50%) scale(1.2);
  box-shadow: 0 3px 10px rgba(var(--tbl-primary-rgb), 0.45);
}

/* Shimmer animation on the fill */
#projects-list-table .projects_col_progress .progress-bar:not(.w-0)::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  border-radius: inherit;
  animation: tblProgressShimmer 3s ease infinite;
}

@keyframes tblProgressShimmer {
  0%   { left: -100%; }
  100% { left: 100%; }
}

/* Zero progress (w-0) — special minimal style */
#projects-list-table .projects_col_progress .progress-bar.w-0 {
  background: transparent !important;
  box-shadow: none !important;
  width: 0 !important;
  min-width: 0 !important;
}

#projects-list-table .projects_col_progress .progress-bar.w-0::before,
#projects-list-table .projects_col_progress .progress-bar.w-0::after {
  display: none !important;
}

/* Show "0%" text inside empty progress */
#projects-list-table .projects_col_progress .progress[data-original-title="0%"]::after,
#projects-list-table .projects_col_progress .progress[title="0%"]::after {
  content: '0%';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--tbl-text-muted);
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 2;
}

/* For bars with progress, show percentage label */
#projects-list-table .projects_col_progress .progress:not([data-original-title="0%"]):not([title="0%"])::after {
  content: attr(data-original-title);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--tbl-text-primary);
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* Hover glow on progress bar */
#projects-list-table > tbody > tr:hover .projects_col_progress .progress {
  border-color: rgba(var(--tbl-primary-rgb), 0.2) !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04),
              0 0 0 3px rgba(var(--tbl-primary-rgb), 0.06);
}

/* Print view */
#projects-list-table .printing_progress_bar {
  display: none;
}

/* ─────────── 16. NUMERIC / MONEY COLUMNS ─────────── */
#projects-list-table .col_count_pending_tasks,
#projects-list-table .col_count_completed_tasks,
#projects-list-table .col_count_files,
#projects-list-table .count_tickets_open,
#projects-list-table .col_count_tickets_closed {
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
  text-align: center !important;
}

#projects-list-table .col_sum_invoices_all,
#projects-list-table .col_sum_all_payments,
#projects-list-table .col_sum_outstanding_balance,
#projects-list-table .col_project_billing_costs_estimate,
#projects-list-table .col_sum_expenses {
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums;
  color: var(--tbl-text-primary) !important;
  white-space: nowrap;
}

/* ─────────── 17. TEAM AVATARS ─────────── */
#projects-list-table .projects_col_team { min-width: 80px; }

#projects-list-table .column_assigned_users .avatar-xsmall,
#projects-list-table .column_assigned_users .img-circle.avatar-xsmall {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  border: 2.5px solid var(--tbl-surface) !important;
  box-shadow: var(--tbl-shadow-xs);
  transition: all var(--tbl-t-fast);
  object-fit: cover;
  cursor: pointer;
  vertical-align: middle;
}

#projects-list-table .column_assigned_users .avatar-xsmall + .avatar-xsmall {
  margin-inline-start: -10px;
}

#projects-list-table .column_assigned_users .avatar-xsmall:hover {
  transform: scale(1.2) translateY(-3px);
  box-shadow: var(--tbl-shadow-md);
  z-index: 5;
  position: relative;
  border-color: var(--tbl-primary) !important;
}

/* ─────────── 18. STATUS BADGES ─────────── */
#projects-list-table .projects_col_status .label,
#projects-list-table .projects_col_status span[class*="label"] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 5px 14px !important;
  border-radius: var(--tbl-r-full) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  transition: all var(--tbl-t-fast);
  cursor: default;
  white-space: nowrap;
  min-height: 26px;
  line-height: 1.4;
}

#projects-list-table .label-outline-default {
  background: var(--tbl-surface-alt) !important;
  color: var(--tbl-text-muted) !important;
  border: 1.5px solid var(--tbl-border) !important;
}

#projects-list-table .label-outline-default:hover {
  background: var(--tbl-surface-hover) !important;
  transform: translateY(-1px);
  box-shadow: var(--tbl-shadow-sm);
}

#projects-list-table .label-outline-info,
#projects-list-table .label.bg-info {
  background: var(--tbl-info-light) !important;
  color: var(--tbl-info) !important;
  border: 1.5px solid rgba(6, 182, 212, 0.2) !important;
}

#projects-list-table .label-outline-success,
#projects-list-table .label.bg-success {
  background: var(--tbl-success-light) !important;
  color: var(--tbl-success) !important;
  border: 1.5px solid rgba(16, 185, 129, 0.2) !important;
}

#projects-list-table .label-outline-warning,
#projects-list-table .label.bg-warning {
  background: var(--tbl-warning-light) !important;
  color: var(--tbl-warning) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.2) !important;
}

#projects-list-table .label-outline-danger,
#projects-list-table .label.bg-danger {
  background: var(--tbl-danger-light) !important;
  color: var(--tbl-danger) !important;
  border: 1.5px solid rgba(239, 68, 68, 0.2) !important;
}

/* Hover row → badge lift */
#projects-list-table > tbody > tr:hover .projects_col_status .label {
  transform: translateY(-1px);
  box-shadow: var(--tbl-shadow-xs);
}

/* ─────────── 19. ACTION BUTTONS ─────────── */
#projects-list-table .actions_column {
  white-space: nowrap !important;
  min-width: 190px;
}

#projects-list-table .list-table-action {
  display: inline-flex;
  align-items: center;
  margin: 0 1px;
  vertical-align: middle;
}

#projects-list-table .btn-circle.btn-sm {
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  font-size: 13px !important;
  transition: all var(--tbl-t-fast);
  border-width: 1.5px !important;
  position: relative;
  overflow: hidden;
  line-height: 1;
}

/* Ripple */
#projects-list-table .btn-circle.btn-sm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  border-radius: 50%;
  transition: opacity var(--tbl-t-normal);
}

#projects-list-table .btn-circle.btn-sm:hover::before { opacity: 0.08; }
#projects-list-table .btn-circle.btn-sm:hover { transform: translateY(-2px) scale(1.08); }
#projects-list-table .btn-circle.btn-sm:active { transform: translateY(0) scale(0.95); }

/* Delete */
#projects-list-table .btn-outline-danger.btn-circle {
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: var(--tbl-danger) !important;
  background: transparent !important;
}
#projects-list-table .btn-outline-danger.btn-circle:hover {
  background: var(--tbl-danger) !important;
  color: #fff !important;
  border-color: var(--tbl-danger) !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Edit */
#projects-list-table .btn-outline-success.btn-circle {
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: var(--tbl-success) !important;
  background: transparent !important;
}
#projects-list-table .btn-outline-success.btn-circle:hover {
  background: var(--tbl-success) !important;
  color: #fff !important;
  border-color: var(--tbl-success) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Assign */
#projects-list-table .btn-outline-info.btn-circle {
  border-color: rgba(6, 182, 212, 0.4) !important;
  color: var(--tbl-info) !important;
  background: transparent !important;
}
#projects-list-table .btn-outline-info.btn-circle:hover {
  background: var(--tbl-info) !important;
  color: #fff !important;
  border-color: var(--tbl-info) !important;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* More / Default */
#projects-list-table .btn-outline-default-light.btn-circle {
  border-color: var(--tbl-border) !important;
  color: var(--tbl-text-muted) !important;
  background: transparent !important;
}
#projects-list-table .btn-outline-default-light.btn-circle:hover {
  background: var(--tbl-text-primary) !important;
  color: #fff !important;
  border-color: var(--tbl-text-primary) !important;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
}

/* Pin */
#projects-list-table .js-toggle-pinning {
  opacity: 0.35 !important;
  transition: all var(--tbl-t-fast) !important;
}
#projects-list-table .js-toggle-pinning:hover {
  opacity: 1 !important;
  color: var(--tbl-warning) !important;
  border-color: var(--tbl-warning) !important;
  background: var(--tbl-warning-light) !important;
}

/* Star */
#projects-list-table .btn-outline-default.btn-circle {
  border-color: var(--tbl-border) !important;
}
#projects-list-table .btn-outline-default.btn-circle:hover {
  color: var(--tbl-warning) !important;
  border-color: var(--tbl-warning) !important;
  background: var(--tbl-warning-light) !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Fade-reveal on hover */
#projects-list-table > tbody > tr .actions_column .list-table-action {
  opacity: 0.5;
  transition: opacity var(--tbl-t-fast);
}
#projects-list-table > tbody > tr:hover .actions_column .list-table-action {
  opacity: 1;
}

/* ─────────── 20. DROPDOWN MENUS ─────────── */
#projects-list-table .dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: var(--tbl-r-md) !important;
  box-shadow: var(--tbl-shadow-xl) !important;
  padding: 6px !important;
  min-width: 190px;
  animation: tblDropIn 0.2s var(--tbl-ease);
  background: var(--tbl-surface) !important;
  z-index: 1050 !important;
}

@keyframes tblDropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#projects-list-table .dropdown-menu .dropdown-item {
  padding: 9px 14px !important;
  border-radius: var(--tbl-r-sm) !important;
  font-size: 13px !important;
  font-weight: 500;
  color: var(--tbl-text-primary) !important;
  transition: all var(--tbl-t-fast);
  white-space: nowrap;
  margin-bottom: 1px;
}

#projects-list-table .dropdown-menu .dropdown-item:hover {
  background: rgba(var(--tbl-primary-rgb), 0.06) !important;
  color: var(--tbl-primary) !important;
}

[dir="ltr"] #projects-list-table .dropdown-menu .dropdown-item:hover { padding-left: 18px !important; }
[dir="rtl"] #projects-list-table .dropdown-menu .dropdown-item:hover { padding-right: 18px !important; }

#projects-list-table .dropdown-menu .dropdown-item.confirm-action-danger {
  color: var(--tbl-danger) !important;
}
#projects-list-table .dropdown-menu .dropdown-item.confirm-action-danger:hover {
  background: var(--tbl-danger-light) !important;
}

/* ─────────── 21. TFOOT ─────────── */
#projects-list-table > tfoot > tr > td {
  padding: 16px !important;
  border: none !important;
  text-align: center;
  background: var(--tbl-surface-alt);
}

/* ─────────── 22. ROW ANIMATION ─────────── */
#projects-td-container > tr {
  animation: tblRowIn 0.35s var(--tbl-ease) both;
}
#projects-td-container > tr:nth-child(1) { animation-delay: 0.03s; }
#projects-td-container > tr:nth-child(2) { animation-delay: 0.06s; }
#projects-td-container > tr:nth-child(3) { animation-delay: 0.09s; }
#projects-td-container > tr:nth-child(4) { animation-delay: 0.12s; }
#projects-td-container > tr:nth-child(5) { animation-delay: 0.15s; }
#projects-td-container > tr:nth-child(6) { animation-delay: 0.18s; }
#projects-td-container > tr:nth-child(7) { animation-delay: 0.21s; }
#projects-td-container > tr:nth-child(8) { animation-delay: 0.24s; }
#projects-td-container > tr:nth-child(9) { animation-delay: 0.27s; }
#projects-td-container > tr:nth-child(10) { animation-delay: 0.30s; }

@keyframes tblRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────── 23. HIDDEN COLUMNS ─────────── */
#projects-list-table .hidden {
  display: none !important;
}

/* ─────────── 24. ACCESSIBILITY ─────────── */
#projects-list-table :focus-visible {
  outline: 2px solid var(--tbl-primary);
  outline-offset: 2px;
}

#projects-view-wrapper ::selection {
  background: rgba(var(--tbl-primary-rgb), 0.12);
  color: var(--tbl-primary-dark);
}

/* ─────────── 25. RESPONSIVE ─────────── */
@media (max-width: 1200px) {
  #projects-list-table > thead > tr > th,
  #projects-list-table > tbody > tr > td {
    padding: 12px 12px !important;
    font-size: 12.5px !important;
  }
  #projects-list-table .projects_col_progress { min-width: 120px; }
}

@media (max-width: 992px) {
  #projects-view-wrapper > .card { border-radius: var(--tbl-r-lg) !important; }
  #projects-list-table .btn-circle.btn-sm { width: 30px !important; height: 30px !important; font-size: 12px !important; }
}

@media (max-width: 768px) {
  #projects-view-wrapper > .card { border-radius: var(--tbl-r-md) !important; }
  #projects-list-table > thead > tr > th,
  #projects-list-table > tbody > tr > td { padding: 10px 10px !important; }
  #projects-list-table .projects_col_progress { min-width: 100px; }
  #projects-list-table .column_assigned_users .avatar-xsmall { width: 28px !important; height: 28px !important; }
  #projects-list-table .btn-circle.btn-sm { width: 28px !important; height: 28px !important; }
}

/* ─────────── 26. PRINT ─────────── */
@media print {
  #projects-view-wrapper > .card { box-shadow: none !important; border: 1px solid #ddd !important; }
  #projects-list-table .actions_column,
  #projects-list-table .list-checkbox-wrapper,
  #projects-list-table .projects_col_checkbox,
  #projects-list-table .table-config-icon { display: none !important; }
  #projects-list-table .printing_progress_bar { display: block !important; }
  #projects-list-table .progress { display: none !important; }
  #projects-list-table > tbody > tr { background: #fff !important; }
}
.kanban .page-wrapper .container-fluid {
    padding-top: 94px !important;
    padding-bottom: 0px;
}
@media (min-width: 576px) {
    .hidden-sm-up {
        display: block !important;
    }
}
[dir="rtl"] .card-assigned-popover-content {
 height: 350px;
    overflow-y: scroll;
    overflow-x: hidden;
    direction: ltr;
    text-align: right;
}
Perfect! I have redesigned this project page to match the exact same modern design system we used for the task modal, so your whole application will have 100% consistent professional UI. This is pure CSS, drop it in and everything will work exactly as before just look 10x better.

```css
/* ============================================
   PROJECT DETAILS PAGE - PROFESSIONAL UI/UX
   Matching design system from task modal
   ============================================ */

/* ---------- Base & Variables ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-darker: #4338ca;
    --primary-light: #eef2ff;
    --primary-glow: rgba(99, 102, 241, 0.25);
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --info: #3b82f6;
    --info-light: #eff6ff;
    --purple: #8b5cf6;
    --gray-25: #fcfcfd;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: var(--gray-50);
    font-family: var(--font-family);
}

/* ---------- Page Header & Breadcrumbs ---------- */
.page-titles {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border-bottom: 1px solid var(--gray-200);
    padding: 24px 0 !important;
    margin-bottom: 0 !important;
    position: relative;
}

.page-titles::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.2;
}

.page-titles h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0 0 6px 0;
    letter-spacing: -0.4px;
}

.page-titles .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 13px;
}

.page-titles .breadcrumb li {
    color: var(--gray-500);
    font-weight: 500;
}

.page-titles .breadcrumb li.active {
    color: var(--primary);
    font-weight: 600;
}

.page-titles .breadcrumb li a {
    color: var(--gray-500);
    text-decoration: none;
    transition: var(--transition);
}

.page-titles .breadcrumb li a:hover {
    color: var(--primary);
}

/* ---------- Top Action Buttons ---------- */
#list-page-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.btn-page-actions {
   
    color: var(--gray-600) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    
}

.btn-page-actions:hover {
    background: var(--primary-light) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-page-actions.active,
.btn-page-actions.active:hover {
    background: var(--warning-light) !important;
    border-color: var(--warning) !important;
    color: var(--warning) !important;
}

.btn-page-actions.confirm-action-danger:hover {
    background: var(--danger-light) !important;
}
.card-modal .card-left-panel .x-action a { color: #67757c; text-decoration: underline; font-size: 16px !important; padding-left: 20px; }
.card-modal .card-right-panel .x-element {
    min-height: 31px;
    border-color: #d1dfe4;
    padding: 5px;
    background-color: #d1dfe4;
    border-radius: 3px;
    font-size: 16px !important;
}
.card-modal .modal-dialog .modal-content #cardModalTabMenu ul {
    background-color: #fcfdff;
    border: 0px !important;
}
.datepicker.datepicker-dropdown.dropdown-menu.datepicker-default.datepicker-orient-left.datepicker-orient-top {
    right: 50% !important;
    left: auto !important;
}
.card-modal .card-right-panel .x-element .x-highlight {
    color: #335f8b !important;
    font-weight: 500;
}


.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 16px !important;
}
.client-selector .client-selector-links .active, .client-selector .modal-selector-links .active, .modal-selector .client-selector-links .active, .modal-selector .modal-selector-links .active {
    font-weight: 500;
    /* text-decoration: underline; */
    display: inline-block;
    background-color: #edf5fd;
}
[dir="rtl"] .modal-open .modal {
    overflow-x: visible !important;
    overflow-y: scroll !important;
}
[dir="rtl"] .modal-open .modal {
    overflow-x: hidden !important;
direction: rtl
    overflow-y: auto !important;
}
[dir="rtl"] .card {
    
    overflow: visible !important;
}
/* Ensure datepicker renders above modal */
.datepicker {
    z-index: 1060 !important;
}

[dir="rtl"]  input[type="checkbox"] {
    position: absolute;
    opacity: 0;           /* Makes it invisible */
    width: 0;             /* Takes up no space */
    height: 0;
    pointer-events: none; /* Prevents direct interaction */
    
    /* Remove any negative margins or left/right positioning */
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
}
.card-modal .card-left-panel .x-action a {
    color: #67757c;
    text-decoration: underline;
    font-size: 15px !important;
    padding-left: 20px;
}
/* Container styling */
ul.nav.nav-tabs.profile-tab.project-top-nav.list-pages-crumbs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eef2f6; /* Subtle border instead of heavy lines */
    background-color: #ffffff;
    padding: 0 15px;
    gap: 24px; /* Space between tabs */
    list-style: none;
    margin-bottom: 20px;
}

/* Individual tab items */
ul.nav.nav-tabs.profile-tab.project-top-nav.list-pages-crumbs li {
    position: relative;
}

/* The actual link/anchor */
ul.nav.nav-tabs.profile-tab.project-top-nav.list-pages-crumbs li a {
    display: block;
    padding: 12px 4px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b; /* Modern slate grey */
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    border: none !important; /* Remove default bootstrap borders */
}

/* Hover state */


/* Active state (The modern "Underline" look) */
ul.nav.nav-tabs.profile-tab.project-top-nav.list-pages-crumbs li a.active,
ul.nav.nav-tabs.profile-tab.project-top-nav.list-pages-crumbs li.active a {
    color: #3b82f6 !important;
    background: transparent !important;
}

/* The blue bar under the active tab */
ul.nav.nav-tabs.profile-tab.project-top-nav.list-pages-crumbs li a.active::after,
ul.nav.nav-tabs.profile-tab.project-top-nav.list-pages-crumbs li.active a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3b82f6;
    border-radius: 10px 10px 0 0;
}

/* RTL Support - Adjust padding/gap if necessary */
[dir="rtl"] ul.nav.nav-tabs.profile-tab.project-top-nav.list-pages-crumbs {
    padding-right: 15px;
    padding-left: 0;
}
.topbar .navbar-collapse {
    border-bottom: none !important;
}
.topbar .navbar-collapse {
    border-bottom: 0px !important;
}
#sidebarnav li,
.sidebar-nav #sidebarnav li,
nav.sidebar-nav ul li,
.sidebar-nav ul li {
    list-style: none !important;
}
.card.dash-card.bg-gradient-info {
    background-color: red !important;
}
.list-table-action .dropdown-menu a,
.list-table-action .dropdown-menu .dropdown-item {
    font-size: 14px !important;
    padding: 8px 16px !important;
    white-space: nowrap !important;
    display: block !important;
    overflow: visible !important; /* FIX */
}
[dir="rtl"] .datepicker {
    direction: rtl;
   right: 50% !important;
    left: auto !important;
}

#card-reminders-container .bootstrap-datetimepicker-widget {
    direction: rtl !important;
}

/* إصلاح اتجاه التقويم */
[dir="rtl"] #card-reminders-container .datepicker {
   right:0 !important;
    left: auto !important;
}

/* إصلاح مكان ظهور الـ popup */
#card-reminders-container .bootstrap-datetimepicker-widget {
    left: auto !important;
    right: 0 !important;
}
/* 1. Ensure the container is the reference point for the icon */
.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

/* 2. Style the icon position */
.input-icon-svg {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* If icons are on the right (Standard for Arabic): */
    right: 12px; 
    /* If icons are on the left, use: left: 12px; */
    pointer-events: none; /* Allows clicking "through" the icon to the input */
}

/* 3. The Fix: Add padding so text doesn't hit the icon */
.login-input-group .form-control {
    width: 100%;
    /* Adjust 'padding-right' if your icon is on the right */
    padding-right: 45px !important; 
    
    /* Adjust 'padding-left' if your icon is on the left */
    /* padding-left: 45px !important; */
}

/* 4. Ensure the SVG size is controlled */
.input-icon-svg svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #888; /* Or your preferred color */
    stroke-width: 2;
}
.login-options-row {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.login-remember-me {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between box and text */
}

.login-remember-me input {
    cursor: pointer;
    width: 18px;
    height: 18px;
}
a.edit-add-modal-button.js-ajax-ux-request.reset-target-modal-form {
    color: #000 !important;
}
tbody#team-td-container a {
    color: #000 !important;
}

/* ============================================
   SUMMARY CARDS - Enhanced UI/UX
   ============================================ */

/* Container spacing */
#summary-cards-container {
    margin-bottom: 30px;
    padding: 0 5px;
}

#summary-cards-container [class*="col-"] {
    padding: 0 10px;
    margin-bottom: 15px;
}

/* Card Base Styles */
.opp-summary-card {
    border: none;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    position: relative;
    height: 100%;
    cursor: default;
}

/* Subtle top accent border */
.opp-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* Different accent colors per card */
#summary-cards-container .col-lg-3:nth-child(1) .opp-summary-card::before {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

#summary-cards-container .col-lg-3:nth-child(2) .opp-summary-card::before {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

#summary-cards-container .col-lg-3:nth-child(3) .opp-summary-card::before {
    background: linear-gradient(135deg, #10b981, #34d399);
}

#summary-cards-container .col-lg-3:nth-child(4) .opp-summary-card::before {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

/* Hover Effects */
.opp-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.opp-summary-card:hover::before {
    opacity: 1;
}

/* Card Body */
.opp-summary-card .card-body {
    padding: 22px 20px;
    position: relative;
    z-index: 1;
}

/* Background decorative element */
.opp-summary-card::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    opacity: 0.04;
    z-index: 0;
    transition: all 0.35s ease;
}

#summary-cards-container .col-lg-3:nth-child(1) .opp-summary-card::after {
    background: #3b82f6;
}

#summary-cards-container .col-lg-3:nth-child(2) .opp-summary-card::after {
    background: #f59e0b;
}

#summary-cards-container .col-lg-3:nth-child(3) .opp-summary-card::after {
    background: #10b981;
}

#summary-cards-container .col-lg-3:nth-child(4) .opp-summary-card::after {
    background: #8b5cf6;
}

.opp-summary-card:hover::after {
    opacity: 0.08;
    transform: scale(1.2);
}

/* ============================================
   ICON STYLES
   ============================================ */
.opp-card-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    transition: all 0.35s ease;
    position: relative;
    z-index: 1;
}

.opp-summary-card:hover .opp-card-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Icon Gradient Backgrounds */
.bg-info-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.bg-warning-gradient {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.bg-success-gradient {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bg-purple-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.opp-summary-card h6.text-muted {
    font-size: 12px;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px !important;
    line-height: 1.4;
}

.opp-summary-card h4 {
    font-size: 18px;
    font-weight: 700 !important;
    color: #1e293b;
    margin-bottom: 0 !important;
    line-height: 1.3;
    word-break: break-word;
}

.opp-summary-card h4.text-success {
    color: #10b981 !important;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    letter-spacing: 0.5px;
}

/* Team card specific styles */
.opp-summary-card .font-13 {
    font-size: 13px;
    color: #475569;
    line-height: 1.7;
    display: flex;
    align-items: center;
    gap: 4px;
}

.opp-summary-card .font-13 .font-weight-600 {
    color: #64748b;
    font-weight: 500 !important;
    font-size: 12px;
}

/* Content area spacing */
.opp-summary-card .m-l-15 {
    margin-left: 15px !important;
    overflow: hidden;
}

/* ============================================
   RTL SUPPORT (Arabic Layout)
   ============================================ */
[dir="rtl"] .opp-summary-card .m-l-15,
.opp-summary-card .m-l-15 {
    margin-left: 0 !important;
    margin-right: 15px;
}

[dir="rtl"] .opp-summary-card::after {
    right: auto;
    left: -30px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1199px) {
    .opp-card-icon {
        width: 46px;
        height: 46px;
        min-width: 46px;
        font-size: 20px;
        border-radius: 12px;
    }

    .opp-summary-card h4 {
        font-size: 16px;
    }

    .opp-summary-card h6.text-muted {
        font-size: 11px;
    }

    .opp-summary-card .card-body {
        padding: 18px 16px;
    }
}

@media (max-width: 991px) {
    #summary-cards-container [class*="col-"] {
        margin-bottom: 12px;
    }

    .opp-summary-card {
        border-radius: 14px;
    }
}

@media (max-width: 767px) {
    #summary-cards-container {
        margin-bottom: 20px;
    }

    #summary-cards-container [class*="col-"] {
        margin-bottom: 10px;
        padding: 0 8px;
    }

    .opp-summary-card .card-body {
        padding: 16px 14px;
    }

    .opp-card-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 18px;
        border-radius: 11px;
    }

    .opp-summary-card h4 {
        font-size: 15px;
    }

    /* Disable hover on mobile */
    .opp-summary-card:hover {
        transform: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .opp-summary-card::before {
        opacity: 1 !important;
    }
}

@media (max-width: 575px) {
    .opp-summary-card .card-body {
        padding: 14px 12px;
    }

    .opp-card-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 16px;
        border-radius: 10px;
    }

    .opp-summary-card h4 {
        font-size: 14px;
    }

    .opp-summary-card h6.text-muted {
        font-size: 10px;
        margin-bottom: 4px !important;
    }

    .opp-summary-card .font-13 {
        font-size: 12px;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .opp-summary-card {
        background: #1e293b;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    }

    .opp-summary-card:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    }

    .opp-summary-card h4 {
        color: #f1f5f9;
    }

    .opp-summary-card h6.text-muted {
        color: #64748b !important;
    }

    .opp-summary-card .font-13 {
        color: #cbd5e1;
    }

    .opp-summary-card .font-13 .font-weight-600 {
        color: #94a3b8;
    }
}

/* ============================================
   LOADING SKELETON (Optional Enhancement)
   ============================================ */
.opp-summary-card.loading .card-body > * {
    visibility: hidden;
}

.opp-summary-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 1.5s infinite;
    z-index: 2;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ============================================
   EQUAL HEIGHT CARDS
   ============================================ */
#summary-cards-container {
    display: flex;
    flex-wrap: wrap;
}

#summary-cards-container [class*="col-"] {
    display: flex;
}

#summary-cards-container .opp-summary-card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

#summary-cards-container .opp-summary-card .card-body {
    flex: 1;
    display: flex;
    align-items: center;
}
/* ============================================
   LEAD SUMMARY CARDS - Enhanced UI/UX
   ============================================ */

/* Container */
#summary-cards-container {
    margin-bottom: 30px;
    padding: 0 5px;
    display: flex;
    flex-wrap: wrap;
}

#summary-cards-container [class*="col-"] {
    padding: 0 10px;
    margin-bottom: 15px;
    display: flex;
}

/* ============================================
   CARD BASE
   ============================================ */
.lead-summary-card {
    border: none;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Top Accent Line */
.lead-summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
}

/* Per-card accent colors */
#summary-cards-container .col-lg-3:nth-child(1) .lead-summary-card::before {
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
}
#summary-cards-container .col-lg-3:nth-child(2) .lead-summary-card::before {
    background: linear-gradient(90deg, #f59e0b, #f97316);
}
#summary-cards-container .col-lg-3:nth-child(3) .lead-summary-card::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}
#summary-cards-container .col-lg-3:nth-child(4) .lead-summary-card::before {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
}

/* Decorative background circle */
.lead-summary-card::after {
    content: '';
    position: absolute;
    bottom: -25px;
    right: -25px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    opacity: 0.045;
    z-index: 0;
    transition: all 0.4s ease;
    pointer-events: none;
}

#summary-cards-container .col-lg-3:nth-child(1) .lead-summary-card::after {
    background: #3b82f6;
}
#summary-cards-container .col-lg-3:nth-child(2) .lead-summary-card::after {
    background: #f59e0b;
}
#summary-cards-container .col-lg-3:nth-child(3) .lead-summary-card::after {
    background: #10b981;
}
#summary-cards-container .col-lg-3:nth-child(4) .lead-summary-card::after {
    background: #8b5cf6;
}

/* ============================================
   HOVER STATE
   ============================================ */
.lead-summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
}

.lead-summary-card:hover::before {
    opacity: 1;
}

.lead-summary-card:hover::after {
    opacity: 0.09;
    transform: scale(1.25) rotate(15deg);
}

/* ============================================
   CARD BODY
   ============================================ */
.lead-summary-card .card-body {
    padding: 22px 20px;
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
}

.lead-summary-card .card-body > .d-flex {
    width: 100%;
    align-items: center;
}

/* ============================================
   ICON
   ============================================ */
.lead-card-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.lead-summary-card:hover .lead-card-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

/* Gradient Backgrounds */
.bg-info-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%) !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.bg-warning-gradient {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.bg-success-gradient {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.bg-purple-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%) !important;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

/* ============================================
   CONTENT AREA
   ============================================ */
.lead-summary-card .m-l-15 {
    margin-left: 15px !important;
    overflow: hidden;
    min-width: 0;
}

/* Label */
.lead-summary-card h6.text-muted {
    font-size: 11px !important;
    font-weight: 500 !important;
    color: #94a3b8 !important;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 5px !important;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Value */
.lead-summary-card h4 {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1e293b;
    margin-bottom: 0 !important;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Money Value */
.lead-summary-card h4.text-success {
    color: #10b981 !important;
    font-size: 19px !important;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 0.5px;
}

/* Zero value dim style */
.lead-summary-card h4.text-success[data-zero="true"],
.lead-summary-card h4.text-success:contains("0.00") {
    color: #94a3b8 !important;
}

/* ============================================
   TEAM CARD - Assigned Members
   ============================================ */
.lead-summary-card .font-13 {
    font-size: 13px;
    color: #475569;
    line-height: 1.8;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lead-summary-card .font-13 .font-weight-600 {
    font-size: 11px;
    font-weight: 600 !important;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

/* Empty value dash style */
.lead-summary-card .font-13 span:last-child,
.lead-summary-card .font-13:not(:has(.font-weight-600)) {
    color: #cbd5e1;
    font-style: italic;
}

/* Dash (—) empty state styling */
.lead-summary-card .font-13 {
    position: relative;
}

/* ============================================
   LOCATION CARD - Special Styling
   ============================================ */
#summary-cards-container .col-lg-3:nth-child(2) .lead-summary-card h4 {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   RTL SUPPORT
   ============================================ */
[dir="rtl"] .lead-summary-card .m-l-15 {
    margin-left: 0 !important;
    margin-right: 15px !important;
}

[dir="rtl"] .lead-summary-card::after {
    right: auto;
    left: -25px;
}

[dir="rtl"] .lead-summary-card h6.text-muted,
[dir="rtl"] .lead-summary-card h4 {
    text-align: right;
}

[dir="rtl"] .lead-summary-card .font-13 {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* ============================================
   EMPTY / UNASSIGNED STATE BADGE
   ============================================ */
.lead-unassigned {
    display: inline-block;
    background: #f1f5f9;
    color: #94a3b8;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 20px;
    font-style: italic;
    border: 1px dashed #cbd5e1;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1199px) {
    .lead-card-icon {
        width: 46px;
        height: 46px;
        min-width: 46px;
        font-size: 19px;
        border-radius: 12px;
    }

    .lead-summary-card h4 {
        font-size: 15px !important;
    }

    .lead-summary-card .card-body {
        padding: 18px 16px;
    }
}

@media (max-width: 991px) {
    #summary-cards-container [class*="col-"] {
        margin-bottom: 12px;
    }

    .lead-summary-card {
        border-radius: 14px;
    }

    .lead-summary-card h4 {
        font-size: 15px !important;
    }
}

@media (max-width: 767px) {
    #summary-cards-container {
        margin-bottom: 20px;
    }

    #summary-cards-container [class*="col-"] {
        padding: 0 8px;
        margin-bottom: 10px;
    }

    .lead-summary-card .card-body {
        padding: 16px 14px;
    }

    .lead-card-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 18px;
        border-radius: 11px;
    }

    /* Keep accent bar visible on mobile */
    .lead-summary-card::before {
        opacity: 1 !important;
    }

    /* Disable lift on touch */
    .lead-summary-card:hover {
        transform: none;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    }

    .lead-summary-card h4 {
        font-size: 14px !important;
    }
}

@media (max-width: 575px) {
    .lead-card-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 16px;
        border-radius: 10px;
    }

    .lead-summary-card .card-body {
        padding: 14px 12px;
    }

    .lead-summary-card h6.text-muted {
        font-size: 10px !important;
        letter-spacing: 0.4px;
    }

    .lead-summary-card h4 {
        font-size: 13px !important;
    }

    .lead-summary-card .font-13 {
        font-size: 12px;
    }

    .lead-summary-card .font-13 .font-weight-600 {
        font-size: 10px;
    }

    .lead-summary-card .m-l-15 {
        margin-left: 10px !important;
    }
}

/* ============================================
   DARK MODE
   ============================================ */
@media (prefers-color-scheme: dark) {
    .lead-summary-card {
        background: #1e293b;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.25);
    }

    .lead-summary-card:hover {
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    }

    .lead-summary-card h4 {
        color: #f1f5f9 !important;
    }

    .lead-summary-card h4.text-success {
        color: #34d399 !important;
    }

    .lead-summary-card h6.text-muted {
        color: #475569 !important;
    }

    .lead-summary-card .font-13 {
        color: #94a3b8;
    }

    .lead-summary-card .font-13 .font-weight-600 {
        color: #64748b;
    }

    .lead-unassigned {
        background: #0f172a;
        color: #475569;
        border-color: #334155;
    }
}

/* ============================================
   PULSE ANIMATION - New Lead Indicator
   ============================================ */
.lead-summary-card.is-new .lead-card-icon::after {
    content: '';
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse-dot 1.8s infinite;
}

@keyframes pulse-dot {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
    70%  { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ============================================
   SKELETON LOADING STATE
   ============================================ */
.lead-summary-card.skeleton .card-body > * {
    visibility: hidden;
}

.lead-summary-card.skeleton {
    background: linear-gradient(
        90deg,
        #f0f4f8 25%,
        #e2e8f0 50%,
        #f0f4f8 75%
    );
    background-size: 200% 100%;
    animation: skeleton-sweep 1.6s ease-in-out infinite;
}

@keyframes skeleton-sweep {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
/* ============================================
   MODAL WRAPPER & BACKDROP
   ============================================ */
.modal-backdrop.show {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background-color: rgba(15, 23, 42, 0.55);
}

.modal.fade .modal-dialog {
    transform: translateY(-20px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.3s ease;
}

.modal.show .modal-dialog {
    transform: translateY(0) scale(1);
}

.modal-dialog {
    max-width: 620px;
    margin: 30px auto;
}

/* ============================================
   MODAL CONTENT
   ============================================ */
.modal-content {
    border: none !important;
    border-radius: 20px !important;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18),
                0 8px 25px rgba(0, 0, 0, 0.1) !important;
    background: #ffffff;
}

/* ============================================
   MODAL HEADER
   ============================================ */
.modal-content .modal-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #06b6d4 100%);
    border-bottom: none !important;
    padding: 22px 28px;
    position: relative;
    overflow: hidden;
}

/* Decorative circles in header */
.modal-content .modal-header::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.modal-content .modal-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

/* Modal Title */
.modal-content .modal-header .modal-title {
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-content .modal-header .modal-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 22px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    flex-shrink: 0;
}

/* Close Button */
.modal-content .modal-header .close {
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 1 !important;
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.25s ease;
    cursor: pointer;
    text-shadow: none !important;
}

.modal-content .modal-header .close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
    transform: rotate(90deg);
}

/* ============================================
   MODAL BODY
   ============================================ */
.modal-content .modal-body {
    padding: 28px 30px !important;
    background: #f8fafc;
    max-height: 65vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Custom scrollbar */
.modal-content .modal-body::-webkit-scrollbar {
    width: 5px;
}

.modal-content .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-content .modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.modal-content .modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================
   SECTION DIVIDERS (Groups)
   ============================================ */

/* Group fields visually */
.modal-content .modal-body .form-group {
    margin-bottom: 0;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8edf5;
    margin-bottom: 10px;
    transition: all 0.25s ease;
    position: relative;
}

.modal-content .modal-body .form-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.08);
    background: #ffffff;
}

/* ============================================
   LABELS
   ============================================ */
.modal-content .modal-body .col-form-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 0 !important;
    padding-bottom: 6px !important;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Required asterisk */
.modal-content .modal-body .col-form-label.required::after {
    content: '*';
    color: #ef4444;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
}

/* ============================================
   INPUT FIELDS
   ============================================ */
.modal-content .modal-body .form-control {
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 9px !important;
    padding: 9px 13px !important;
    font-size: 14px !important;
    color: #1e293b !important;
    background: #f8fafc !important;
    transition: all 0.25s ease !important;
    height: auto !important;
    box-shadow: none !important;
    width: 100%;
}

.modal-content .modal-body .form-control:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    color: #0f172a !important;
    outline: none !important;
}

.modal-content .modal-body .form-control::placeholder {
    color: #b0bec5 !important;
    font-size: 13px;
}

/* Input hover */
.modal-content .modal-body .form-control:hover:not(:focus) {
    border-color: #94a3b8 !important;
    background: #ffffff !important;
}

/* ============================================
   SELECT FIELDS
   ============================================ */


/* ============================================
   SPECIAL FIELD STYLING - Input Icons
   ============================================ */

/* Phone field */
#leadForm #phone_number,
#leadForm #mobile_number {
    padding-right: 13px !important;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Email field */
#leadForm #email {
    direction: ltr;
    text-align: left;
}

/* ============================================
   QUALIFICATION LEVEL - Styled Select
   ============================================ */
#leadForm #qualification_level option[value="Hot"]  { color: #ef4444; font-weight: 600; }
#leadForm #qualification_level option[value="Warm"] { color: #f59e0b; font-weight: 600; }
#leadForm #qualification_level option[value="Cold"] { color: #3b82f6; font-weight: 600; }

/* ============================================
   VALIDATION STATES
   ============================================ */
.modal-content .modal-body .form-control.is-valid {
    border-color: #10b981 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%2310b981' d='M7 0C3.13 0 0 3.13 0 7s3.13 7 7 7 7-3.13 7-7-3.13-7-7-7zm-1 10.5L2.5 7l1.41-1.41L6 7.67l4.09-4.08L11.5 5 6 10.5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    padding-right: 38px !important;
}

.modal-content .modal-body .form-control.is-invalid {
    border-color: #ef4444 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='7' fill='%23ef4444'/%3E%3Cpath fill='white' d='M7 3.5a.75.75 0 01.75.75v3a.75.75 0 01-1.5 0v-3A.75.75 0 017 3.5zm0 6.5a.75.75 0 100-1.5.75.75 0 000 1.5z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
}

.modal-content .modal-body .invalid-feedback {
    font-size: 11px;
    color: #ef4444;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   MODAL FOOTER
   ============================================ */
.modal-content .modal-footer {
    background: #ffffff;
    border-top: 1px solid #f1f5f9 !important;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border-radius: 0 0 20px 20px;
}

/* ============================================
   BUTTONS
   ============================================ */

/* Cancel Button */
.modal-content .modal-footer .btn-secondary {
    background: #f1f5f9 !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #64748b !important;
    border-radius: 10px !important;
    padding: 9px 22px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.3px;
    transition: all 0.25s ease !important;
    box-shadow: none !important;
}

.modal-content .modal-footer .btn-secondary:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
    transform: translateY(-1px);
}

.modal-content .modal-footer .btn-secondary:active {
    transform: translateY(0);
}

/* Save Button */
.modal-content .modal-footer .btn-danger {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
    border: none !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 9px 26px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35) !important;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect on save button */
.modal-content .modal-footer .btn-danger::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.modal-content .modal-footer .btn-danger:hover::before {
    left: 150%;
}

.modal-content .modal-footer .btn-danger:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45) !important;
    transform: translateY(-2px);
}

.modal-content .modal-footer .btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3) !important;
}

/* Loading state */
.modal-content .modal-footer .btn-danger.loading {
    pointer-events: none;
    opacity: 0.85;
}

.modal-content .modal-footer .btn-danger.loading::after {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   FIELD GROUP VISUAL SECTIONS
   ============================================ */

/* Section labels between groups */
.modal-section-title {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 4px 8px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ============================================
   RTL SUPPORT
   ============================================ */
[dir="rtl"] .modal-content .modal-body select.form-control {
    background-position: right 13px center !important;
    padding-right: 35px !important;
    padding-left: 13px !important;
}

[dir="rtl"] .modal-content .modal-header .modal-title::before {
    order: -1;
}

[dir="rtl"] .modal-content .modal-footer {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

[dir="rtl"] .modal-content .modal-body .col-form-label {
    text-align: right;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .modal-dialog {
        margin: 12px;
        max-width: calc(100% - 24px);
    }

    .modal-content {
        border-radius: 16px !important;
    }

    .modal-content .modal-header {
        padding: 18px 20px;
    }

    .modal-content .modal-header .modal-title {
        font-size: 16px;
    }

    .modal-content .modal-body {
        padding: 18px 16px !important;
        max-height: 70vh;
    }

    .modal-content .modal-body .form-group {
        padding: 12px 14px;
        margin-bottom: 8px;
    }

    .modal-content .modal-footer {
        padding: 14px 18px;
        flex-direction: column-reverse;
        gap: 8px;
    }

    .modal-content .modal-footer .btn {
        width: 100% !important;
        justify-content: center;
        text-align: center !important;
    }
}

@media (max-width: 400px) {
    .modal-content .modal-header .modal-title {
        font-size: 14px;
    }

    .modal-content .modal-body .col-form-label {
        font-size: 11px !important;
    }

    .modal-content .modal-body .form-control {
        font-size: 13px !important;
    }
}

/* ============================================
   DARK MODE
   ============================================ */
@media (prefers-color-scheme: dark) {
    .modal-content {
        background: #1e293b;
    }

    .modal-content .modal-body {
        background: #0f172a;
    }

    .modal-content .modal-body .form-group {
        background: #1e293b;
        border-color: #334155;
    }

    .modal-content .modal-body .form-group:focus-within {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    }

    .modal-content .modal-body .form-control {
        background: #0f172a !important;
        border-color: #334155 !important;
        color: #e2e8f0 !important;
    }

    .modal-content .modal-body .form-control:focus {
        background: #1e293b !important;
        border-color: #3b82f6 !important;
        color: #f1f5f9 !important;
    }

    .modal-content .modal-body .col-form-label {
        color: #94a3b8 !important;
    }

    .modal-content .modal-footer {
        background: #1e293b;
        border-top-color: #334155 !important;
    }

    .modal-content .modal-footer .btn-secondary {
        background: #334155 !important;
        border-color: #475569 !important;
        color: #94a3b8 !important;
    }
}

/* ============================================
   ANIMATION - Field Entry
   ============================================ */
.modal.show .modal-body .form-group {
    animation: slideInField 0.3s ease both;
}

.modal.show .modal-body .form-group:nth-child(1)  { animation-delay: 0.04s; }
.modal.show .modal-body .form-group:nth-child(2)  { animation-delay: 0.07s; }
.modal.show .modal-body .form-group:nth-child(3)  { animation-delay: 0.10s; }
.modal.show .modal-body .form-group:nth-child(4)  { animation-delay: 0.13s; }
.modal.show .modal-body .form-group:nth-child(5)  { animation-delay: 0.16s; }
.modal.show .modal-body .form-group:nth-child(6)  { animation-delay: 0.19s; }
.modal.show .modal-body .form-group:nth-child(7)  { animation-delay: 0.22s; }
.modal.show .modal-body .form-group:nth-child(8)  { animation-delay: 0.25s; }
.modal.show .modal-body .form-group:nth-child(n+9) { animation-delay: 0.28s; }

@keyframes slideInField {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   Chat Message UI Upgrade
   ========================= */

.chat-content {
    position: relative;
    display: inline-block;
    max-width: 420px;
    padding: 8px 0 14px;
    direction: rtl;          /* good for Arabic */
    text-align: right;
    font-family: inherit;
}

/* Sender name */
.chat-content h6 {
    display: inline-block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #0ea5e9 !important;
    background: rgba(14, 165, 233, 0.08);
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

/* Message bubble */
.chat-content .box {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding: 14px 16px !important;
    border-radius: 18px !important;
    background: linear-gradient(135deg, #ecfeff, #e0f2fe) !important;
    color: #1e293b !important;
    border: 1px solid #bae6fd;
    box-shadow: 0 10px 25px rgba(2, 132, 199, 0.10);
    font-size: 14px;
    line-height: 1.7;
    word-break: break-word;
    transition: all 0.25s ease;
}

/* Bubble hover effect */
.chat-content .box:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(2, 132, 199, 0.16);
}

/* Bubble tail */
.chat-content .box::after {
    content: "";
    position: absolute;
    top: 14px;
    right: -8px;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #ecfeff, #e0f2fe);
    border-right: 1px solid #bae6fd;
    border-top: 1px solid #bae6fd;
    transform: rotate(45deg);
    border-top-right-radius: 4px;
}

/* Timestamp */
.chat-content .chat-time {
    display: block;
    margin-top: 8px !important;
    font-size: 12px;
    color: #94a3b8 !important;
    padding: 0 4px;
    letter-spacing: 0.3px;
}

/* Optional: smoother spacing if many messages */
.chat-content + .chat-content {
    margin-top: 12px;
}

/* Mobile */
@media (max-width: 576px) {
    .chat-content {
        max-width: 100%;
    }

    .chat-content .box {
        font-size: 13px;
        padding: 12px 14px !important;
    }
}


/* =============================================
   Premium Approval Timeline UI/UX
   ============================================= */

:root {
    --apv-success: #10b981;
    --apv-success-bg: #ecfdf5;
    --apv-success-border: #a7f3d0;
    --apv-info: #3b82f6;
    --apv-info-bg: #eff6ff;
    --apv-info-border: #bfdbfe;
    --apv-danger: #ef4444;
    --apv-danger-bg: #fef2f2;
    --apv-danger-border: #fecaca;
    --apv-warning: #f59e0b;
    --apv-warning-bg: #fffbeb;
    --apv-warning-border: #fde68a;
    --apv-text: #1e293b;
    --apv-muted: #94a3b8;
    --apv-bg: #f8fafc;
    --apv-white: #ffffff;
    --apv-line: #cbd5e1;
    --apv-radius: 16px;
    --apv-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    --apv-shadow-hover: 0 8px 30px rgba(15, 23, 42, 0.10);
}

/* ---- Timeline wrapper ---- */
.approval-timeline {
    position: relative;
    padding: 20px 0 10px;
    direction: rtl;
}

/* Vertical connector line */
.approval-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    right: 28px;      /* RTL side */
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        var(--apv-success) 0%,
        var(--apv-info) 50%,
        var(--apv-line) 100%
    );
    border-radius: 999px;
    z-index: 0;
}

/* ---- Each card ---- */
.approval-timeline .approval-card {
    position: relative;
    margin-right: 56px !important;   /* space for dot + line */
    margin-bottom: 24px !important;
    border: 1px solid var(--apv-line) !important;
    border-radius: var(--apv-radius) !important;
    border-left: 0 !important;
    background: var(--apv-white);
    box-shadow: var(--apv-shadow) !important;
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.approval-timeline .approval-card:hover {
    transform: translateX(6px);
    box-shadow: var(--apv-shadow-hover) !important;
}

/* ---- Timeline dot ---- */
.approval-timeline .approval-card::before {
    content: "";
    position: absolute;
    top: 50%;
    right: -40px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--apv-white);
    z-index: 2;
    box-shadow: 0 0 0 3px currentColor, 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

/* Pulse ring on hover */
.approval-timeline .approval-card::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -46px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0;
    z-index: 1;
    transition: all 0.35s ease;
}

.approval-timeline .approval-card:hover::after {
    opacity: 0.25;
    animation: apv-pulse 1.2s ease infinite;
}

@keyframes apv-pulse {
    0%   { transform: translateY(-50%) scale(1);   opacity: 0.25; }
    70%  { transform: translateY(-50%) scale(1.6); opacity: 0; }
    100% { transform: translateY(-50%) scale(1.6); opacity: 0; }
}

/* ---- Status-specific colors via border-left-* ---- */

/* Success (Approved) */
.approval-card.border-left-success {
    border-right: 4px solid var(--apv-success) !important;
    color: var(--apv-success);
}

.approval-card.border-left-success::before {
    background: var(--apv-success);
}

.approval-card.border-left-success .card-body {
    background: linear-gradient(135deg, var(--apv-success-bg) 0%, var(--apv-white) 60%);
    border-radius: var(--apv-radius);
}

/* Info (Pending / In Progress) */
.approval-card.border-left-info {
    border-right: 4px solid var(--apv-info) !important;
    color: var(--apv-info);
}

.approval-card.border-left-info::before {
    background: var(--apv-info);
    animation: apv-dot-glow 2s ease-in-out infinite;
}

@keyframes apv-dot-glow {
    0%, 100% { box-shadow: 0 0 0 3px var(--apv-info), 0 0 12px rgba(59,130,246,0.35); }
    50%      { box-shadow: 0 0 0 3px var(--apv-info), 0 0 20px rgba(59,130,246,0.55); }
}

.approval-card.border-left-info .card-body {
    background: linear-gradient(135deg, var(--apv-info-bg) 0%, var(--apv-white) 60%);
    border-radius: var(--apv-radius);
}

/* Danger (Rejected) */
.approval-card.border-left-danger {
    border-right: 4px solid var(--apv-danger) !important;
    color: var(--apv-danger);
}

.approval-card.border-left-danger::before {
    background: var(--apv-danger);
}

.approval-card.border-left-danger .card-body {
    background: linear-gradient(135deg, var(--apv-danger-bg) 0%, var(--apv-white) 60%);
    border-radius: var(--apv-radius);
}

/* Warning */
.approval-card.border-left-warning {
    border-right: 4px solid var(--apv-warning) !important;
    color: var(--apv-warning);
}

.approval-card.border-left-warning::before {
    background: var(--apv-warning);
}

.approval-card.border-left-warning .card-body {
    background: linear-gradient(135deg, var(--apv-warning-bg) 0%, var(--apv-white) 60%);
    border-radius: var(--apv-radius);
}

/* ---- Card body spacing ---- */
.approval-timeline .card-body {
    padding: 18px 22px !important;
}

/* ---- Title ---- */
.approval-timeline h6 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--apv-text);
    line-height: 1.4;
}

/* Small icon before title (optional enhancement) */
.approval-card.border-left-success h6::before {
    content: "✓ ";
    color: var(--apv-success);
    font-weight: 900;
}

.approval-card.border-left-info h6::before {
    content: "⏳ ";
}

.approval-card.border-left-danger h6::before {
    content: "✕ ";
    color: var(--apv-danger);
    font-weight: 900;
}

/* ---- Description / subtext ---- */
.approval-timeline .text-muted {
    font-size: 13px;
    color: var(--apv-muted) !important;
    line-height: 1.5;
}

/* ---- Status label ---- */
.approval-timeline .label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
}

.approval-timeline .label-light-success {
    background: var(--apv-success-bg) !important;
    color: var(--apv-success) !important;
    border: 1px solid var(--apv-success-border);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

/* Add checkmark before approved label */
.approval-timeline .label-light-success::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--apv-success);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

/* ---- Action buttons ---- */
.approval-timeline .btn {
    border-radius: 12px !important;
    padding: 8px 20px !important;
    font-weight: 700;
    font-size: 13px;
    border: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Approve button */
.approval-timeline .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.30);
}

.approval-timeline .btn-success:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 22px rgba(16, 185, 129, 0.40);
}

.approval-timeline .btn-success:active {
    transform: translateY(0) scale(0.98);
}

/* Add icon before approve */
.approval-timeline .btn-success::before {
    content: "✓ ";
    font-weight: 900;
}

/* Reject button */
.approval-timeline .btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.30);
}

.approval-timeline .btn-danger:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 22px rgba(239, 68, 68, 0.40);
}

.approval-timeline .btn-danger:active {
    transform: translateY(0) scale(0.98);
}

/* Add icon before reject */
.approval-timeline .btn-danger::before {
    content: "✕ ";
    font-weight: 900;
}

/* Button ripple effect */
.approval-timeline .btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.15);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.approval-timeline .btn:hover::after {
    opacity: 1;
}

/* Button group spacing */
.approval-timeline .btn + .btn {
    margin-right: 8px;
}

/* ---- Connector between cards (horizontal bar) ---- */
.approval-timeline .approval-card .card-body .row {
    position: relative;
}

/* ---- Last card: hide extra line ---- */
.approval-timeline .approval-card:last-child {
    margin-bottom: 0 !important;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 576px) {

    .approval-timeline::before {
        right: 18px;
    }

    .approval-timeline .approval-card {
        margin-right: 42px !important;
    }

    .approval-timeline .approval-card::before {
        right: -30px;
        width: 14px;
        height: 14px;
    }

    .approval-timeline .approval-card::after {
        right: -35px;
        width: 24px;
        height: 24px;
    }

    .approval-timeline .card-body {
        padding: 14px 16px !important;
    }

    .approval-timeline h6 {
        font-size: 14px;
    }

    .approval-timeline .btn {
        padding: 7px 14px !important;
        font-size: 12px;
    }

    /* Stack buttons on very small screens */
    .approval-timeline .col-auto {
        margin-top: 12px;
        text-align: right !important;
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
}


/* =========================================
   Modern Opportunity Tabs (Underline Style)
   ========================================= */

:root {
    --opportunity-primary: #4f46e5;
    --opportunity-primary-light: #eef2ff;
    --opportunity-text: #334155;
    --opportunity-text-muted: #94a3b8;
    --opportunity-border: #e2e8f0;
    --opportunity-bg-hover: #f8fafc;
}

/* 1. Main Container: Flex layout with bottom border */
#opportunityTabs.nav-tabs {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    border-bottom: 2px solid var(--opportunity-border);
    background: transparent;
    padding: 0;
    gap: 0.5rem; /* Slight gap between items */
}

/* 2. Reset default list item styles */
#opportunityTabs .nav-item {
    margin-bottom: 0;
}

/* 3. The Tab Link */
#opportunityTabs .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border: none !important;
    background: transparent;
    color: var(--opportunity-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 8px 8px 0 0;
    margin-bottom: -2px; /* Pull down to overlap container border */
}

/* Icon Styling */
#opportunityTabs .nav-link i {
    font-size: 1rem;
    margin-right: 8px; /* RTL spacing */
    opacity: 0.8;
    transition: transform 0.2s ease;
}

/* 4. Hover State: Subtle background lift */
#opportunityTabs .nav-link:hover {
    color: var(--opportunity-text);
    background: var(--opportunity-bg-hover);
}

#opportunityTabs .nav-link:hover i {
    transform: scale(1.1);
    opacity: 1;
}

/* 5. Active State: Text color + Underline Animation */
#opportunityTabs .nav-link.active {
    color: var(--opportunity-primary);
    background: transparent;
}

/* The Animated Underline */
#opportunityTabs .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--opportunity-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px 2px 0 0;
}

#opportunityTabs .nav-link.active::after {
    transform: scaleX(1);
}

/* Focus Accessibility */
#opportunityTabs .nav-link:focus {
    outline: none;
}

#opportunityTabs .nav-link:focus-visible {
    box-shadow: 0 0 0 3px var(--opportunity-primary-light);
    border-radius: 6px;
}

/* 6. Modern Badge Styling */
#opportunityTabs .badge {
    margin-left: 8px; /* Spacing between text and badge */
    padding: 0.3em 0.7em;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.2s ease;
}

/* Semantic Badge Colors (Softer, Modern Palettes) */
#opportunityTabs .badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

#opportunityTabs .badge-warning {
    background: #fef3c7;
    color: #b45309;
}

#opportunityTabs .badge-success {
    background: #dcfce7;
    color: #15803d;
}

#opportunityTabs .badge-primary {
    background: #e0e7ff;
    color: #4338ca;
}

#opportunityTabs .badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Badge inside Active Tab */
#opportunityTabs .nav-link.active .badge {
    background: var(--opportunity-primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

/* 7. Mobile Responsive */
@media (max-width: 768px) {
    #opportunityTabs.nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
        border-bottom: 1px solid var(--opportunity-border);
    }
    
    /* Hide scrollbar but allow scroll */
    #opportunityTabs::-webkit-scrollbar {
        height: 0;
    }

    #opportunityTabs .nav-link {
        padding: 0.8rem 1rem;
    }

   
}

/* Optional: Animation for the content below */
.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   1. Panel Container & Global Setup (No Custom Fonts)
   ========================================================================== */
#sidepanel-notifications-body {
    direction: rtl;
    text-align: right;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    padding: 15px;
}

/* ==========================================================================
   2. Dismiss All Link
   ========================================================================== */
#sidepanel-notifications-mark-all-read {
    display: flex;
    justify-content: flex-end; /* Pushes to the left side in RTL */
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}

#sidepanel-notifications-mark-all-read a {
    color: #8d97ad;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

#sidepanel-notifications-mark-all-read a:hover {
    color: #1e88e5;
}

/* ==========================================================================
   3. Notification Cards (The Events)
   ========================================================================== */
.topevent {
    display: flex;
    align-items: flex-start;
    gap: 16px; /* Perfect spacing between avatar and content */
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #fcfdfe;
    border: 1px solid #f0f2f5;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.topevent:hover {
    background: #ffffff;
    border-color: #e3f2fd;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px); /* Slight lift effect */
}

/* ==========================================================================
   4. Avatars
   ========================================================================== */
.topevent .avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

/* ==========================================================================
   5. Content & Typography
   ========================================================================== */
.x-content {
    flex-grow: 1;
    min-width: 0; /* Prevents text overflow issues in flexbox */
}

.x-name {
    font-weight: 600;
    color: #2f323e;
    font-size: 14px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between; /* Puts name on right, time/checkbox on left */
    align-items: center;
}

.x-time {
    font-size: 11px;
    color: #a1aab2;
    font-weight: 500;
    background: #f4f8fa;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Main action text */
.x-title {
    font-size: 13px;
    color: #54667a;
    margin-bottom: 6px;
}

/* Reference Links (Opportunities, Leads, etc.) */
.x-ref-title a {
    font-size: 13px;
    font-weight: 600;
    color: #1e88e5;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 8px;
    background: #e3f2fd;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.x-ref-title a:hover {
    background: #1e88e5;
    color: #ffffff;
}

/* Sub-description styling */
.x-description {
    font-size: 12px;
    color: #455a64;
    background: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px 0 0 6px;
    border-right: 3px solid #ffb22b; /* RTL accent line */
    margin-top: 5px;
    line-height: 1.5;
}

.x-description strong {
    color: #2f323e;
    margin-left: 5px; /* RTL spacing after colon */
}

/* ==========================================================================
   6. Custom "Mark as Read" Radio Checkboxes
   ========================================================================== */
.js-notification-mark-read-single {
    display: flex;
    align-items: center;
    margin-right: 10px; /* Space between the button and the timestamp */
}

/* Hide default radio input */
.radio-col-info {
    display: none;
}

/* Create custom circular checkmark */
.radio-col-info + label {
    cursor: pointer;
    width: 20px;
    height: 20px;
    border: 2px solid #d7dfe3;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
    margin: 0;
}

.radio-col-info + label:hover {
    border-color: #1e88e5;
}

/* Checked state styling */
.radio-col-info:checked + label {
    background-color: #1e88e5;
    border-color: #1e88e5;
}

/* Checkmark icon inside the circle */
.radio-col-info:checked + label::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ==========================================================================
   7. Load More Button
   ========================================================================== */
#events-panel-loadmore-button-container {
    text-align: center;
    margin-top: 15px;
    padding-top: 20px;
    border-top: 1px dashed #e9ecef;
}

#events-panel-load-more-button {
    background-color: #ffffff;
    color: #54667a;
    border: 1px solid #d7dfe3;
    border-radius: 30px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

#events-panel-load-more-button:hover {
    background-color: #f4f8fa;
    color: #1e88e5;
    border-color: #1e88e5;
    box-shadow: 0 4px 10px rgba(30, 136, 229, 0.1);
}
/* ==========================================================================
   Scroll & Viewport Constraints
   ========================================================================== */

#sidepanel-notifications-body {
    /* Sets the height to the full screen minus space for a header if exists */
    /* Adjust '100px' if you have a top header in your side panel */
    height: calc(100vh - 80px); 
    
    /* Enables vertical scrolling */
    overflow-y: auto;
    
    /* Smooth scrolling for mobile/touch devices */
    -webkit-overflow-scrolling: touch;
    
    /* Padding at the bottom to ensure the "Load More" button isn't cut off */
    padding-bottom: 60px;
    
    /* Prevents horizontal scroll if text is long */
   overflow-x: hidden !important;
}

/* ==========================================================================
   Custom Scrollbar Styling (Optional - for a modern look)
   ========================================================================== */

/* The width of the scrollbar */
#sidepanel-notifications-body::-webkit-scrollbar {
    width: 6px;
}

/* The background track */
#sidepanel-notifications-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

/* The actual draggable handle */
#sidepanel-notifications-body::-webkit-scrollbar-thumb {
    background: #d1d8dd;
    border-radius: 10px;
    transition: background 0.3s;
}

/* Handle on hover */
#sidepanel-notifications-body::-webkit-scrollbar-thumb:hover {
    background: #1e88e5; /* Turns blue when you hover over the scrollbar */
}

/* ==========================================================================
   Ensuring the Load More container is visible
   ========================================================================== */
#events-panel-loadmore-button-container {
    display: block !important; /* Forces visibility if hidden by logic */
    padding: 20px 0;
    margin-bottom: 40px; /* Extra space so it's not glued to the bottom */
}

.topevent .x-content .x-time {
    font-size: 11px;
    font-weight: normal;
    color: red;
    opacity: 1;
}

/* ============================================
   LEADS LIST PAGE - ENHANCED UI/UX (CSS ONLY)
   FIXED VERSION - No layout breaking
   ============================================ */

/* --- Page Container --- */
.container-fluid {
    padding: 24px 28px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 50%, #f5f7fa 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============================================
   PAGE TITLES / HEADER BAR
   ============================================ */

.row.page-titles {
    background: linear-gradient(135deg, #1a237e 0%, #1565c0 45%, #1e88e5 100%);
    border-radius: 18px;
    padding: 22px 30px !important;
    margin-bottom: 28px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    position: relative;
    overflow: visible  !important;
    box-shadow: 0 10px 40px rgba(21, 101, 192, 0.3);
    align-items: center !important;
}

.row.page-titles::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.row.page-titles::after {
    content: '';
    position: absolute;
    bottom: -70%;
    left: -8%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* --- Page Title Text --- */
.row.page-titles h3.text-themecolor {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    letter-spacing: 0.3px;
}

/* --- Breadcrumbs --- */
.row.page-titles .breadcrumb {
    background: rgba(255,255,255,0.12) !important;
    border-radius: 30px;
    padding: 6px 16px !important;
    margin-bottom: 0 !important;
    position: relative;
    z-index: 1;
    display: inline-flex;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.18);
}

.row.page-titles .breadcrumb-item {
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.8rem;
    font-weight: 500;
}

.row.page-titles .breadcrumb-item.active,
.row.page-titles .breadcrumb-item.active-bread-crumb {
    color: white !important;
    font-weight: 700;
}

.row.page-titles .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.45) !important;
}

/* ============================================
   ACTIONS BAR
   ============================================ */

#list-page-actions-container {
    position: relative;
    z-index: 2;
}

#list-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* --- Search Box --- */
.header-search {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25) !important;
    border-radius: 12px !important;
    padding: 0 14px;
    transition: all 0.35s ease;
    min-width: 220px;
}

.header-search:hover,
.header-search:focus-within {
    background: rgba(255,255,255,0.25) !important;
    border-color: rgba(255,255,255,0.45) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.header-search i.sl-icon-magnifier {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.95rem;
    margin-left: 8px;
    flex-shrink: 0;
}

.header-search .form-control.search-records {
    background: transparent !important;
    border: none !important;
    color: white !important;
    font-size: 0.88rem;
    padding: 10px 4px;
    box-shadow: none !important;
    outline: none !important;
    width: 100%;
}

.header-search .form-control.search-records::placeholder {
    color: rgba(255,255,255,0.6) !important;
    font-size: 0.85rem;
}

.header-search .form-control.search-records:focus {
    box-shadow: none !important;
}

/* --- Filter Button --- */
.btn-page-actions {
    background: rgba(255,255,255,0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25) !important;
    border-radius: 12px !important;
    color: white !important;
    width: 42px;
    height: 42px;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.btn-page-actions:hover {
    background: rgba(255,255,255,0.28) !important;
    border-color: rgba(255,255,255,0.45) !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    color: white !important;
}

.btn-page-actions i {
    color: white !important;
}

/* --- Add Lead Button --- */
.row.page-titles .btn.btn-success {
    background: linear-gradient(135deg, #2e7d32, #43a047, #66bb6a) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    font-size: 0.88rem;
    font-weight: 700;
    color: white !important;
    transition: all 0.35s ease;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.35);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.row.page-titles .btn.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.45) !important;
    background: linear-gradient(135deg, #1b5e20, #2e7d32, #43a047) !important;
}

.row.page-titles .btn.btn-success:active {
    transform: translateY(-1px);
}

.row.page-titles .btn.btn-success i {
    font-size: 0.8rem;
    margin-left: 4px;
}

/* ============================================
   TABLE CARD
   ============================================ */

#items-table-wrapper {
    border: none !important;
    border-radius: 18px !important;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07) !important;
    background: white;
    animation: fadeSlideUp 0.5s ease 0.1s both;
}

#items-table-wrapper .card-body {
    padding: 0 !important;
}

/* ============================================
   TABLE STYLES - FIXED (No pseudo-elements on tr/th/td)
   ============================================ */

.table-responsive.list-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
}

/* Custom scrollbar for table */
.table-responsive.list-table-wrapper::-webkit-scrollbar {
    height: 5px;
}

.table-responsive.list-table-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.table-responsive.list-table-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(to right, #c5cae9, #9fa8da);
    border-radius: 10px;
}

#items-list-table {
    margin: 0 !important;
    width: 100%;
    /* IMPORTANT: Keep normal border-collapse to avoid layout issues */
    border-collapse: collapse !important;
    border-spacing: 0 !important;
}

/* ============================================
   TABLE HEADER - Fixed (no ::after on th)
   ============================================ */

#items-list-table thead tr {
    background: linear-gradient(135deg, #1a237e 0%, #1565c0 60%, #1e88e5 100%) !important;
}

#items-list-table thead th {
    background: transparent !important;
    color: white !important;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 16px 16px !important;
    border: none !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: right;
    /* NO ::after pseudo elements - they break table columns */
}

/* ============================================
   TABLE BODY ROWS - Fixed (no ::before on tr)
   ============================================ */

#items-list-table tbody tr {
    transition: background 0.25s ease, box-shadow 0.25s ease;
    border-bottom: 1px solid #f0f4f8 !important;
    background: white;
    /* NO position:relative, NO ::before pseudo on tr - breaks table layout */
}

/* Subtle zebra striping */
#items-list-table tbody tr:nth-child(even) {
    background: #fafbfd;
}

#items-list-table tbody tr:hover {
    background: #eef3fb !important;
    box-shadow: inset 4px 0 0 #1e88e5;
}

#items-list-table tbody tr:last-child {
    border-bottom: none !important;
}

/* Staggered row animations */
#items-list-table tbody tr {
    animation: fadeSlideUp 0.4s ease forwards;
    opacity: 0;
}

#items-list-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
#items-list-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
#items-list-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
#items-list-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
#items-list-table tbody tr:nth-child(5) { animation-delay: 0.25s; }
#items-list-table tbody tr:nth-child(6) { animation-delay: 0.3s; }

/* ============================================
   TABLE CELLS - Fixed
   ============================================ */

#items-list-table tbody td {
    padding: 14px 16px !important;
    border: none !important;
    border-bottom: 1px solid #f0f4f8 !important;
    font-size: 0.875rem;
    color: #4a5568;
    vertical-align: middle !important;
    text-align: right;
    /* NO pseudo elements on td */
}

/* First column - ID */
#items-list-table tbody td:first-child {
    font-weight: 700;
    color: #94a3b8;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding-right: 20px !important;
}

/* Actions column - centered */
#items-list-table tbody td.items_col_action {
    text-align: center !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* Last row - no border */
#items-list-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ============================================
   LINKS IN TABLE
   ============================================ */

#items-list-table tbody td a.font-weight-500 {
    color: #1565c0 !important;
    font-weight: 600 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

#items-list-table tbody td a.font-weight-500:hover {
    color: #0d47a1 !important;
    text-decoration: underline;
}

/* ============================================
   STATUS LABELS / BADGES - Fixed
   ============================================ */

/* Base label - use span.label */
#items-list-table .label {
    display: inline-block;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: all 0.25s ease;
    line-height: 1.5;
    /* NO ::before pseudo elements - can shift table layout */
}

/* Success - Converted */
#items-list-table .label-light-success {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9) !important;
    color: #1b5e20 !important;
    border: 1px solid rgba(76, 175, 80, 0.25);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

/* Danger - Rejected */
#items-list-table .label-light-danger {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0) !important;
    color: #880e4f !important;
    border: 1px solid rgba(233, 30, 99, 0.25);
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.1);
}

/* Info - Owner */
#items-list-table .label-light-info {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
    color: #0d47a1 !important;
    border: 1px solid rgba(30, 136, 229, 0.25);
    box-shadow: 0 2px 8px rgba(30, 136, 229, 0.1);
}

/* Hover effects on labels */
#items-list-table tbody tr:hover .label-light-success {
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7) !important;
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.2);
}

#items-list-table tbody tr:hover .label-light-danger {
    background: linear-gradient(135deg, #f8bbd0, #f48fb1) !important;
    box-shadow: 0 3px 12px rgba(233, 30, 99, 0.18);
}

#items-list-table tbody tr:hover .label-light-info {
    background: linear-gradient(135deg, #bbdefb, #90caf9) !important;
    box-shadow: 0 3px 12px rgba(30, 136, 229, 0.18);
}

/* ============================================
   ACTION BUTTONS - Fixed & Visible
   ============================================ */

.items_col_action {
    white-space: nowrap;
    min-width: 90px;
}

.list-table-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

/* Base circle button - properly visible */
.list-table-action .btn-circle {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 8px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.85rem !important;
    transition: all 0.25s ease;
    border-width: 1.5px !important;
    cursor: pointer;
    line-height: 1 !important;
    vertical-align: middle;
}

/* Delete Button */
.list-table-action .btn-outline-danger.btn-circle {
    border-color: #ef5350 !important;
    color: #ef5350 !important;
    background: transparent !important;
}

.list-table-action .btn-outline-danger.btn-circle:hover {
    background: #ef5350 !important;
    border-color: #ef5350 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(239, 83, 80, 0.4) !important;
}

.list-table-action .btn-outline-danger.btn-circle:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(239, 83, 80, 0.3) !important;
}

/* Edit Button */
.list-table-action .btn-outline-success.btn-circle {
    border-color: #43a047 !important;
    color: #43a047 !important;
    background: transparent !important;
}

.list-table-action .btn-outline-success.btn-circle:hover {
    background: #43a047 !important;
    border-color: #43a047 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(67, 160, 71, 0.4) !important;
}

.list-table-action .btn-outline-success.btn-circle:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(67, 160, 71, 0.3) !important;
}

/* Icons inside buttons */
.list-table-action .btn-circle i {
    display: block;
    line-height: 1;
    pointer-events: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 992px) {
    .row.page-titles {
        padding: 20px 20px !important;
    }

    .row.page-titles h3.text-themecolor {
        font-size: 1.25rem;
    }

    #list-page-actions-container {
        text-align: center !important;
        margin-top: 16px;
    }

    #list-page-actions {
        justify-content: center;
    }

    .header-search {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .container-fluid {
        padding: 14px 12px;
    }

    .row.page-titles {
        border-radius: 14px;
        padding: 18px 16px !important;
        margin-bottom: 20px !important;
    }

    .row.page-titles h3.text-themecolor {
        font-size: 1.1rem;
    }

    #items-table-wrapper {
        border-radius: 14px !important;
    }

    #items-list-table thead th {
        font-size: 0.72rem;
        padding: 12px 10px !important;
    }

    #items-list-table tbody td {
        font-size: 0.82rem;
        padding: 12px 10px !important;
    }

    .list-table-action .btn-circle {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        font-size: 0.78rem !important;
        border-radius: 7px !important;
    }
}

@media (max-width: 576px) {
    .row.page-titles {
        padding: 16px 14px !important;
    }

    #list-page-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-search {
        min-width: 100%;
        order: -1;
    }

    .row.page-titles .btn.btn-success {
        flex: 1;
        font-size: 0.82rem !important;
        padding: 10px 14px !important;
    }

    #items-list-table thead th,
    #items-list-table tbody td {
        padding: 10px 8px !important;
        font-size: 0.76rem;
    }
}

/* ============================================
   PRINT
   ============================================ */

@media print {
    .container-fluid {
        background: white !important;
        padding: 0 !important;
    }

    .row.page-titles {
        background: #1565c0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    #items-table-wrapper {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    #items-list-table thead tr {
        background: #1565c0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .list-table-action {
        display: none !important;
    }
}