/* Cases By Status Stepper Styles */
.cases-status-bar {
  display: flex;
  margin: 10px 0 0;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.cases-status-step {
  position: relative;
  flex: 1;
  padding: 0px 0;
  text-align: center;
  background: #e8f8f5;
  transition: background 0.3s;
  margin-left: -24px;
}

.case-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step-content {
  padding: 15px 15px 15px 40px;
}

.cases-status-title {
  font-size: 14px;
  color: #333;
  text-align: start;

  /* margin-bottom: 8px; */
}

.cases-status-count {
  font-size: 16px;
  font-weight: bold;
  color: #222;
  text-align: start;
}

.cases-status-step.running,
.cases-status-card.running {
  background: #f4faff;

  &:hover {
    background-color: #eeecfb;
  }
}

.cases-status-step.running:hover .step-arrow:after {
  border-left-color: #eeecfb;
}

.sidebar {
  width: 100%;
  background: white;
  position: sticky;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 148px);
  overflow: hidden;
}

/* Calendar Styles */
.calendar-widget {
  background: white;
  border-radius: 8px;
  flex-shrink: 0;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 11px;
  padding: 8px 8px;
  border-bottom: 1px solid #eee;
  border-top: 1px solid #eee;
}

.calendar-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.calendar-nav {
  display: flex;
  gap: 10px;
}

.nav-btn {
  font-size: 18px;
  background: #fff;
  border: none;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #6c757d;
}

.nav-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.month-year {
  font-size: 14px;
  font-weight: 500;
  color: #495057;
  /* text-transform: lowercase !important; */
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  /* gap: 1px; */
  /* background: #dee2e6; */
  border-radius: 6px;
  overflow: hidden;
  padding: 15px;
}

.day-header {
  background: #fff;
  padding: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 11px;
  /* color: #6c757d; */
  text-transform: uppercase;
}

.day-cell {
  background: white;
  /* padding: 8px; */
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 36px;
  max-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.day-cell:hover {
  /* background: #e3f2fd; */
  border-radius: 50%;
  border: 1px solid #555ed9;
  color: #333;
}

.day-cell.other-month {
  color: #ccc;
  /* background: #fafafa; */
}

.day-cell.today {
  border: 1px solid #555ed9;
  /* background: 0 0; */
  color: #333;
  border-radius: 50%;
}

.day-cell.selected {
  background: #1976d2;
  border: 1px solid #555ed9;
  border-radius: 50%;
  color: white;
}

.calendar-footer {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  font-size: 12px;
  /* color: #6c757d; */
  text-align: center;
}

/* Buttons */
/* #export_to_pdf,
#add_advocate_bar_code {
  display: inline-block;
  padding: 8px 16px;
  margin: 4px;
  background: #555ed9;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
} */

/* .btn:hover {
  background: #0056b3;
  text-decoration: none;
  color: white;
} */

/* .btn-primary {
  background: #007bff;
} */

/* .btn-primary:hover {
  background: #474fc7;
} */

.section-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
}

.content-section {
  margin-bottom: 30px;
}

.calender-wrapper {
  padding: 0px;
}

.main-chart {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 10px;
}

.calender-wrapper {
  position: sticky;
  z-index: 10;
  height: calc(100vh - 148px);
  background-color: white;
  /* padding: 0px 5px; */
  border-left: 1px solid #eee;
}

.dashboard-row,
.dashboard-row .import-cases-section,
.dashboard-row .alerts-section {
  margin-left: 0;
  margin-right: 0;
}

.dashboard-row .main-chart {
  width: 80% !important;
}

.dashboard-row .calender-wrapper {
  width: 20% !important;
}

.sidebar {
  position: sticky;
  /* top: 80px; */
  /* height: fit-content; */
  /* Remove margin-top if sticky */
  max-width: 379px !important;
  margin: 0 auto;
  margin-top: 0;
}

.dashboard-row {
  max-height: calc(100vh - 162px);
  overflow: hidden;
}

.skip-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eventElement {
  cursor: pointer;
  padding: 3px 0px;
  border-left: 3px solid green;
  background-color: rgba(0, 128, 0, 0.11);
}

@media (max-width: 991px) {

  .calender-wrapper,
  .sidebar {
    position: static;
    top: unset;
  }

  .main-chart {
    max-height: unset;
    overflow: unset;
  }
}

.cases-status-step.todays,
.cases-status-card.todays {
  background: #eeecfb;

  &:hover {
    background-color: #e7def7;
  }
}

.cases-status-step.todays:hover .step-arrow:after {
  border-left-color: #e7def7;
}

.cases-status-step.tomorrows,
.cases-status-card.tomorrows {
  background: #e7def7;

  &:hover {
    background-color: #cec2eb;
  }
}

.cases-status-step.tomorrows:hover .step-arrow:after {
  border-left-color: #cec2eb !important;
}

.cases-status-card.decided {}

.cases-status-step.awaited,
.cases-status-card.awaited {
  background: #ddd5f3;

  &:hover {
    background-color: #cec2eb;
  }
}

.cases-status-step.awaited:hover .step-arrow:after {
  border-left-color: #cec2eb !important;
}

.cases-status-step.decided,
.cases-status-card.decided {
  background: #cec2eb;

  &:hover {
    background-color: #c0afe2;
  }
}

.step-arrow {
  width: 25px;
  height: 72px;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 100;
  border-left: 3px solid #fff;
}

.step-arrow:before {
  content: " ";
  border-bottom: 36px solid transparent;
  border-top: 36px solid transparent;
  top: 0;
  display: inline-block;
  right: -2px;
  left: auto;
  position: absolute;
  border-left: 24px solid #fff;
  z-index: 100;
}

.step-arrow:after {
  content: " ";
  border-bottom: 36px solid transparent;
  border-top: 36px solid transparent;
  top: 0;
  display: inline-block;
  right: auto;
  left: -3px;
  position: absolute;
  border-left: 24px solid #e1f7f0;
  z-index: 200;
  -webkit-transition: all linear 0.2s;
  -moz-transition: all linear 0.2s;
  -o-transition: all linear 0.2s;
  -ms-transition: all linear 0.2s;
  transition: all linear 0.2s;
}

.running .step-arrow:after {
  border-left-color: #f4faff;
}

.todays .step-arrow:after {
  border-left-color: #eeecfb;
}

.tomorrows .step-arrow:after {
  border-left-color: #e7def7 !important;
}

.awaited .step-arrow:after {
  border-left-color: #ddd5f3 !important;
}

.decided .step-arrow:after {
  border-left-color: #7b4bd2 !important;
}

.cases-dashboard-main-wrapper {
  max-width: 1100px;
  padding: 30px 0px;
  margin: 0 auto;
}

.cases-dashboard-section {
  border: 1px solid #d3d3d3;
  background-color: #fff;
  border-radius: 3px;
  padding: 18px 20px;
}

.sidebar .fc th,
.sidebar .fc td {
  border-width: 0px !important;
  cursor: pointer;
}

.sidebar .fc-today-button {
  display: none !important;
}

.sidebar .fc-left {
  float: none !important;
}

.sidebar .fc-button-group {
  width: 100%;
  display: flex !important;
  align-items: center;
  justify-content: space-between !important;
}

.table-responsive {
  overflow: auto;
}

.sidebar .fc-toolbar .fc-prev-button,
.sidebar .fc-toolbar .fc-next-button {
  background: #ffffff25;
  border: none;
  box-shadow: none !important;
}

.sidebar .fc-icon-left-single-arrow:after,
.sidebar .fc-icon-right-single-arrow:after {
  font-size: 16px !important;
}

.sidebar .fc-button-group {
  margin-bottom: 20px;
}

.sidebar .fc-unthemed td.fc-today {
  background-color: #fff;
}

.table-responsive {
  border: 1px solid #ddd;
  border-radius: 3px;
}

.sidebar .fc-basic-view .fc-body .fc-row {
  min-height: auto !important;
  height: auto !important;
  align-content: center;
}

.sidebar .fc-toolbar h2 {
  position: absolute;
  top: 0;
  left: 47%;
  transform: translate(-50%, 12px);
  font-size: 11px;
  font-weight: 600;
}

.sidebar .fc-day-header {
  font-weight: 500;
}

.sidebar .fc-scroller {
  height: 300px !important;
}

.sidebar .fc {
  padding-right: 6px;
  padding-left: 6px;
}

.sidebar .event-table-container {
  margin-right: 9px;
  margin-left: 9px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.sidebar .fc-row .fc-content-skeleton td {
  align-content: center;
}

.sidebar .fc-ltr .fc-basic-view .fc-day-top .fc-day-number {
  text-align: center;
  width: 100%;
  /* padding: 0px; */
  margin: 10px auto;
}

.sidebar .fc-state-active {
  background-color: #32c693 !important;
  color: white;
  width: 100%;
  border-radius: 3px;
}

.sidebar .fc .fc-toolbar>*>* {
  width: 100%;
  display: flex;
  gap: 6px;
}

.sidebar .fc-right,
.sidebar .fc-toolbar .fc-month-button,
.sidebar .fc-toolbar .fc-agendaWeek-button,
.sidebar .fc-toolbar .fc-agendaDay-button {
  width: 100%;
}

.sidebar .fc-toolbar .fc-month-button,
.sidebar .fc-toolbar .fc-agendaWeek-button,
.sidebar .fc-toolbar .fc-agendaDay-button {
  display: none !important;
  background-color: #f3f3f3;
  box-shadow: none !important;
  border-radius: 3px;
}

.import-cases-section {
  border: 1px solid #d3d3d3;
  background-color: #fff;
  border-radius: 3px;
  padding: 18px 20px;
}

/* ── Fixed-for summary section ────────────────────────────── */
.fixedfor-summary-section {
  border: 1px solid #d3d3d3;
  background-color: #fff;
  border-radius: 3px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

/* Row that holds side-by-side table blocks */
.summary-tables-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Each table occupies ~half the width, leaving room for a sibling */
.summary-table-block {
  flex: 0 0 calc(50% - 10px);
  min-width: 0;
}

/* Scrollable body with sticky header */
.summary-table-scroll {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.summary-table-scroll table {
  margin-bottom: 0;
  width: 100%;
}

/* Keep the header row pinned while the body scrolls */
.summary-table-scroll thead th {
  position: sticky;
  top: 0;
  background: #f5f5f5;
  z-index: 1;
  border-bottom: 2px solid #ddd;
}

/* Total row styling */
.summary-table-scroll tbody tr:last-child td {
  border-top: 2px solid #333;
  font-weight: 700;
}

@media (max-width: 767px) {
  .summary-tables-row {
    flex-direction: column;
  }

  .summary-table-block {
    flex: 0 0 100%;
  }
}

/* ── Dashboard action buttons ─────────────────────────────── */
.dashboard-action-bar {
  display: flex;
  gap: 10px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.dashboard-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
  letter-spacing: 0.01em;
}

.dashboard-action-btn:hover,
.dashboard-action-btn:focus {
  color: #fff;
  text-decoration: none;
  filter: brightness(0.92);
  box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.dashboard-action-btn.import-btn {
  background-color: #2d7dd2;
}

.dashboard-action-btn.daily-board-btn {
  background-color: #1e8a4a;
}

.dashboard-action-btn.ai-assistant-btn {
  background-color: #6f42c1;
}

.case-type-dropdown,
.partner-filter-dropdown {
  border: 1px solid #d3d3d3;
  padding: 5px 4px;
  font-size: 13px;
  border-radius: 3px;
  min-width: 120px;
}

.sidebar .fc td.fc-today .fc-day-number {
  border: 2px solid #555ed9;
  padding: 0px !important;
  border-radius: 50%;
  text-align: center;
  height: 20px;
  width: 20px !important;
  align-content: center;
  display: block;
  float: none !important;
  margin: 0 auto;
  color: #555ed9;
}

.sidebar .calendar_main {
  max-width: 379px;
  margin: 0 auto;
}

.sidebar .fc-view-container {
  max-width: 353px;
  margin: auto;
}

.calendar-header-mobile {
  display: none;
}

.calendar-btn-wrapper {
  display: none;
}

/* Hide button on large screens */
.calendar-toggle-btn {
  display: none;
  /* position: fixed; */
  /* bottom: 20px; */
  /* right: 20px; */
  z-index: 999;
  /* color: #fff; */
  padding: 0px;
  border: none;
  border-radius: 5px;
  font-size: 20px;
  background-color: white;
  /* padding-right: 15px; */
}

/* Show button only on screen < 1200px */
@media (max-width: 1199px) {

  .calendar-toggle-btn,
  .calendar-btn-wrapper {
    display: block !important;
    justify-self: flex-end;
    /* padding-right: 9px; */
    margin-top: 20px;
  }

  .calendar-btn-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: end;
  }

  .calendar-vault {
    position: fixed;
    top: 0px;
    right: -100%;
    width: 100%;
    max-width: 350px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    transition: right 0.3s ease;
    overflow-y: auto;
    height: calc(100vh);
  }
}

.calendar-vault.open {
  right: 0;
}

.calendar-vault .close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

@media screen and (max-width: 1200px) {
  .main-chart {
    padding-right: 0px;
    padding-left: 0px;
  }

  .dashboard-row {
    max-height: 100%;
    overflow: auto;
  }

  .dashboard-row .main-chart,
  .dashboard-row .calender-wrapper {
    width: 100% !important;
    max-height: 100% !important;
  }

  .sidebar {
    z-index: 999;
    height: 100%;
  }

  .calendar-header-mobile {
    display: block;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #ccc;
  }

  .sidebar .event-table-container {
    flex: 1;
    min-height: 0;
  }

  .sidebar .fc-toolbar h2 {
    transform: translate(-50%, 70px);
  }
}

.cases-status-bar-mobile {
  display: none;
}

@media (max-width: 700px) {
  .cases-status-bar-desktop {
    display: none;
  }

  .cases-status-bar-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .case-status-header-mobile {
    grid-column: span 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
  }

  .cases-status-card {
    background-color: #f0f0f0;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    font-size: 12px;
    text-decoration: none;
    color: #333;
    /* border: 1px solid #ccc; */
  }

  .cases-status-card-title {
    font-size: 14px;
    color: #333;
    text-align: center;
  }

  .cases-status-card-count {
    font-size: 16px;
    font-weight: bold;
    color: #222;
  }

  .cases-status-bar-mobile .cases-status-card:last-child {
    grid-column: span 2;
  }

  .navbar-brand {
    padding: 15px 5px;
  }
}

@media (max-width: 767px) {
  .cases-dashboard-main-wrapper {
    padding: 30px 0px 0;
  }
}

/* pagination styles start here */
.pagination-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.pagination {
  margin: 10px 0;
  display: inline-block;
}

.pagination a {
  color: black;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color 0.3s;
  border: 1px solid #ddd;
}

.pagination a.active {
  background-color: #5cb85c;
  color: white;
  border: 1px solid #5cb85c;
}

.pagination a:hover:not(.active) {
  background-color: #ddd;
}

/* end of the pagination */


.custom-select {
  width: 100%;
  padding: 4px 22px 3px 5px;
  font-size: 13px;
  font-weight: 500;
  color: #000000;
  /* background: linear-gradient(145deg, #ffffff, #f7fafc); */
  border: 1px solid #6841ea;
  border-radius: 4px;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.custom-select:hover {
  border-color: #667eea;
  box-shadow: 0 6px 12px rgba(102, 126, 234, 0.15);
}

.custom-select:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-arrow {
  position: absolute;
  right: 9px;
  top: 42%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;

  border-right: 2px solid #6841ea;
  border-bottom: 2px solid #6841ea;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.3s ease;
}

.custom-select:focus+.select-arrow {
  transform: translateY(-50%) rotate(-135deg);
}

.selected-value {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(145deg, #f7fafc, #edf2f7);
  border-radius: 12px;
  border-left: 4px solid #667eea;
}

.selected-value h3 {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.selected-value p {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
}

.select-wrapper {
  position: relative;
  /* margin-bottom: 20px; */
  width: fit-content;
  float: right;
  margin-right: 10px;
}

/* Case label color badge. Color is set inline per-row (see
   _caseLabelBadgeHtml() in updatetable.js) since labels are user-defined
   and not a fixed set of CSS classes. */
.case-label-badge {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-left: 2px;
  cursor: default;
}