
:root{
  --datatable-search-border-color: #ddd;
}
/* Dark mode */
[data-style="dark"]{
  --datatable-search-border-color: rgba(255, 255, 255, 0.09);
}

.datatable-search:focus {
    outline: none !important;
    border-color: var(--datatable-search-border-color) !important;
}

.icon-circle {
  height: 70px;
  width: 70px;
  border-radius: 50%;
  position: absolute;
  top: -15px;
  /* Move the circle upwards */
  background-color: white;
  /* Ensure background matches modal */
}

.dark-style .icon-circle {
  background-color: #21232c;
}

/* Custom */
.five-cols-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* spacing between cards */
}
.five-cols-row > .five-col {
  flex: 0 0 calc(20% - 0.8rem); /* 5 per row minus gap */
  max-width: calc(20% - 0.8rem);
}

@media (max-width: 1200px) {
  .five-cols-row > .five-col {
    flex: 0 0 calc(33.333% - 1rem); /* 3 per row for smaller screens */
    max-width: calc(33.333% - 1rem);
  }
}

@media (max-width: 768px) {
  .five-cols-row > .five-col {
    flex: 0 0 calc(50% - 1rem); /* 2 per row for tablets */
    max-width: calc(50% - 1rem);
  }
}

@media (max-width: 576px) {
  .five-cols-row > .five-col {
    flex: 0 0 100%; /* 1 per row for mobile */
    max-width: 100%;
  }
}

.timeline-event {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 10px 15px;
}

.timeline-header h6 {
  color: #333;
}

.active-timeline .timeline-event {
  background: #e3f2fd;
  /* soft blue base */
  box-shadow: 0 0 20px rgba(33, 150, 243, 0.6), 0 0 30px rgba(79, 167, 239, 0.3);
  /* glowing effect */
}

.pipeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  list-style: none;
  padding: 0;
}

.pipeline li {
  position: relative;
  font-size: 1.2rem;
  flex: 1;
  text-align: center;
  color: #6c757d;
  font-weight: 600;
  transition: transform 0.3s ease;
}

.pipeline li::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  background-color: #dee2e6;
  border-radius: 50%;
  z-index: 2;
  transition: all 0.3s ease;
}

.pipeline li::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 3px;
  background-color: #dee2e6;
  z-index: 1;
  transform: translateX(-50%);
}

.pipeline li:first-child::after {
  left: 50%;
  width: 50%;
}

.pipeline li:last-child::after {
  width: 50%;
}

/* Remove connecting line for first and last */
.pipeline li:first-child::after {
  transform: translateX(0);
}

.pipeline li:last-child::after {
  transform: translateX(-100%);
}

/* Text under dots */
.pipeline li a {
  display: block;
  margin-top: 35px;
  text-decoration: none;
  color: inherit;
  font-size: 0.9rem;
}

/* Active stage (default color) */
.pipeline li.active::before {
  background-color: #4f46e5; /* Indigo default */
}

/* Active step left-right highlight */
.pipeline li.active::after {
  width: 100%;
  left: -50%;
  transform: translateX(50%);
  z-index: 0;
  background: linear-gradient(
    to right,
    rgba(79, 70, 229, 0.5) 0%,
    #dee2e6 90%,
    #dee2e6 100%
  );
}

/* First and last child adjustment */
.pipeline li:first-child.active::after {
  left: 50%;
  width: 50%;
  transform: none;
}

.pipeline li:last-child.active::after {
  left: 0%;
  width: 50%;
  transform: none;
}

/* Next stages inactive */
.pipeline li.active ~ li::before {
  background-color: #dee2e6;
}

/* Fresh Lead */
.pipeline li.active.fresh-lead {
  --dot-bg: linear-gradient(135deg, #adb5bd, #868e96);
  --line-bg: linear-gradient(
    to right,
    rgba(134, 142, 150, 0.2) 0%,
    #868e96 50%,
    rgba(134, 142, 150, 0.2) 100%
  );
}

/* Meeting Done */
.pipeline li.active.meeting-done {
  --dot-bg: linear-gradient(135deg, #495057, #343a40);
  --line-bg: linear-gradient(
    to right,
    rgba(52, 58, 64, 0.3) 0%,
    #343a40 50%,
    rgba(52, 58, 64, 0.3) 100%
  );
}

/* Unqualified */
.pipeline li.active.unqualified {
  --dot-bg: linear-gradient(135deg, #ffe066, #ffd65a);
  --line-bg: linear-gradient(
    to right,
    rgba(255, 214, 90, 0.4) 0%,
    #ffd65a 50%,
    rgba(255, 214, 90, 0.4) 100%
  );
}

/* Negotiation */
.pipeline li.active.negotiation {
  --dot-bg: linear-gradient(135deg, #00c4ff, #63e3ff);
  --line-bg: linear-gradient(
    to right,
    rgba(99, 227, 255, 0.4) 0%,
    #63e3ff 50%,
    rgba(99, 227, 255, 0.4) 100%
  );
}

/* Deal Locked */
.pipeline li.active.deal-locked {
  --dot-bg: linear-gradient(135deg, #8e2de2, #b14fff);
  --line-bg: linear-gradient(
    to right,
    rgba(177, 79, 255, 0.4) 0%,
    #b14fff 50%,
    rgba(177, 79, 255, 0.4) 100%
  );
}

/* Lead Lost */
.pipeline li.active.lead-lost {
  --dot-bg: linear-gradient(135deg, #ff6b6b, #e74c3c);
  --line-bg: linear-gradient(
    to right,
    rgba(231, 76, 60, 0.4) 0%,
    #e74c3c 50%,
    rgba(231, 76, 60, 0.4) 100%
  );
}

/* Lead Win */
.pipeline li.active.lead-won {
  --dot-bg: linear-gradient(135deg, #38ef7d, #28a745);
  --line-bg: linear-gradient(
    to right,
    rgba(40, 167, 69, 0.4) 0%,
    #28a745 50%,
    rgba(40, 167, 69, 0.4) 100%
  );
}

/* Apply variables to pseudo-elements */
.pipeline li.active::before {
  background: var(--dot-bg);
}

.pipeline li.active::after {
  background: var(--line-bg);
}

.pipeline li.active.fresh-lead::before,
.pipeline li.active.meeting-done::before,
.pipeline li.active.unqualified::before,
.pipeline li.active.negotiation::before,
.pipeline li.active.deal-locked::before,
.pipeline li.active.lead-lost::before,
.pipeline li.active.lead-won::before {
  background: var(--dot-bg);
}

.pipeline li.active.fresh-lead::after,
.pipeline li.active.meeting-done::after,
.pipeline li.active.unqualified::after,
.pipeline li.active.negotiation::after,
.pipeline li.active.deal-locked::after,
.pipeline li.active.lead-lost::after,
.pipeline li.active.lead-won::after {
  background: var(--line-bg);
}

/* Clickable text wrapper */
.pipeline li .inner {
  display: inline-block;
  position: relative;
  z-index: 3; /* keeps above the line */
  transition: transform 0.3s ease;
}

.pipeline li .inner:hover {
  transform: scale(1.08);
}

/* Prevent pseudo-elements from triggering hover */
.pipeline li::before,
.pipeline li::after {
  pointer-events: none;
}

/* 🌐 Responsive */
@media (max-width: 768px) {
  .pipeline {
    flex-direction: column;
    align-items: stretch;
  }

  .pipeline li {
    margin: 0.5em 0;
    border-radius: 0.6em;
  }

  .pipeline li::after {
    display: none;
  }
}

.timeline-point {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  position: relative;
}

.timeline-point::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.05);
}

/* Match the Activity Timeline style */
.timeline-item {
  margin-bottom: 1.5rem;
}

.timeline-event {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  background-color: transparent;
  transition: all 0.3s ease;
}

/* Hover lift effect */
.timeline-item:hover .timeline-event {
  transform: translateY(-2px);
}

/* Badge container near title */
#meeting-status-badges .badge {
  font-size: 0.75rem;
  padding: 0.4em 0.6em;
}

/* Container for the toggle */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 60px; /* Adjust as needed */
  height: 34px; /* Adjust as needed */
}

/* Hide default checkbox */
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The track of the switch */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: background-color 0.3s;
}

.slider::before {
  content: "";
  position: absolute;
  height: 26px; /* Adjust as needed */
  width: 26px; /* Adjust as needed */
  left: 4px;
  bottom: 4px;
  background-color: white; /* Knob color */
  border-radius: 50%; /* Circular knob */
  transition: transform 0.3s; /* Smooth transition for knob movement */
}

/* Styles when the checkbox is checked (toggle is "on") */
.toggle-switch input:checked + .slider {
  background-color: #0de87a;
}

.toggle-switch input:checked + .slider::before {
  transform: translateX(26px);
}

.form-floating.ps-3 {
  padding-left: 1.5rem !important; /* same left spacing as description */
  display: flex;
  align-items: left;
  gap: 10px; /* spacing between label and toggle */
}

.form-label {
  font-weight: 500;
  color: #555;
}

/* Finance Dashboard Dark Mode Support */
.dark-style #revenueLoader,
.dark-style #monthlyExpenseLoader,
.dark-style #yearlyExpenseLoader,
.dark-style #expensesVsRevenueLoader,
.dark-style #cashflowDonutLoader {
  color: #b0acc7;
}

/* Responsive adjustments for finance dashboard */
@media (max-width: 576px) {
  .card-body {
    padding: 1rem !important;
  }

  .table-responsive table {
    font-size: 0.875rem;
  }

  .table th,
  .table td {
    padding: 0.5rem 0.25rem;
  }
}

.invalid-row {
  background-color: rgba(220, 53, 69, 0.12) !important; /* bootstrap danger */
}

