:root {
  --pt-primary: #198754;
  --pt-primary-rgb: 25, 135, 84;
  --pt-primary-hover: #157347;
  --pt-primary-active: #146c43;
  --pt-primary-border: #146c43;
  --pt-primary-subtle: #d1e7dd;
  --pt-primary-text: #0f5132;
  --pt-primary-ring: 25, 135, 84;

  --bs-primary: var(--pt-primary);
  --bs-primary-rgb: var(--pt-primary-rgb);
  --bs-primary-bg-subtle: var(--pt-primary-subtle);
  --bs-primary-border-subtle: #a3cfbb;
  --bs-primary-text-emphasis: var(--pt-primary-text);
  --bs-link-color: var(--pt-primary);
  --bs-link-hover-color: var(--pt-primary-hover);
  --bs-focus-ring-rgb: var(--pt-primary-ring);
}

body.bg-body-tertiary {
  background-color: #f4f7f4 !important;
  background-image:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.82) 22%, transparent 48%),
    radial-gradient(circle at 18% 28%, rgba(229, 236, 230, 0.88) 0%, rgba(229, 236, 230, 0.3) 24%, transparent 52%),
    radial-gradient(circle at bottom right, rgba(209, 231, 221, 0.92) 0%, rgba(209, 231, 221, 0.42) 26%, transparent 54%),
    linear-gradient(135deg, #fbfcfb 0%, #eef3ef 42%, #d9ebe0 100%);
  background-attachment: fixed;
}

.bg-primary {
  background-color: var(--pt-primary) !important;
}

.text-primary {
  color: var(--pt-primary) !important;
}

.btn-primary {
  --bs-btn-bg: var(--pt-primary);
  --bs-btn-border-color: var(--pt-primary);
  --bs-btn-hover-bg: var(--pt-primary-hover);
  --bs-btn-hover-border-color: var(--pt-primary-hover);
  --bs-btn-active-bg: var(--pt-primary-active);
  --bs-btn-active-border-color: var(--pt-primary-active);
  --bs-btn-disabled-bg: var(--pt-primary);
  --bs-btn-disabled-border-color: var(--pt-primary);
}

.btn-outline-primary {
  --bs-btn-color: var(--pt-primary);
  --bs-btn-border-color: var(--pt-primary);
  --bs-btn-hover-bg: var(--pt-primary);
  --bs-btn-hover-border-color: var(--pt-primary);
  --bs-btn-active-bg: var(--pt-primary-active);
  --bs-btn-active-border-color: var(--pt-primary-active);
  --bs-btn-disabled-color: var(--pt-primary);
  --bs-btn-disabled-border-color: var(--pt-primary);
}

.form-control:focus,
.form-select:focus,
.btn:focus-visible {
  border-color: rgba(var(--pt-primary-rgb), 0.5);
  box-shadow: 0 0 0 0.25rem rgba(var(--pt-primary-rgb), 0.2);
}

.navbar.bg-primary {
  background: linear-gradient(90deg, #156b43 0%, var(--pt-primary) 100%) !important;
}

.card.rounded-4,
.alert.rounded-4,
.btn.rounded-4,
.form-control.rounded-4,
.form-select.rounded-4 {
  border-radius: var(--bs-border-radius-xl) !important;
}

.card {
  overflow: hidden;
}

.form-floating>.form-control,
.form-floating>.form-select {
  min-height: calc(3.5rem + 2px);
}

.form-floating>textarea.form-control {
  min-height: 7rem;
}

.employee-filter-btn {
  min-height: calc(3.5rem + 2px);
}

.employee-report-summary-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  min-height: 8rem;
}

.employee-report-summary-card::before {
  content: "";
  position: absolute;
  top: 1.25rem;
  bottom: 1.25rem;
  left: 50%;
  width: 1px;
  background: rgba(var(--pt-primary-rgb), 0.16);
  transform: translateX(-50%);
}

.employee-report-summary-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.25rem 1rem;
  text-align: center;
}

.employee-report-summary-icon {
  width: 2.9rem;
  height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(var(--pt-primary-rgb), 0.14);
  color: var(--pt-primary);
  font-size: 1.2rem;
}

.employee-report-summary-label {
  max-width: 100%;
  color: var(--bs-secondary-color);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.15;
  text-transform: uppercase;
}

.employee-report-summary-value {
  max-width: 100%;
  color: var(--bs-body-color);
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  font-weight: 800;
  line-height: 1;
  word-break: keep-all;
}

.report-date-picker {
  position: relative;
  flex: 1 1 34rem;
  max-width: 46rem;
}

.report-date-picker input[type="date"] {
  position: absolute !important;
  inset: auto !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.report-date-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(4.25rem, 1fr));
  flex: 1 1 auto;
  overflow: hidden;
  padding: 0.45rem;
  border: 1px solid rgba(var(--pt-primary-rgb), 0.32);
  border-radius: 1rem;
  background: rgba(var(--bs-body-bg-rgb), 0.86);
  box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.08);
}

.report-date-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 3.6rem;
  border: 0;
  background: transparent;
  color: var(--bs-body-color);
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.report-date-day:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  right: 0;
  bottom: 0.35rem;
  width: 1px;
  background: rgba(var(--pt-primary-rgb), 0.12);
}

.report-date-day.active::after {
  right: -0.45rem;
}

.report-date-day span {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.report-date-day strong {
  font-size: 1.35rem;
  line-height: 1;
}

.report-date-day.weekend span {
  color: #dc3545;
}

.report-date-day:hover {
  background-color: rgba(var(--pt-primary-rgb), 0.08);
}

.report-date-day.active {
  margin-inline: 0.45rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--pt-primary) 0%, #087344 100%);
  color: #fff;
  box-shadow: 0 0.85rem 1.35rem rgba(var(--pt-primary-rgb), 0.28);
  transform: scale(1.02);
}

.report-date-day.active span,
.report-date-day.active.weekend span {
  color: #fff;
}

.report-date-nav {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.9rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.1);
}

.report-date-nav:hover {
  border-color: rgba(var(--pt-primary-rgb), 0.45);
  color: var(--pt-primary);
}

.report-calendar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  margin-left: 3.2rem;
  padding: 0.15rem 0.35rem;
  border: 0;
  color: var(--pt-primary);
  font-weight: 600;
}

.report-calendar-link:hover {
  color: var(--pt-primary-hover);
}

.choices-floating {
  position: relative;
}

.choices-floating>label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  max-width: 100%;
  height: 100%;
  padding: 1rem .75rem;
  overflow: hidden;
  color: rgba(var(--bs-body-color-rgb), .65);
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  border: var(--bs-border-width) solid transparent;
  transform-origin: 0 0;
  transition: opacity .1s ease-in-out, transform .1s ease-in-out;
}

.choices-floating .choices.choices-bootstrap[data-type*="select-one"] .choices__inner {
  min-height: calc(3.5rem + 2px);
  padding: 1rem .75rem;
  padding-top: 1.625rem;
  padding-bottom: .625rem;
}

.choices-floating .choices.choices-bootstrap[data-type*="select-multiple"] .choices__inner {
  min-height: calc(3.5rem + 2px);
  margin-top: 2px;
  display: flex;
  align-items: flex-start;
  padding: 1rem .75rem;
  padding-top: 1.625rem;
  padding-bottom: .625rem;
}

.choices-floating .choices.choices-bootstrap[data-type*="select-multiple"] .choices__list--multiple {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  gap: .35rem;
  margin: 0;
  min-height: 1.5rem;
}

.choices-floating .choices.choices-bootstrap[data-type*="select-multiple"] .choices__list--multiple .choices__item {
  margin: 0;
}

.choices-floating .choices.choices-bootstrap[data-type*="select-multiple"] .choices__list--multiple .choices__input,
.choices-floating .choices.choices-bootstrap[data-type*="select-multiple"] .choices__input--cloned {
  flex: 1 1 8rem;
  align-self: center;
  min-width: 8rem;
  width: auto !important;
  margin: 0;
  padding: 0;
}

.choices-floating:not(.is-filled):not(.is-focused) .choices.choices-bootstrap .choices__list--single .choices__item {
  color: transparent;
}

.choices-floating.is-filled>label,
.choices-floating.is-focused>label,
.choices-floating .choices.choices-bootstrap.is-open~label,
.choices-floating .choices.choices-bootstrap.is-focused~label {
  background-color: var(--bs-body-bg);
  height: auto;
  margin-left: 0.45rem;
  padding: 0 .35rem;
  transform: scale(.85) translateY(-.5rem) translateX(.15rem);
}

/* Tema dark: migliora evidenziazione opzioni Choices */
html[data-bs-theme="dark"] .choices {
  --choices-highlighted-color: #334155;
  /* slate-700 circa */
}

html[data-bs-theme="dark"] .choices__list--dropdown .choices__item--selectable.is-highlighted,
html[data-bs-theme="dark"] .choices__list--dropdown .choices__item--selectable.is-selected,
html[data-bs-theme="dark"] .choices__list[aria-expanded] .choices__item--selectable.is-highlighted,
html[data-bs-theme="dark"] .choices__list[aria-expanded] .choices__item--selectable.is-selected {
  background-color: var(--choices-highlighted-color) !important;
  color: #e2e8f0;
  /* testo leggibile */
}

.price-input-group>.form-control {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.price-input-group>.input-group-text {
  background-color: var(--bs-tertiary-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-secondary-color);
  font-weight: 600;
}

.price-input-group:focus-within>.input-group-text {
  border-color: rgba(var(--pt-primary-rgb), 0.5);
}

.choices.choices-bootstrap {
  margin-bottom: 0;
}

.choices.choices-bootstrap[data-type*="select-one"] .choices__inner {
  min-height: calc(3.5rem + 2px);
  padding: 0.95rem 4.75rem 0.95rem 1rem;
}

.choices.choices-bootstrap .choices__inner {
  background-color: var(--bs-body-bg);
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-xl);
  color: var(--bs-body-color);
  font-size: 1rem;
  line-height: 1.5;
  min-height: calc(2.5rem + 2px);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.choices.choices-bootstrap.is-focused .choices__inner,
.choices.choices-bootstrap.is-open .choices__inner {
  border-color: rgba(var(--pt-primary-rgb), 0.5);
  box-shadow: 0 0 0 0.25rem rgba(var(--pt-primary-rgb), 0.2);
}

.choices.choices-bootstrap .choices__input {
  background-color: transparent;
  color: var(--bs-body-color);
  margin-bottom: 0;
}

.choices.choices-bootstrap .choices__placeholder {
  color: var(--bs-secondary-color);
  opacity: 1;
}

.choices.choices-bootstrap .choices__list--single {
  padding: 0;
}

.choices.choices-bootstrap .choices__list--dropdown,
.choices.choices-bootstrap .choices__list[aria-expanded] {
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-xl);
  box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.12);
  color: var(--bs-body-color);
  margin-top: 0.35rem;
  overflow: hidden;
  z-index: 1040;
}

.choices.choices-bootstrap .choices__list--dropdown .choices__item,
.choices.choices-bootstrap .choices__list[aria-expanded] .choices__item {
  padding: 0.65rem 1rem;
}

.choices.choices-bootstrap.choices-hide-until-search .choices__list--dropdown .choices__item--choice,
.choices.choices-bootstrap.choices-hide-until-search .choices__list[aria-expanded] .choices__item--choice {
  display: none;
}

.choices-search-floor-hint {
  display: none;
}

.choices.choices-bootstrap.choices-hide-until-search.is-open .choices-search-floor-hint {
  display: block;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
  background-color: var(--bs-tertiary-bg);
}

.choices.choices-bootstrap .choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices.choices-bootstrap .choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
  background-color: rgba(var(--pt-primary-rgb), 0.12);
  color: var(--bs-body-color);
}

.choices.choices-bootstrap[data-type*="select-one"]::after {
  border-color: var(--bs-secondary-color) transparent transparent;
  right: 1rem;
}

.choices.choices-bootstrap[data-type*="select-one"].is-open::after {
  border-color: transparent transparent var(--bs-secondary-color);
}

.choices-clear-btn {
  position: absolute;
  top: 50%;
  right: 2.5rem;
  z-index: 5;
  transform: translateY(-50%);
  width: 1.9rem;
  height: 1.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--bs-secondary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.choices-clear-btn:hover,
.choices-clear-btn:focus {
  background: rgba(var(--pt-primary-rgb), 0.1);
  color: var(--bs-body-color);
}

.choices-clear-btn[hidden] {
  display: none !important;
}

.choices-clear-btn i {
  font-size: 0.8rem;
  line-height: 1;
}

.admin-table-scroll {
  max-height: clamp(20rem, calc(100vh - 22rem), 42rem);
  overflow: auto;
}

.admin-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--bs-primary-bg-subtle);
  box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

.recipient-step,
.recipient-layout-col {
  transition: none;
}

.recipient-step-hidden {
  display: none;
}

.recipient-step-visible .form-floating,
.recipient-step-visible .choices,
.recipient-step-visible .input-group {
  animation: recipientStepIn 0.24s ease;
}

@keyframes recipientStepIn {
  from {
    opacity: 0;
    transform: translateX(0.5rem);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.brand-logo-icon {
  font-size: 1.35rem;
  line-height: 1;
  display: inline-block;
  font-variation-settings:
    "FILL" 1,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
}

.password-field {
  position: relative;
}

.password-field .form-control {
  padding-right: 3.5rem;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  z-index: 5;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  padding: 0.35rem 0.6rem;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
  color: var(--bs-body-color);
  background: rgba(255, 255, 255, 0.12);
}

.site-auth-main {
  min-height: calc(100vh - 8.5rem);
}

.site-auth-layout {
  z-index: 1;
}

.site-auth-card {
  background:
    linear-gradient(180deg, rgba(var(--bs-body-bg-rgb), 0.99) 0%, rgba(var(--bs-body-bg-rgb), 0.96) 100%);
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.08) !important;
}

.site-auth-icon,
.site-auth-security-icon {
  width: 4rem;
  height: 4rem;
  background: rgba(var(--pt-primary-rgb), 0.12);
  color: var(--pt-primary);
  font-size: 1.6rem;
}

.site-auth-title {
  color: var(--bs-body-color);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-auth-description {
  max-width: 18rem;
  font-size: 1.02rem;
}

.site-auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--bs-secondary-color);
}

.site-auth-divider::before,
.site-auth-divider::after {
  content: "";
  flex: 1 1 auto;
  border-top: 1px solid var(--bs-border-color);
}

.site-auth-divider span {
  white-space: nowrap;
}

.site-auth-security {
  max-width: 28rem;
}

.site-auth-security-icon {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.35rem;
}

.admin-shell {
  --admin-sidebar-width: 240px;
}

.admin-mobile-header {
  background: linear-gradient(90deg, #156b43 0%, var(--pt-primary) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: 3rem 1fr 3rem;
}

.admin-mobile-brand {
  min-width: 0;
  color: #fff;
}

.admin-mobile-brand .admin-brand-text {
  max-width: 12.5rem;
}

.admin-mobile-brand .admin-brand-title,
.admin-mobile-brand .admin-brand-subtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-mobile-icon-btn {
  width: 3rem;
  height: 3rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
}

.admin-mobile-icon-btn:hover,
.admin-mobile-icon-btn:focus,
.admin-mobile-icon-btn:active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.22) !important;
}


.admin-sidebar {
  flex: 0 0 var(--admin-sidebar-width);
  width: var(--admin-sidebar-width);
  background: linear-gradient(180deg, #156b43 0%, var(--pt-primary) 100%);
  color: #fff;
  overflow: hidden;
  transition: width 0.28s ease, flex-basis 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.admin-brand {
  color: #fff !important;
  transition: gap 0.24s ease;
}

.admin-brand-logo-icon {
  font-size: 2rem;
  line-height: 1;
  display: inline-block;
  font-variation-settings:
    "FILL" 1,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
}

.admin-brand-text {
  min-width: 0;
  line-height: 1.05;
  max-width: 12rem;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.24s ease, max-width 0.24s ease;
}

.admin-brand-title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.admin-brand-subtitle {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.navbar-brand.admin-brand .admin-brand-text {
  max-width: none;
}

.admin-content {
  min-width: 0;
}

.admin-page-header {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color-translucent);
  color: var(--bs-body-color);
}

.admin-page-icon {
  width: 3rem;
  height: 3rem;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
  font-size: 1.15rem;
}

.admin-page-divider {
  min-height: 2.5rem;
}

.admin-nav-link,
.admin-subnav-link {
  color: rgba(255, 255, 255, 0.92);
  border: 0;
}

.admin-nav-link:hover,
.admin-subnav-link:hover,
.admin-nav-link:focus,
.admin-subnav-link:focus {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.admin-nav-link.active,
.admin-subnav-link.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.admin-nav-link,
.admin-subnav-link {
  justify-content: flex-start;
}

.admin-sidebar-note {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
}

.admin-sidebar-chevron {
  margin-left: auto;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.admin-filters-toggle .bi {
  transition: transform 0.2s ease;
}

.admin-filters-toggle[aria-expanded="true"] .bi {
  transform: rotate(180deg);
}

.admin-nav-link[aria-expanded="true"] .admin-sidebar-chevron {
  transform: rotate(180deg);
}

.admin-stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  font-size: 1.15rem;
}

.dashboard-metric-card,
.dashboard-section-card {
  background:
    linear-gradient(180deg, rgba(var(--bs-body-bg-rgb), 0.98) 0%, rgba(var(--bs-body-bg-rgb), 0.94) 100%);
}

.dashboard-metric-icon {
  width: 3.25rem;
  height: 3.25rem;
}

.dashboard-metric-value {
  font-size: clamp(1.9rem, 2vw, 2.45rem);
  line-height: 1;
}

.dashboard-link-card {
  background: rgba(var(--bs-emphasis-color-rgb), 0.015);
  border-color: var(--bs-border-color-translucent) !important;
}

.dashboard-summary-row {
  background: rgba(var(--bs-emphasis-color-rgb), 0.03);
  border: 1px solid var(--bs-border-color-translucent);
  padding: 0.95rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-summary-label {
  color: var(--bs-secondary-color);
}

html[data-bs-theme="dark"] .dashboard-link-card,
html[data-bs-theme="dark"] .dashboard-summary-row {
  background: rgba(255, 255, 255, 0.03);
}

.admin-sidebar .border-top,
.admin-sidebar .border-bottom {
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.admin-sidebar .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}

.admin-sidebar .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.admin-sidebar .offcanvas-body {
  flex: 1 1 auto;
  min-height: 0;
}

.admin-sidebar-footer {
  margin-top: auto;
}

.admin-sidebar-label {
  display: inline-block;
  max-width: 12rem;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.24s ease, max-width 0.24s ease;
}

.admin-sidebar-user {
  overflow: hidden;
  max-height: 5rem;
  transition:
    opacity 0.2s ease,
    transform 0.24s ease,
    max-height 0.24s ease,
    margin 0.24s ease,
    padding 0.24s ease,
    border-color 0.24s ease;
}

.admin-sidebar-tools {
  grid-template-columns: repeat(3, 1fr);
}

.admin-sidebar-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 100%;
  height: 3rem;
  padding: 0;
}

.admin-sidebar-icon-btn:hover,
.admin-sidebar-icon-btn:focus,
.admin-sidebar-icon-btn:active {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.admin-logout-btn {
  background: rgba(255, 255, 255, 0.12);
}

.admin-logout-btn:hover,
.admin-logout-btn:focus,
.admin-logout-btn:active {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

.admin-sidebar-icon-btn i {
  font-size: 1rem;
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --pt-primary: #146c43;
  --pt-primary-rgb: 20, 108, 67;
  --pt-primary-hover: #0f5132;
  --pt-primary-active: #0c4128;
  --pt-primary-border: #0f5132;
  --pt-primary-subtle: rgba(20, 108, 67, 0.22);
  --pt-primary-text: #bbf7d0;
  --pt-primary-ring: 20, 108, 67;

  --bs-primary: var(--pt-primary);
  --bs-primary-rgb: var(--pt-primary-rgb);
  --bs-primary-bg-subtle: var(--pt-primary-subtle);
  --bs-primary-border-subtle: rgba(20, 108, 67, 0.36);
  --bs-primary-text-emphasis: var(--pt-primary-text);
  --bs-link-color: #86efac;
  --bs-link-hover-color: #bbf7d0;
  --bs-focus-ring-rgb: var(--pt-primary-ring);
}

html[data-bs-theme="dark"] .admin-sidebar {
  background: linear-gradient(180deg, #0d4f36 0%, #0f3d2c 100%);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
}

html[data-bs-theme="dark"] body.bg-body-tertiary {
  background-color: #0f1512 !important;
  background-image:
    radial-gradient(circle at top left, rgba(26, 41, 33, 0.94) 0%, rgba(26, 41, 33, 0.3) 24%, transparent 48%),
    radial-gradient(circle at bottom right, rgba(20, 108, 67, 0.22) 0%, rgba(20, 108, 67, 0.08) 28%, transparent 56%),
    linear-gradient(135deg, #0f1512 0%, #131d18 45%, #183526 100%);
}

html[data-bs-theme="dark"] .admin-sidebar .border-top,
html[data-bs-theme="dark"] .admin-sidebar .border-bottom {
  border-color: rgba(148, 163, 184, 0.16) !important;
}

html[data-bs-theme="dark"] .admin-brand,
html[data-bs-theme="dark"] .admin-nav-link,
html[data-bs-theme="dark"] .admin-subnav-link {
  color: rgba(248, 250, 252, 0.94) !important;
}

html[data-bs-theme="dark"] .admin-brand-subtitle {
  color: rgba(226, 232, 240, 0.68);
}

html[data-bs-theme="dark"] .admin-nav-link:hover,
html[data-bs-theme="dark"] .admin-subnav-link:hover,
html[data-bs-theme="dark"] .admin-nav-link:focus,
html[data-bs-theme="dark"] .admin-subnav-link:focus {
  background: rgba(148, 163, 184, 0.14);
  color: #fff !important;
}

html[data-bs-theme="dark"] .admin-nav-link.active,
html[data-bs-theme="dark"] .admin-subnav-link.active {
  background: rgba(25, 135, 84, 0.28);
  color: #dcfce7 !important;
}

html[data-bs-theme="dark"] .admin-sidebar-note,
html[data-bs-theme="dark"] .admin-sidebar-icon-btn,
html[data-bs-theme="dark"] .admin-logout-btn {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.16) !important;
  color: #f8fafc !important;
}

html[data-bs-theme="dark"] .admin-sidebar-icon-btn:hover,
html[data-bs-theme="dark"] .admin-sidebar-icon-btn:focus,
html[data-bs-theme="dark"] .admin-sidebar-icon-btn:active,
html[data-bs-theme="dark"] .admin-logout-btn:hover,
html[data-bs-theme="dark"] .admin-logout-btn:focus,
html[data-bs-theme="dark"] .admin-logout-btn:active {
  background: rgba(148, 163, 184, 0.18) !important;
  border-color: rgba(148, 163, 184, 0.24) !important;
}

html[data-bs-theme="dark"] .admin-mobile-icon-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

html[data-bs-theme="dark"] .admin-mobile-brand {
  color: #f8fafc;
}

html[data-bs-theme="dark"] .admin-page-header .text-muted,
html[data-bs-theme="dark"] .admin-content .text-muted {
  color: #94a3b8 !important;
}

.choices__list--multiple .choices__item {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #fff;
}

.choices__list--multiple .choices__item .choices__button {
  border-left-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}


@media (min-width: 992px) {
  .admin-sidebar {
    position: sticky;
    top: 0.5rem;
    height: calc(100vh - 1rem);
  }

  .admin-shell.is-collapsed .admin-sidebar {
    flex-basis: 92px;
    width: 92px;
  }

  .admin-shell.is-collapsed .admin-sidebar-label,
  .admin-shell.is-collapsed .admin-brand-text {
    opacity: 0;
    transform: translateX(-0.35rem);
    max-width: 0;
    pointer-events: none;
  }

  .admin-shell.is-collapsed .admin-sidebar-user {
    opacity: 0;
    transform: translateY(0.35rem);
    max-height: 0;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-color: transparent !important;
    pointer-events: none;
  }

  .admin-shell.is-collapsed .admin-sidebar-chevron,
  .admin-shell.is-collapsed .admin-sidebar-note {
    display: none !important;
  }

  .admin-shell.is-collapsed .admin-sidebar-top {
    justify-content: center;
  }

  .admin-shell.is-collapsed .admin-brand {
    justify-content: center;
    width: 100%;
    gap: 0 !important;
  }

  .admin-shell.is-collapsed .admin-nav-link,
  .admin-shell.is-collapsed .admin-subnav-link {
    justify-content: center;
    gap: 0 !important;
  }

  .admin-shell.is-collapsed .btn-toggle-nav {
    display: none;
  }

  .admin-shell.is-collapsed .admin-sidebar-submenu {
    display: none !important;
  }

  .admin-shell.is-collapsed .admin-sidebar-footer {
    padding-top: 0.75rem !important;
  }

  .admin-shell.is-collapsed .admin-sidebar-tools {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .admin-shell.is-collapsed .admin-sidebar-icon-btn {
    width: 100%;
    height: 2.7rem;
  }
}

@media (max-width: 991.98px) {
  .admin-mobile-header {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    z-index: 1040;
  }

  .admin-page-header {
    margin-top: 0 !important;
  }

  .offcanvas-start.admin-sidebar {
    top: 0.5rem;
    left: 0.5rem;
    bottom: 0.5rem;
    height: auto;
    min-height: 0;
    max-width: min(22rem, calc(100vw - 1rem));
    border-radius: 1.5rem !important;
    transform: translateX(calc(-100% - 1rem));
    transition: transform 0.28s ease-out, visibility 0.28s ease-out;
  }

  .offcanvas-start.admin-sidebar.show,
  .offcanvas-start.admin-sidebar.showing {
    transform: translateX(0);
  }

  .admin-sidebar {
    min-height: calc(100vh - 1rem);
  }

  .admin-sidebar-top {
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .admin-sidebar-top .admin-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.75rem !important;
  }

  .admin-sidebar-top .btn-close {
    margin-left: auto;
    margin-right: -0.15rem;
    padding: 0.25rem;
    flex-shrink: 0;
  }

  .admin-sidebar-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-sidebar-tools form {
    width: 100%;
  }

  .admin-sidebar-label {
    max-width: none;
  }

  .admin-table-scroll {
    max-height: calc(100vh - 18rem);
  }

  .admin-content {
    padding-top: 6.75rem;
  }

  .site-mobile-shell .site-main-shell {
    padding-top: 6.75rem !important;
  }

  .site-auth-main {
    min-height: calc(100vh - 7.25rem);
  }

  .site-auth-layout>[class*="col-"] {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .site-auth-card,
  .site-auth-security {
    width: 100%;
    max-width: 32rem;
  }

  .site-auth-card .card-body {
    padding: 1.5rem !important;
  }

  .site-auth-icon {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.35rem;
  }

  .site-auth-description {
    max-width: none;
    font-size: 0.98rem;
  }

  .site-auth-security {
    margin-inline: auto;
  }

  .employee-report-summary-card {
    min-height: 7.25rem;
  }

  .employee-report-summary-card::before {
    top: 1rem;
    bottom: 1rem;
  }

  .employee-report-summary-item {
    gap: 0.35rem;
    padding: 1rem 0.6rem;
  }

  .employee-report-summary-icon {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 1rem;
  }

  .employee-report-summary-label {
    font-size: 0.66rem;
    letter-spacing: 0.035em;
  }

  .employee-report-summary-value {
    font-size: clamp(1.25rem, 6vw, 1.65rem);
  }

  .report-date-picker {
    width: 100%;
    max-width: none;
    flex-basis: auto;
  }

  .report-date-picker>.d-flex {
    align-items: stretch !important;
  }

  .report-date-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .report-date-day {
    min-width: 0;
  }

  .report-date-nav {
    width: 2.5rem;
    height: auto;
    min-height: 4.5rem;
  }

  .report-calendar-link {
    margin-left: 2.95rem;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .report-date-strip {
    grid-template-columns: repeat(7, minmax(4rem, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {

  .admin-sidebar,
  .admin-brand,
  .admin-brand-text,
  .admin-sidebar-label,
  .admin-sidebar-user {
    transition: none !important;
  }
}
