.schedule-with-chart .control-section {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  padding-block: 10px;
  overflow: hidden;
}
.schedule-with-chart .modern-layout {
  display: flex;
  gap: 16px;
  align-items: stretch !important;
}

.schedule-with-chart .scheduler-wrapper {
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.schedule-with-chart .chart-section {
  width: 420px;
  height: 650px;
  border: 2px solid #e9ecef;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.schedule-with-chart .chart-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #667eea, transparent);
  opacity: 0.3;
}

.schedule-with-chart .chart-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-bottom: 2px solid #e9ecef;
  flex-shrink: 0;
}

.schedule-with-chart .chart-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-with-chart .chart-title::before {
  content: '';
  width: 3px;
  height: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.schedule-with-chart .dropdown-wrapper {
  width: 100%;
  position: relative;
}

.schedule-with-chart .dropdown-wrapper label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.schedule-with-chart .dropdown-wrapper .e-ddl {
  border-radius: 10px;
  border: 2px solid #e0e3e8;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.schedule-with-chart .dropdown-wrapper .e-ddl:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
}

.schedule-with-chart .dropdown-wrapper .e-ddl:focus,
.schedule-with-chart .dropdown-wrapper .e-ddl.e-active {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1),
    0 4px 12px rgba(102, 126, 234, 0.15);
  outline: none;
}

.schedule-with-chart .chart-area {
  flex: 1;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.02) 0%,
    rgba(118, 75, 162, 0.02) 100%
  );
  border-radius: 10px;
  overflow: visible;
}

.schedule-with-chart .chart-area svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.05));
  max-height: 100%;
  width: 100%;
  object-fit: contain;
}

/* Scheduler Styling */
.schedule-with-chart .e-schedule {
  border-radius: 10px;
  overflow: hidden;
}

.schedule-with-chart .e-schedule .e-timeline-view .e-resource-left-td,
.schedule-with-chart .e-schedule .e-timeline-month-view .e-resource-left-td {
  vertical-align: bottom;
}

.schedule-with-chart .e-schedule.e-device .e-timeline-view .e-resource-left-td,
.schedule-with-chart
  .e-schedule.e-device
  .e-timeline-month-view
  .e-resource-left-td {
  width: 75px;
}

.schedule-with-chart
  .e-schedule
  .e-timeline-view
  .e-resource-left-td
  .e-resource-text,
.schedule-with-chart
  .e-schedule
  .e-timeline-month-view
  .e-resource-left-td
  .e-resource-text {
  display: flex;
  font-weight: 500;
  padding: 0;
}

.schedule-with-chart
  .e-schedule
  .e-timeline-view
  .e-resource-left-td
  .e-resource-text
  > div,
.schedule-with-chart
  .e-schedule
  .e-timeline-month-view
  .e-resource-left-td
  .e-resource-text
  > div {
  border-right: 1px solid #e9ecef;
  border-top: 1px solid #e9ecef;
  flex: 0 0 33.333%;
  font-weight: 500;
  height: 36px;
  line-height: 34px;
  padding-left: 5px;
  color: var(--text-primary);
  font-size: 12px;
}

.schedule-with-chart
  .e-schedule
  .e-timeline-month-view
  .e-resource-left-td
  .e-resource-text
  > div {
  border-top: 0;
}

.schedule-with-chart
  .e-schedule
  .e-timeline-view
  .e-resource-left-td
  .e-resource-text
  > div:last-child,
.schedule-with-chart
  .e-schedule
  .e-timeline-month-view
  .e-resource-left-td
  .e-resource-text
  > div:last-child {
  border-right: 0;
}

.schedule-with-chart .e-schedule .template-wrap {
  display: flex;
  height: 100%;
  text-align: left;
}

.schedule-with-chart .e-schedule .template-wrap > div {
  border-right: 1px solid #e9ecef;
  flex: 0 0 33.333%;
  font-weight: 500;
  overflow: hidden;
  padding-left: 8px;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-size: 13px;
}

.schedule-with-chart .e-schedule .template-wrap:not(.header-indent) > div {
  line-height: 58px;
}

.schedule-with-chart .e-schedule .header-indent > div {
  line-height: 35px;
}

.schedule-with-chart .e-schedule .template-wrap > div:last-child {
  border-right: 0;
}

.schedule-with-chart .e-schedule .e-timeline-view .e-resource-cells,
.schedule-with-chart .e-schedule .e-timeline-month-view .e-resource-cells {
  padding-left: 0;
}

.schedule-with-chart .e-schedule .e-timeline-view .e-date-header-wrap table col,
.schedule-with-chart .e-schedule .e-timeline-view .e-content-wrap table col {
  width: 500px;
}

/* Event Styling */
.schedule-with-chart .e-appointment {
  border-radius: 6px;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.schedule-with-chart .e-rtl .e-resource-text,
.schedule-with-chart .e-rtl .template-wrap,
.schedule-with-chart .e-rtl .header-indent {
  flex-direction: row-reverse;
}

.schedule-with-chart .e-rtl .e-resource-text > div,
.schedule-with-chart .e-rtl .template-wrap > div {
  direction: rtl;
  text-align: right;
}

.schedule-with-chart
  .e-schedule:not(.e-rtl)
  .e-timeline-view
  .e-resource-left-td
  .e-resource-text
  > div:last-child {
  border-right: 0;
}

.schedule-with-chart .e-schedule.e-rtl .e-timeline-view .e-resource-cells,
.schedule-with-chart
  .e-schedule.e-rtl
  .e-timeline-month-view
  .e-resource-cells {
  padding-right: 0;
}

.schedule-with-chart .e-schedule.e-rtl .template-wrap {
  text-align: right;
}

.schedule-with-chart .e-schedule:not(.e-rtl) .template-wrap > div:last-child {
  border-right: 0;
}

/* Fluent Dark */
.fluent-dark .schedule-with-chart .e-schedule .e-resource-text > div,
.fluent-dark .schedule-with-chart .e-schedule .template-wrap > div {
  border-color: #292827;
}

/* Fluent2 Dark */
.fluent2-dark .schedule-with-chart .e-schedule .e-resource-text > div,
.fluent2-dark .schedule-with-chart .e-schedule .template-wrap > div {
  border-color: #525252;
}

/* Material Dark */
.material-dark .schedule-with-chart .e-schedule .e-resource-text > div,
.material-dark .schedule-with-chart .e-schedule .template-wrap > div {
  border-color: #616161;
}

/* Material3 Dark */
.material3-dark .schedule-with-chart .e-schedule .e-resource-text > div,
.material3-dark .schedule-with-chart .e-schedule .template-wrap > div {
  border-color: #444746;
}

/* Bootstrap Dark */
.bootstrap-dark .schedule-with-chart .e-schedule .e-resource-text > div,
.bootstrap-dark .schedule-with-chart .e-schedule .template-wrap > div {
  border-color: #505050;
}

/* Bootstrap5 Dark */
.bootstrap5-dark .schedule-with-chart .e-schedule .e-resource-text > div,
.bootstrap5-dark .schedule-with-chart .e-schedule .template-wrap > div,
.bootstrap5_3-dark .schedule-with-chart .e-schedule .e-resource-text > div,
.bootstrap5_3-dark .schedule-with-chart .e-schedule .template-wrap > div {
  border-color: #444c54;
}

/* Tailwind Dark */
.tailwind-dark .schedule-with-chart .e-schedule .e-resource-text > div,
.tailwind3-dark .schedule-with-chart .e-schedule .template-wrap > div {
  border-color: #4b5563;
}

/* Chart Section Border */
.material-dark .schedule-with-chart .chart-section,
.material3-dark .schedule-with-chart .chart-section,
.fluent-dark .schedule-with-chart .chart-section,
.fluent2-dark .schedule-with-chart .chart-section,
.bootstrap-dark .schedule-with-chart .chart-section,
.bootstrap5-dark .schedule-with-chart .chart-section,
.bootstrap5_3-dark .schedule-with-chart .chart-section,
.fabric-dark .schedule-with-chart .chart-section,
.tailwind-dark .schedule-with-chart .chart-section,
.tailwind3-dark .schedule-with-chart .chart-section {
  border: 2px solid #4b5563 !important;
}


/* Chart Header Bottom Border */
.material-dark .schedule-with-chart .chart-header,
.material3-dark .schedule-with-chart .chart-header,
.fluent-dark .schedule-with-chart .chart-header,
.fluent2-dark .schedule-with-chart .chart-header,
.bootstrap-dark .schedule-with-chart .chart-header,
.bootstrap5-dark .schedule-with-chart .chart-header,
.bootstrap5_3-dark .schedule-with-chart .chart-header,
.fabric-dark .schedule-with-chart .chart-header,
.tailwind-dark .schedule-with-chart .chart-header,
.tailwind3-dark .schedule-with-chart .chart-header {
  border-bottom: 2px solid #4b5563 !important;
}


/* Dropdown Border */
.material-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.material3-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.fluent-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.fluent2-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.bootstrap-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.bootstrap5-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.bootstrap5_3-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.fabric-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.tailwind-dark .schedule-with-chart .dropdown-wrapper .e-ddl,
.tailwind3-dark .schedule-with-chart .dropdown-wrapper .e-ddl {
  border: 2px solid #4b5563 !important;
}

.material-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.material3-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.bootstrap-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.bootstrap5-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.bootstrap5_3-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.fabric-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.tailwind-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.tailwind3-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.fluent-dark .schedule-with-chart .dropdown-wrapper .e-input-group,
.fluent2-dark .schedule-with-chart .dropdown-wrapper .e-input-group {
  
  border: 2px solid #4b5563 !important;  /* same as scheduler */
}

/* Responsive Design */
@media (min-width: 1440px) {
  .schedule-with-chart .chart-section {
    width: 480px;
    height: 650px;
  }
  .schedule-with-chart .chart-title {
    font-size: 19px;
  }
}

@media (max-width: 1200px) {
  .schedule-with-chart .chart-section {
    width: 380px;
    height: 650px;
    padding: 16px;
  }
  .schedule-with-chart .chart-title {
    font-size: 16px;
  }
}

@media (max-width: 1024px) {
  .schedule-with-chart .modern-layout {
    flex-direction: column;
  }

  .schedule-with-chart .schedule-with-chart .scheduler-wrapper {
    width: 100%;
  }

  .schedule-with-chart .chart-section {
    width: 100%;
  }

  .schedule-with-chart #scheduler {
    height: 500px !important;
    width: 100% !important;
  }

  .schedule-with-chart .e-schedule {
    width: 100% !important;
    height: 500px !important;
  }
}

@media (max-width: 768px) {
  .schedule-with-chart .control-section {
    padding-block: 12px;
    margin: 12px;
  }

  .schedule-with-chart .modern-layout {
    gap: 1px;
  }

  .schedule-with-chart .chart-section {
    width: 100%;
    height: 650px;
    padding: 12px;
  }

  .schedule-with-chart .e-schedule .e-timeline-view .e-resource-left-td,
  .schedule-with-chart .e-schedule .e-timeline-month-view .e-resource-left-td {
    width: 100px;
  }

  .schedule-with-chart
    .e-schedule
    .e-timeline-view
    .e-resource-left-td
    .e-resource-text
    > div,
  .schedule-with-chart
    .e-schedule
    .e-timeline-month-view
    .e-resource-left-td
    .e-resource-text
    > div,
  .schedule-with-chart .e-schedule .template-wrap > div {
    flex: 0 0 100%;
  }

  .schedule-with-chart .e-schedule .template-wrap > div:first-child,
  .schedule-with-chart .e-schedule .template-wrap > div:nth-child(2) {
    border-right: 0;
  }

  .schedule-with-chart .e-schedule .truck-type,
  .schedule-with-chart .e-schedule .capacity {
    display: none;
  }

  .schedule-with-chart .e-schedule .e-timeline-view .e-resource-left-td,
  .schedule-with-chart .e-schedule .e-timeline-month-view .e-resource-left-td {
    width: 230px;
  }
}

@media (max-width: 550px) {
  .schedule-with-chart .control-section {
    padding-block: 8px;
    margin: 8px;
  }

  .schedule-with-chart .chart-title {
    font-size: 12px;
  }

  .schedule-with-chart #scheduler {
    height: 400px !important;
    width: 100% !important;
  }

  .schedule-with-chart .e-schedule {
    width: 100% !important;
    height: 400px !important;
  }

  .schedule-with-chart .chart-area {
    min-height: 350px;
  }
  /* ✅ FULL WIDTH FIX – REQUIRED */
  .sb-content,
  .sb-body-content,
  .sb-demo-section,
  .sb-sample-content,
  .schedule-content-wrapper {
    max-width: none !important;
    width: 100% !important;
  }

  .sb-content,
  .sb-body-content,
  .schedule-content-wrapper {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Override: reduce unnecessary top/inner spacing so scheduler sits closer to the container */
  .schedule-with-chart .control-section {
    padding: 8px 0px !important;
    margin-top: 0 !important;
  }

  .schedule-with-chart .modern-layout {
    align-items: flex-start !important;
    gap: 1px !important;
  }

  .schedule-with-chart .scheduler-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
    min-height: 0;
  }

  .schedule-with-chart .e-schedule,
  .schedule-with-chart .e-schedule .e-header,
  .schedule-with-chart .e-schedule .e-toolbar,
  .schedule-with-chart .e-schedule .e-schedule-toolbar {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* small screens: keep compact spacing too */
  @media (max-width: 1024px) {
    .schedule-with-chart .control-section {
      padding: 8px 0 !important;
    }
    .schedule-with-chart #scheduler,
    .schedule-with-chart .e-schedule {
      height: auto !important;
    }
  }

  /* Reduce gap and nudge scheduler left by adding right padding to the chart and adjusting scheduler wrapper */
  .schedule-with-chart .modern-layout {
    gap: 8px !important;
    align-items: flex-start !important;
  }

  .schedule-with-chart .chart-section {
    padding-right: 24px !important; /* pushes the scheduler closer to the left */
  }

  .schedule-with-chart .scheduler-wrapper {
    margin-left: 0 !important;
    padding-left: 8px !important; /* small inner padding to keep content aligned */
  }
}
