#calendar_selector .section-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bs-secondary);
}
#calendar_selector .form-check.remote {
  color: var(--bs-blue);
}

[data-bs-theme=dark] #calendar_selector .form-check.remote {
  color: var(--bs-cyan);
}
[data-bs-theme=dark] #calendar .fc-event-main-frame {
  color: var(--bs-white);
}

.caldav-notification {
  position: absolute;
  z-index: 100;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  pointer-events: none;
}
.caldav-notification .alert {
  pointer-events: auto;
  transition: opacity 0.3s ease-in-out;
  opacity: 0;
}
.caldav-notification .alert.show {
  opacity: 1;
}

.modal-event-info .modal-header {
  padding: 0.25rem 0.5rem;
}
.modal-event-info .modal-header .btn-close {
  font-size: 12px;
  display: block;
  position: relative;
  top: 4px;
  right: 8px;
}
.modal-event-info .modal-header {
  border: 0;
  position: absolute;
  right: 0;
  z-index: 10;
}
.modal-event-info .modal-content {
  overflow: hidden;
}
.modal-event-info .modal-body {
  padding: 0;
}
.modal-event-info .modal-body .event_calendar_indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.modal-event-info .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100% - var(--bs-modal-margin) * 2);
}

.calendar-contextmenu .add-remote-event {
  color: var(--bs-blue) !important;
}

.case-header .case-title {
  font-size: 1.5rem;
}
.case-header .case-tag {
  cursor: pointer;
  font-family: monospace;
  font-size: 0.8rem;
}
.case-header .case-title-input {
  max-width: 400px;
  display: inline-block;
}
.case-header .case-title-edit-btn {
  padding: 0;
  line-height: 1;
  color: var(--bs-secondary);
}
.case-header .case-title-edit-btn:hover {
  color: var(--bs-primary);
}

.case-body {
  min-height: 400px;
}

.case-sidebar .card-header {
  cursor: pointer;
  user-select: none;
}
.case-sidebar .card-header:has(+ .collapse:not(.show)) {
  border-bottom: none;
}
.case-sidebar .ref-title {
  word-break: break-word;
}

.case-timeline .case-thread .case-thread-header {
  cursor: pointer;
  user-select: none;
}
.case-timeline .case-thread .case-thread-header:hover {
  background-color: var(--bs-light);
}
.case-timeline .case-thread.collapsed .case-thread-header {
  border-bottom: none;
}
.case-timeline .case-thread-body {
  padding: 0;
}
.case-timeline .case-entry {
  transition: background-color 0.15s;
  padding: 1rem;
}
.case-timeline .case-entry:last-child {
  border-bottom: none !important;
}
.case-timeline .case-entry:hover {
  background-color: var(--bs-gray-100);
}
.case-timeline .case-entry .entry-reply-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.case-timeline .case-entry:hover .entry-reply-btn {
  opacity: 1;
}
.case-timeline .case-entry .entry-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.9rem;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
}
.case-timeline .case-entry .quoted-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.85rem;
  background: none;
  border: none;
  padding: 0;
}
.case-timeline .case-entry .quoted-toggle {
  font-size: 0.8rem;
  font-weight: bold;
}
.case-timeline .case-entry .entry-attachments .case-attachment {
  font-size: 0.85rem;
  padding: 0.25rem 0;
}
.case-timeline .case-entry .entry-attachments .case-attachment .att-preview-toggle {
  cursor: pointer;
}
.case-timeline .case-entry .entry-attachments .case-attachment .att-download-btn {
  font-size: 0.9rem;
  color: var(--bs-secondary);
}
.case-timeline .case-entry .entry-attachments .case-attachment .att-download-btn:hover {
  color: var(--bs-primary);
}
.case-timeline .case-entry .entry-attachments .case-attachment .att-preview .att-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: 4px;
}
.case-timeline .case-entry .entry-attachments .case-attachment .att-preview audio,
.case-timeline .case-entry .entry-attachments .case-attachment .att-preview video {
  max-width: 100%;
}
.case-timeline .case-entry-indent-1 {
  padding-left: 40px;
  background-color: rgba(0, 0, 0, 0.015);
}
.case-timeline .case-entry-indent-2 {
  padding-left: 64px;
  background-color: rgba(0, 0, 0, 0.03);
}
.case-timeline .case-entry-indent-3 {
  padding-left: 88px;
  background-color: rgba(0, 0, 0, 0.045);
}
.case-timeline .case-entry-indent-4 {
  padding-left: 112px;
  background-color: rgba(0, 0, 0, 0.06);
}
.case-timeline .case-entry-indent-5 {
  padding-left: 136px;
  background-color: rgba(0, 0, 0, 0.075);
}

/* Document Items Editor */
.document-items-editor .document-items-list {
  margin-bottom: 1rem;
}
.document-items-editor {
  /* Drag handle styling */
}
.document-items-editor .drag-handle {
  cursor: grab;
  user-select: none;
}
.document-items-editor .drag-handle:active {
  cursor: grabbing;
}
.document-items-editor {
  /* Group card */
}
.document-items-editor .document-group > .card-header {
  background-color: var(--bs-light);
  cursor: pointer;
}
.document-items-editor .document-group > .card-header:hover {
  background-color: var(--bs-secondary-bg-subtle);
}
.document-items-editor .document-group > .card-header .group-toggle {
  cursor: pointer;
  transition: transform 0.2s ease;
}
.document-items-editor .document-group.collapsed > .card-header .group-toggle {
  transform: rotate(-90deg);
}
.document-items-editor .document-group {
  /* Selected state - border around entire group */
}
.document-items-editor .document-group.selected {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}
.document-items-editor .document-group.selected > .card-header {
  background-color: var(--bs-primary-bg-subtle);
}
.document-items-editor {
  /* Item row in table */
}
.document-items-editor .document-item:hover {
  --bs-table-bg: var(--bs-secondary-bg-subtle);
  background-color: var(--bs-secondary-bg-subtle);
}
.document-items-editor .document-item.selected {
  background-color: var(--bs-primary-bg-subtle);
  outline: 2px solid var(--bs-primary);
}
.document-items-editor .document-item td {
  vertical-align: middle;
}
.document-items-editor .document-item .btn-sm {
  padding: 0.125rem 0.375rem;
  font-size: 0.75rem;
}
.document-items-editor {
  /* Ungrouped item card */
}
.document-items-editor .document-item-card:hover {
  background-color: var(--bs-secondary-bg-subtle);
}
.document-items-editor .document-item-card.selected {
  background-color: var(--bs-primary-bg-subtle);
  outline: 2px solid var(--bs-primary);
}
.document-items-editor .document-item-card .card-body {
  min-height: 48px;
}
.document-items-editor {
  /* Totals card */
}
.document-items-editor .totals-card {
  margin-top: 1rem;
}
.document-items-editor .totals-card table tr:last-child td {
  border-bottom: none;
}
.document-items-editor {
  /* Drag & Drop feedback */
}
.document-items-editor .drag-over {
  border: 2px dashed var(--bs-primary);
  background-color: var(--bs-primary-bg-subtle);
}
.document-items-editor .dragging {
  opacity: 0.5;
}

/* Document Text Assignments */
.document-text-assignments .document-text-card > .card-header {
  padding: 0.5rem 0.75rem;
  background-color: var(--bs-light);
}
.document-text-assignments .document-text-card.drag-over {
  border: 2px dashed var(--bs-primary);
  background-color: var(--bs-primary-bg-subtle);
}
.document-text-assignments .text-assignment-text {
  font-size: 0.875rem;
}
.document-text-assignments .list-group-item {
  padding: 0.5rem 0.75rem;
}
.document-text-assignments .list-group-item:hover {
  background-color: var(--bs-secondary-bg-subtle);
}
.document-text-assignments .list-group-item.drag-over {
  border: 2px dashed var(--bs-primary);
  background-color: var(--bs-primary-bg-subtle);
}
.document-text-assignments .list-group-item.dragging {
  opacity: 0.5;
}
.document-text-assignments .drag-handle {
  cursor: grab;
  user-select: none;
}
.document-text-assignments .drag-handle:active {
  cursor: grabbing;
}
.document-text-assignments .inline-text-add {
  border-top: 1px solid var(--bs-border-color);
}

.card-header .form-control-sm + .datepicker-trigger,
.card-header .form-control-sm + .timepicker-trigger {
  --bs-btn-padding-y: 0.25rem;
  --bs-btn-padding-x: 0.5rem;
  --bs-btn-font-size: 0.875rem;
  --bs-btn-border-radius: var(--bs-border-radius-sm);
}

.invoice-filter .invoice-searchbox {
  position: relative;
}
.invoice-filter .invoice-searchbox > .bi-search {
  position: absolute;
  padding: 4px 8px;
  line-height: normal;
  color: #555555;
}
.invoice-filter .invoice-searchbox > input {
  padding-left: 30px;
}
.invoice-filter .datetime .datepicker-trigger {
  border-top-right-radius: var(--bs-border-radius) !important;
  border-bottom-right-radius: var(--bs-border-radius) !important;
}

.pdf-layout-editor .pdf-canvas-container {
  position: relative;
  container-type: inline-size;
  background: white;
  border: 1px solid #ccc;
  aspect-ratio: 210/297;
}
.pdf-layout-editor .pdf-letterhead {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}
.pdf-layout-editor .pdf-sample-overlay {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  font-size: 1.68cqi;
  color: rgba(0, 0, 0, 0.4);
  line-height: 1.4;
}
.pdf-layout-editor svg.pdf-canvas {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.pdf-layout-editor .content-rect {
  fill: none;
  stroke: rgba(0, 120, 215, 0.6);
  stroke-width: 2;
  stroke-dasharray: 10 5;
}
.pdf-layout-editor .content-rect:hover {
  stroke: rgba(0, 120, 215, 0.9);
}
.pdf-layout-editor .edge-handle {
  fill: #0078d7;
  opacity: 0.5;
}
.pdf-layout-editor .edge-handle:hover, .pdf-layout-editor .edge-handle.dragging {
  opacity: 0.9;
}
.pdf-layout-editor .divider {
  fill: rgba(0, 120, 215, 0.08);
  stroke: rgba(0, 120, 215, 0.3);
  stroke-width: 1;
}
.pdf-layout-editor .divider:hover, .pdf-layout-editor .divider.dragging, .pdf-layout-editor .divider.resizing {
  fill: rgba(0, 120, 215, 0.15);
}
.pdf-layout-editor .sample-zone {
  position: absolute;
  overflow: hidden;
}
.pdf-layout-editor .sample-content {
  display: flex;
  flex-direction: column;
  padding: 0 1cqi;
}
.pdf-layout-editor .sample-head {
  margin-bottom: 1.5cqi;
}
.pdf-layout-editor .sample-sender {
  font-size: 0.8cqi;
  text-decoration: underline;
  margin-bottom: 1cqi;
}
.pdf-layout-editor .sample-head-columns {
  display: flex;
  align-items: flex-start;
}
.pdf-layout-editor .sample-head-left,
.pdf-layout-editor .sample-head-right {
  flex: 0 0 50%;
  padding: 0 1.75cqi;
}
.pdf-layout-editor .sample-doc-type {
  font-weight: bold;
  font-size: 1.8cqi;
}
.pdf-layout-editor table.sample-doc-info {
  margin-top: 0.5cqi;
  border-collapse: collapse;
  font-size: 1em;
}
.pdf-layout-editor table.sample-doc-info td {
  padding: 0 0 0.1cqi 0;
}
.pdf-layout-editor table.sample-doc-info td:first-child {
  padding-right: 1.5cqi;
}
.pdf-layout-editor .sample-subject {
  width: 100%;
  font-weight: bold;
  font-size: 1.3em;
  margin-top: 1.5cqi;
  margin-bottom: 0.5cqi;
  padding-left: 1.75cqi;
}
.pdf-layout-editor .sample-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.2cqi;
}
.pdf-layout-editor .sample-items th, .pdf-layout-editor .sample-items td {
  padding: 0.6cqi 0.5cqi;
  text-align: left;
  vertical-align: top;
}
.pdf-layout-editor .sample-items th {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  font-weight: 600;
  padding-bottom: 0.3cqi;
}
.pdf-layout-editor .sample-items td:nth-child(3),
.pdf-layout-editor .sample-items td:nth-child(5),
.pdf-layout-editor .sample-items td:nth-child(6),
.pdf-layout-editor .sample-items td:nth-child(7),
.pdf-layout-editor .sample-items th:nth-child(3),
.pdf-layout-editor .sample-items th:nth-child(5),
.pdf-layout-editor .sample-items th:nth-child(6),
.pdf-layout-editor .sample-items th:nth-child(7) {
  text-align: right;
}
.pdf-layout-editor .sample-items .sample-desc td {
  padding-top: 0;
  font-size: 0.9em;
}
.pdf-layout-editor .sample-closing {
  margin-top: 1.5cqi;
  font-size: 1.2cqi;
}
.pdf-layout-editor table.sample-summary {
  margin-left: auto;
  margin-top: 0.5cqi;
  border-collapse: collapse;
  font-size: 1.2cqi;
}
.pdf-layout-editor table.sample-summary td {
  padding: 0.2cqi 0;
}
.pdf-layout-editor table.sample-summary td:first-child {
  text-align: right;
  padding-right: 1.5cqi;
}
.pdf-layout-editor table.sample-summary td:last-child {
  text-align: right;
}
.pdf-layout-editor table.sample-summary .sample-total td {
  font-weight: bold;
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  padding-top: 0.4cqi;
}
.pdf-layout-editor .sample-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  text-align: center;
  padding-top: 0.5cqi;
  font-size: 1cqi;
}
.pdf-layout-editor .sample-footer-line {
  white-space: nowrap;
}

/* reports */
[data-bs-theme=dark] form#form-reportform span.assigned.bi-check-circle {
  color: #55df9f;
}
[data-bs-theme=dark] form#form-reportform span.assigned.bi-x-circle {
  color: #ff7784;
}
[data-bs-theme=dark] form#form-reportform span.collision {
  background-color: #815300;
}
[data-bs-theme=dark] form#form-reportform span.not_same_day {
  background-color: #8f222c;
}
[data-bs-theme=dark] form#form-reportform tr.even:not(.table-warning):not(.table-danger) td {
  background-color: #30353b;
}
[data-bs-theme=dark] form#form-reportform .table-warning td, [data-bs-theme=dark] form#form-reportform .table-danger td, [data-bs-theme=dark] form#form-reportform td.table-warning, [data-bs-theme=dark] form#form-reportform td.table-danger {
  color: var(--bs-table-bg) !important;
}
[data-bs-theme=dark] form#form-reportform .even.table-danger td, [data-bs-theme=dark] form#form-reportform .even td.table-danger {
  background-color: #612c31 !important;
}
[data-bs-theme=dark] form#form-reportform .even.table-warning td, [data-bs-theme=dark] form#form-reportform .even td.table-warning {
  background-color: #554a2f !important;
}
[data-bs-theme=dark] form#form-reportform .odd.table-danger td, [data-bs-theme=dark] form#form-reportform .odd td.table-danger {
  background-color: #53292d !important;
}
[data-bs-theme=dark] form#form-reportform .odd.table-warning td, [data-bs-theme=dark] form#form-reportform .warning td.table-danger {
  background-color: #453b24 !important;
}

div.reports_wrapper .reports-filters select[name=time_period],
div.reports_wrapper .reports-filters select[name=state],
div.reports_wrapper .reports-filters select[name=record_type],
div.reports_wrapper .reports-filters input[name=quota] {
  width: 120px;
}
div.reports_wrapper .reports-filters select[name="week_range_filter.start_cw"],
div.reports_wrapper .reports-filters select[name="week_range_filter.start_year"],
div.reports_wrapper .reports-filters select[name="week_range_filter.end_cw"],
div.reports_wrapper .reports-filters select[name="week_range_filter.end_year"],
div.reports_wrapper .reports-filters select[name="month_range_filter.start_month"],
div.reports_wrapper .reports-filters select[name="month_range_filter.start_year"],
div.reports_wrapper .reports-filters select[name="month_range_filter.end_month"],
div.reports_wrapper .reports-filters select[name="month_range_filter.end_year"] {
  width: 80px;
}
div.reports_wrapper .reports-filters input[name="date_range_filter.start_date"],
div.reports_wrapper .reports-filters input[name="date_range_filter.end_date"] {
  width: 100px;
}

#form-reportform {
  container-type: inline-size;
  container-name: reportform;
}
#form-reportform.user-reportform .reports_filters {
  grid-template-columns: repeat(auto-fit, minmax(140px, 140px));
}
#form-reportform.user-reportform .reports_filters #field-reportform-report_view {
  grid-column: span 2;
}
#form-reportform .reports_filters {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}
#form-reportform .reports_filters div.range, #form-reportform .reports_filters div.week-range-wrapper, #form-reportform .reports_filters div.month-range-wrapper {
  display: contents;
}
#form-reportform .reports_filters div.range .start-wrapper, #form-reportform .reports_filters div.range .end-wrapper, #form-reportform .reports_filters div.week-range-wrapper .start-wrapper, #form-reportform .reports_filters div.week-range-wrapper .end-wrapper, #form-reportform .reports_filters div.month-range-wrapper .start-wrapper, #form-reportform .reports_filters div.month-range-wrapper .end-wrapper {
  grid-column: span 2;
}
#form-reportform .reports_filters div.range .start-wrapper .field:nth-of-type(even) select, #form-reportform .reports_filters div.range .end-wrapper .field:nth-of-type(even) select, #form-reportform .reports_filters div.week-range-wrapper .start-wrapper .field:nth-of-type(even) select, #form-reportform .reports_filters div.week-range-wrapper .end-wrapper .field:nth-of-type(even) select, #form-reportform .reports_filters div.month-range-wrapper .start-wrapper .field:nth-of-type(even) select, #form-reportform .reports_filters div.month-range-wrapper .end-wrapper .field:nth-of-type(even) select {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
#form-reportform .reports_filters div.range .start-wrapper .field:nth-of-type(odd) select, #form-reportform .reports_filters div.range .end-wrapper .field:nth-of-type(odd) select, #form-reportform .reports_filters div.week-range-wrapper .start-wrapper .field:nth-of-type(odd) select, #form-reportform .reports_filters div.week-range-wrapper .end-wrapper .field:nth-of-type(odd) select, #form-reportform .reports_filters div.month-range-wrapper .start-wrapper .field:nth-of-type(odd) select, #form-reportform .reports_filters div.month-range-wrapper .end-wrapper .field:nth-of-type(odd) select {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
#form-reportform .reports_filters .span-2 {
  grid-column: span 2;
}
#form-reportform tr.even:not(.table-warning):not(.table-danger) td {
  background-color: #f1f3f5;
}
#form-reportform .entrydetails .entrydetailsvalue li {
  padding: 0 5px;
}
#form-reportform .entrydetails .entrydetailsvalue li > span {
  padding: 0 5px;
  border-radius: 4px;
  margin-left: -5px;
}
#form-reportform span.assigned.bi-check-circle {
  color: var(--bs-green);
}
#form-reportform span.assigned.bi-x-circle {
  color: var(--bs-red);
}
#form-reportform span.collision {
  background-color: #ffdda0;
}
#form-reportform span.not_same_day {
  background-color: #ffb5bc;
}
#form-reportform {
  /* report charts */
}
#form-reportform div#cone-chart {
  position: relative;
}
#form-reportform #report-chart[data-chart-type=pie_chart] .cone-chart {
  height: 500px !important;
}
@media (min-width: 1200px) {
  #form-reportform #report-chart[data-chart-type=bar_chart] {
    aspect-ratio: 3/1;
  }
}
@media (max-width: 1200px) {
  #form-reportform #report-chart[data-chart-type=bar_chart] .chart-container {
    aspect-ratio: 2/1 !important;
  }
}
@media (max-width: 768px) {
  #form-reportform #report-chart[data-chart-type=bar_chart] .chart-container {
    aspect-ratio: 1/1 !important;
  }
}
#form-reportform #report-chart[data-chart-type=bar_chart] .chart-container {
  aspect-ratio: 3/1;
}
#form-reportform #report-chart[data-chart-type=bar_chart] .chart-container .cone-chart {
  width: 100%;
  height: 100%;
}
#form-reportform div.reportfooter p.signature {
  width: 25em;
  height: 4em;
  border-bottom: #ccc 1px solid;
}

@container (min-width: 500px) and (max-width: 780px) {
  #form-reportform.user-reportform .reports_filters {
    grid-template-columns: repeat(2, 1fr);
  }
  #form-reportform.user-reportform .reports_filters #field-reportform-report_view {
    grid-column: span 1;
  }
}
@container (max-width: 500px) {
  #form-reportform .reports_filters {
    grid-template-columns: 1fr !important;
  }
  #form-reportform .reports_filters #field-reportform-report_view, #form-reportform .reports_filters .span-2 {
    grid-column: span 1 !important;
  }
  #form-reportform .reports_filters #input-reportform-show_report {
    margin-top: 0.5rem !important;
  }
}
/* user month time sheet */
#usermonthtimesheettable div.date.empty, #usermonthtimesheettable div.tasks.empty, #usermonthtimesheettable div.targettime.empty, #usermonthtimesheettable div.hours.empty, #usermonthtimesheettable div.overtime.empty, #usermonthtimesheettable div.bonus.empty,
#usermonthtimesheettable div.holiday.empty, #usermonthtimesheettable div.vacation.empty, #usermonthtimesheettable div.staffsick.empty, #usermonthtimesheettable div.comptime.empty {
  opacity: 0.5;
}
#usermonthtimesheettable div.date.bold, #usermonthtimesheettable div.tasks.bold, #usermonthtimesheettable div.targettime.bold, #usermonthtimesheettable div.hours.bold, #usermonthtimesheettable div.overtime.bold, #usermonthtimesheettable div.bonus.bold,
#usermonthtimesheettable div.holiday.bold, #usermonthtimesheettable div.vacation.bold, #usermonthtimesheettable div.staffsick.bold, #usermonthtimesheettable div.comptime.bold {
  text-shadow: 0 0 black;
}
#usermonthtimesheettable .table-weekend {
  --bs-table-bg: rgba(237, 249, 192, 0.4);
  --bs-table-border-color: rgba(182, 196, 120, 0.4);
  --bs-table-striped-bg: rgba(227, 239, 166, 0.4);
  --bs-table-active-bg: rgba(215, 227, 142, 0.4);
  --bs-table-hover-bg: rgba(220, 232, 152, 0.4);
  color: var(--bs-table-color);
  border-color: var(--bs-table-border-color);
}
#usermonthtimesheettable .table-holiday {
  --bs-table-bg: rgba(228, 192, 248, 0.4);
  --bs-table-border-color: rgba(173, 127, 207, 0.4);
  --bs-table-striped-bg: rgba(214, 172, 236, 0.4);
  --bs-table-active-bg: rgba(201, 150, 223, 0.4);
  --bs-table-hover-bg: rgba(208, 160, 230, 0.4);
  color: var(--bs-table-color);
  border-color: var(--bs-table-border-color);
}
#usermonthtimesheettable .table-vacation {
  --bs-table-bg: rgba(173, 226, 242, 0.4);
  --bs-table-border-color: rgba(118, 176, 198, 0.4);
  --bs-table-striped-bg: rgba(150, 210, 227, 0.4);
  --bs-table-active-bg: rgba(127, 192, 214, 0.4);
  --bs-table-hover-bg: rgba(138, 201, 222, 0.4);
  color: var(--bs-table-color);
  border-color: var(--bs-table-border-color);
}
#usermonthtimesheettable .table-staffsick {
  --bs-table-bg: rgba(249, 237, 145, 0.4);
  --bs-table-border-color: rgba(196, 173, 90, 0.4);
  --bs-table-striped-bg: rgba(236, 223, 123, 0.4);
  --bs-table-active-bg: rgba(223, 209, 101, 0.4);
  --bs-table-hover-bg: rgba(229, 216, 112, 0.4);
  color: var(--bs-table-color);
  border-color: var(--bs-table-border-color);
}
#usermonthtimesheettable .table-comptime {
  --bs-table-bg: rgba(188, 247, 194, 0.4);
  --bs-table-border-color: rgba(137, 195, 144, 0.4);
  --bs-table-striped-bg: rgba(167, 232, 172, 0.4);
  --bs-table-active-bg: rgba(145, 216, 150, 0.4);
  --bs-table-hover-bg: rgba(156, 224, 161, 0.4);
  color: var(--bs-table-color);
  border-color: var(--bs-table-border-color);
}

/* dashboard: first child height follows sibling, list scrolls */
.dashboard-content #upcoming_tasks {
  position: relative;
}
.dashboard-content #upcoming_tasks > .card {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--bs-gutter-x) * 0.5);
  right: calc(var(--bs-gutter-x) * 0.5);
  display: flex;
  flex-direction: column;
}
.dashboard-content #upcoming_tasks > .card > .list-group {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* dashboard report tabs: keep inactive panes rendered so Chart.js
   gets proper dimensions on initial load */
.dashboard-report-tabs {
  position: relative;
}
.dashboard-report-tabs > .tab-pane:not(.active) {
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  z-index: -1;
}

@media screen and (max-width: 767.9px) {
  #dashboard-user-report .dashboard-chart > div:is(:first-of-type) {
    border-bottom: 1px solid var(--bs-border-color);
  }
}
@media screen and (min-width: 768px) {
  #dashboard-user-report .dashboard-chart > div:is(:first-of-type) {
    border-right: 1px solid var(--bs-border-color);
  }
}
/* workflow states */
.state-draft,
.state-draft a {
  color: var(--bs-warning) !important;
}

.state-active,
.state-active a {
  color: var(--bs-success) !important;
}

.state-hold,
.state-hold a {
  color: var(--bs-danger) !important;
}

.state-finished,
.state-finished a {
  color: #7936f1 !important;
}

[data-bs-theme=dark] .state-draft,
[data-bs-theme=dark] .state-draft a, #sidebar_left .state-draft,
#sidebar_left .state-draft a {
  color: #ffdb72 !important;
}
[data-bs-theme=dark] .state-active,
[data-bs-theme=dark] .state-active a, #sidebar_left .state-active,
#sidebar_left .state-active a {
  color: #55df9f !important;
}
[data-bs-theme=dark] .state-hold,
[data-bs-theme=dark] .state-hold a, #sidebar_left .state-hold,
#sidebar_left .state-hold a {
  color: #ff7784 !important;
}
[data-bs-theme=dark] .state-finished,
[data-bs-theme=dark] .state-finished a, #sidebar_left .state-finished,
#sidebar_left .state-finished a {
  color: #b991ff !important;
}

html {
  --month_a_bg: #e0e5c6;
  --month_a_striped_bg: #f4f5df;
  --month_b_bg: #dad2f3;
  --month_b_striped_bg: #e7e1f9;
  --month_a_weekend_bg: #d9ddac;
  --month_a_weekend_striped_bg: #e9ecbf;
  --month_b_weekend_bg: #d1c9ed;
  --month_b_weekend_striped_bg: #e1d9fb;
  --target_time_bg: #cccdcf;
}

html[data-bs-theme=dark] {
  --month_a_bg: #6a6f51;
  --month_a_striped_bg: #585b47;
  --month_b_bg: #524c66;
  --month_b_striped_bg: #46405a;
  --month_a_weekend_bg: #595c41;
  --month_a_weekend_striped_bg: #4e5038;
  --month_b_weekend_bg: #4b4360;
  --month_b_weekend_striped_bg: #403a54;
  --target_time_bg: #3c3c3d;
}

.week_rows table.table tr div.month_a, .week_rows table.table tr div.month_b {
  padding: 0.25rem;
}
.week_rows table.table tr div.month_a > span, .week_rows table.table tr div.month_b > span {
  padding: 0.25rem;
}
.week_rows table.table tr.even div.month_a {
  background-color: var(--month_a_bg);
}
.week_rows table.table tr.even div.month_a.weekend {
  background-color: var(--month_a_weekend_bg);
}
.week_rows table.table tr.even div.month_b {
  background-color: var(--month_b_bg);
}
.week_rows table.table tr.even div.month_b.weekend {
  background-color: var(--month_b_weekend_bg);
}
.week_rows table.table tr.odd div.month_a {
  background-color: var(--month_a_striped_bg);
}
.week_rows table.table tr.odd div.month_a.weekend {
  background-color: var(--month_a_weekend_striped_bg);
}
.week_rows table.table tr.odd div.month_b {
  background-color: var(--month_b_striped_bg);
}
.week_rows table.table tr.odd div.month_b.weekend {
  background-color: var(--month_b_weekend_striped_bg);
}
.week_rows table.table tr td {
  padding: 0;
}

#usertimemodeltable_table {
  table-layout: fixed;
  min-width: 1000px;
}
#usertimemodeltable_table .calendar_week {
  display: flex;
  flex-wrap: wrap;
  white-space: nowrap;
  padding-left: 0.5em;
}
#usertimemodeltable_table .calendar_week .calendar_actions {
  display: flex;
  gap: 0.5em;
}

#yeartemplatetable_table td, #usertimemodeltable_table td {
  width: 6%;
  border: none;
  padding-top: 0;
  padding-right: 0;
}
#yeartemplatetable_table tr:first-child, #usertimemodeltable_table tr:first-child {
  width: 100%;
}
#yeartemplatetable_table .target_time_wrapper, #usertimemodeltable_table .target_time_wrapper {
  background-color: var(--target_time_bg);
}
#yeartemplatetable_table td div.calendar_week .dropdown, #usertimemodeltable_table td div.calendar_week .dropdown {
  display: inline-block;
}
#yeartemplatetable_table td div.text, #usertimemodeltable_table td div.text {
  padding: 0.2em;
  font-size: 0.9em;
}
#yeartemplatetable_table div.month_a, #yeartemplatetable_table div.month_b, #usertimemodeltable_table div.month_a, #usertimemodeltable_table div.month_b {
  padding: 0;
}

#usertimemodeltable_table tr.even td.month_a {
  background-color: var(--month_a_bg);
}
#usertimemodeltable_table tr.even td.month_a.weekend {
  background-color: var(--month_a_weekend_bg);
}
#usertimemodeltable_table tr.even td.month_b {
  background-color: var(--month_b_bg);
}
#usertimemodeltable_table tr.even td.month_b.weekend {
  background-color: var(--month_b_weekend_bg);
}
#usertimemodeltable_table tr.odd td.month_a {
  background-color: var(--month_a_striped_bg);
}
#usertimemodeltable_table tr.odd td.month_a.weekend {
  background-color: var(--month_a_weekend_striped_bg);
}
#usertimemodeltable_table tr.odd td.month_b {
  background-color: var(--month_b_striped_bg);
}
#usertimemodeltable_table tr.odd td.month_b.weekend {
  background-color: var(--month_b_weekend_striped_bg);
}
#usertimemodeltable_table tr td.month_a, #usertimemodeltable_table tr td.month_b {
  --bs-table-striped-bg: transparent;
}

#yeartemplatetable_table tr.even td:not(.calendarweek) .col {
  background-color: var(--month_a_bg);
}
#yeartemplatetable_table tr.even td:not(.calendarweek) .weekend {
  background-color: var(--month_a_weekend_bg);
}
#yeartemplatetable_table tr.odd td:not(.calendarweek) .col {
  background-color: var(--month_b_bg);
}
#yeartemplatetable_table tr.odd td:not(.calendarweek) .weekend {
  background-color: var(--month_b_weekend_bg);
}

#array-cwtemplateform-mapping thead {
  display: none;
}
#array-cwtemplateform-mapping tbody tr td {
  padding-left: 0;
}
@media (min-width: 992px) {
  #array-cwtemplateform-mapping table tbody {
    display: flex;
    padding-right: 10px;
    gap: 0.75rem;
  }
  #array-cwtemplateform-mapping td.widget {
    border: 0;
  }
}

.week_rows td div.calendar_week, .week_rows td div.month_a, .week_rows td div.month_b {
  padding: 0.25rem;
}

/* resource masterdata form */
#display-resource_masterdata_form-caldav_org_url_warning {
  color: var(--bs-warning) !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 1rem;
}
#display-resource_masterdata_form-caldav_org_url_warning::before {
  content: "\f335";
  font-family: "bootstrap-icons";
  vertical-align: bottom;
  margin-right: 0.4rem;
}

/* todo note form */
#form-todonoteform #field-todonoteform-duedate label {
  display: block;
  clear: both;
}
#form-todonoteform #display-todonoteform-title {
  border: none;
  padding-left: 0;
}
#form-todonoteform #display-todonoteform-related {
  border: none;
  box-shadow: none;
  padding-left: 0;
  list-style-type: none;
}

#input-todonoteform-priority-1 {
  color: lightblue;
}

#input-todonoteform-priority-2 {
  color: rgb(214, 214, 0);
}

#input-todonoteform-priority-3 {
  color: orange;
}

#input-todonoteform-priority-4 {
  color: red;
}

#input-todonoteform-priority option {
  padding: 4px;
}

/* todo notes listing */
.todo-notes-listing .todo_tag:not(.bug):not(.feature):not(.issue) {
  background: #e3e3e3;
  border-color: #858585 !important;
  color: #858585;
  font-weight: normal;
}
.todo-notes-listing .todo_tag {
  height: min-content;
  font-size: 10px;
}
.todo-notes-listing .todo_tag.bug {
  background: #ff9d9d;
  border-color: #af0000 !important;
}
.todo-notes-listing .todo_tag.feature {
  background: #f7eea4;
  color: #918100;
  border-color: #918100 !important;
}
.todo-notes-listing .todo_tag.issue {
  background: #9fd2f1;
  color: #0d6093;
  border-color: #0d6093 !important;
}
.todo-notes-listing a {
  color: inherit;
}
.todo-notes-listing .card-footer .todo-footer-content + small.fw-bold::before {
  content: "";
  border-left: 1px solid var(--bs-body-color);
  padding-right: 0.5rem;
  margin-left: 0.25rem;
}

[data-bs-theme=dark] .todo-notes-listing .todo_tag:not(.bug):not(.feature):not(.issue) {
  background: #6b6b6b;
  border-color: #878787 !important;
  color: #cfcfcf;
  font-weight: normal;
}
[data-bs-theme=dark] .todo-notes-listing .todo_tag.bug {
  background: #af0000;
  color: #ffb7b7;
  border-color: #ff9d9d !important;
}
[data-bs-theme=dark] .todo-notes-listing .todo_tag.feature {
  background: #918100;
  color: #f7eea4;
  border-color: #f7eea4 !important;
}
[data-bs-theme=dark] .todo-notes-listing .todo_tag.issue {
  background: #0d6093;
  color: #9fd2f1;
  border-color: #9fd2f1 !important;
}

/* todo notes filters */
.todo-notes-filter {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.5rem !important;
}
.todo-notes-filter .datetime {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.todo-notes-filter .datetime .input-group {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.todo-notes-filter .datetime .datepicker-trigger {
  border-top-right-radius: var(--bs-border-radius) !important;
  border-bottom-right-radius: var(--bs-border-radius) !important;
}

#upcoming_tasks .overdue-todo {
  width: 8px;
  height: 8px;
  vertical-align: middle;
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

/* quick tracking */
#quick_tracking {
  container-type: inline-size;
}
@container (max-width: 290px) {
  #quick_tracking #timeticker {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }
  #quick_tracking #timeticker .time-elapsed {
    grid-column: span 4;
    margin-bottom: 0.75rem;
  }
  #quick_tracking #timeticker button[data-bs-target="#quick_tracking_content"] {
    margin-left: 0 !important;
    grid-column: span 1;
    max-width: min-content;
  }
  #quick_tracking #timeticker a.action_start_stop {
    grid-column: span 3;
    max-width: min-content;
  }
  #quick_tracking #timeticker #quick_tracking_content {
    grid-column: span 4;
  }
  #quick_tracking #timeticker .quick_task {
    grid-column: span 4;
  }
}
#quick_tracking span.start_tracking {
  color: #55df9f !important;
}
#quick_tracking span.stop_tracking {
  color: #ff7784 !important;
}
