:root {
  --mascarello-primary: #7c2336;
  --mascarello-primary-rgb: 124, 35, 54;
  --mascarello-ink: #1d2530;
  --mascarello-muted: #596372;
  --mascarello-primary-hover: #681c2d;
  --mascarello-primary-active: #591726;
  --mascarello-primary-soft: #f6ecef;
  --mascarello-border: #dce0e5;
  --mascarello-radius: .75rem;
  --mascarello-shadow: 0 .12rem .55rem rgba(29, 37, 48, .045);
  --mascarello-success: #226344;
  --mascarello-success-soft: #eaf5ee;
  --mascarello-warning: #775b0a;
  --mascarello-warning-soft: #fff3cf;
  --mascarello-danger: #8f2535;
  --mascarello-danger-soft: #fff0f2;
  --mascarello-neutral: #46505b;
  --mascarello-neutral-soft: #eef0f3;
  --bs-primary-text-emphasis: #63202e;
  --bs-primary-bg-subtle: var(--mascarello-primary-soft);
  --bs-primary-border-subtle: #dcb6c0;
  --bs-link-color: var(--mascarello-primary);
  --bs-link-color-rgb: var(--mascarello-primary-rgb);
  --bs-link-hover-color: var(--mascarello-primary-hover);
  --bs-link-hover-color-rgb: 104, 28, 45;
  --bs-primary: var(--mascarello-primary);
  --bs-primary-rgb: var(--mascarello-primary-rgb);
  --lte-sidebar-width: 17rem;
}

body {
  font-family: 'Source Sans 3', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.app-sidebar {
  background: linear-gradient(180deg, #242a33 0%, #171c23 100%);
}

.brand-link {
  text-decoration: none;
}

.brand-badge {
  display: inline-grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 0.65rem;
  color: #fff;
  background: var(--mascarello-primary);
  font-weight: 700;
  box-shadow: 0 0.3rem 1rem rgba(var(--mascarello-primary-rgb), 0.35);
}

.brand-text {
  letter-spacing: 0.01em;
}

.sidebar-brand {
  min-height: 4.25rem;
}

.sidebar-brand-logo {
  width: auto;
  max-width: 12.5rem;
  height: 3.15rem;
  object-fit: contain;
}

.sidebar-user {
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.user-avatar {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 700;
}

.sidebar-menu .nav-link.active {
  background-color: var(--mascarello-primary);
  color: #fff;
  box-shadow: 0 0.35rem 0.85rem rgba(var(--mascarello-primary-rgb), 0.2);
}

.sidebar-menu .nav-link {
  border-radius: 0.45rem;
  margin-bottom: 0.15rem;
}

.app-content-header h1 {
  color: var(--mascarello-ink);
  font-size: 1.55rem;
  font-weight: 650;
}

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

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

.card {
  border: 0;
  border-radius: var(--mascarello-radius);
  box-shadow: var(--mascarello-shadow);
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 8.4rem;
}

.stat-card .stat-icon {
  position: absolute;
  right: 1rem;
  bottom: -0.85rem;
  color: rgba(255,255,255,.25);
  font-size: 5.25rem;
  transform: rotate(-6deg);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.pipeline-column {
  min-width: 17rem;
  width: 17rem;
}

.pipeline-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .75rem;
}

.pipeline-card {
  border-left: .25rem solid var(--mascarello-primary);
}

.table > :not(caption) > * > * {
  padding-top: .8rem;
  padding-bottom: .8rem;
  vertical-align: middle;
}

.status-dot {
  display: inline-block;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  margin-right: .35rem;
}

.login-page {
  min-height: 100vh;
  background-color: #181214;
  background-image:
    linear-gradient(rgba(20, 13, 15, .70), rgba(20, 13, 15, .70)),
    url('/assets/img/login-background.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.login-box {
  width: min(92vw, 410px);
}

.login-box > .text-center h1 {
  color: #fff;
  text-shadow: 0 .15rem .8rem rgba(0, 0, 0, .35);
}

.login-box > .text-center .text-body-secondary,
.login-box > .text-body-secondary,
.login-legal {
  color: rgba(255, 255, 255, .78) !important;
}

.login-legal a {
  color: #f2c24f;
}

.login-box .card {
  background-color: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
}

.login-brand-logo {
  width: min(78vw, 17rem);
  height: auto;
  filter: drop-shadow(0 .4rem 1rem rgba(0, 0, 0, .45));
}

.confirmation-brand-logo {
  width: min(74vw, 16rem);
  height: auto;
}

.app-footer-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-links {
  display: flex !important;
  flex-wrap: wrap;
  gap: .35rem 1rem;
}

.footer-links a,
.public-order-footer a {
  color: var(--mascarello-primary);
  text-decoration: none;
}

.footer-links a:hover,
.public-order-footer a:hover {
  text-decoration: underline;
}

.release-notice-body {
  white-space: pre-wrap;
  line-height: 1.55;
  max-height: 46vh;
  overflow-y: auto;
}

.app-release {
  flex: 0 0 auto;
  white-space: nowrap;
}

.required::after {
  content: ' *';
  color: var(--bs-danger);
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--mascarello-muted);
}

.empty-state i {
  display: block;
  margin-bottom: .75rem;
  font-size: 2.4rem;
  opacity: .45;
}

.d-inline-grid {
  display: inline-grid !important;
}

.place-items-center {
  place-items: center !important;
}

.min-w-0 {
  min-width: 0 !important;
}

.call-console,
.call-calendar {
  --call-panel-radius: 1rem;
}

.call-console > .card,
.call-console .call-queue-panel,
.call-console .call-workspace,
.call-console .call-kpi,
.call-calendar > .card {
  border-radius: var(--call-panel-radius);
}

.call-queue-panel {
  min-height: 36rem;
}

.call-console-dashboard .call-queue-panel {
  min-height: 30rem;
}

.call-console-dashboard {
  min-width: 0;
  overflow-x: clip;
}

.call-console-dashboard .call-console-workspace-row > * {
  min-width: 0;
}

.call-console-dashboard .call-queue-panel {
  display: flex;
  flex-direction: column;
}

.call-console-dashboard .call-queue-scroll {
  flex: 1 1 auto;
  max-height: 58vh;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.call-console-dashboard .call-queue-scroll .call-queue-item {
  flex: 0 0 auto;
  padding: 0.75rem 0.85rem !important;
}

.call-console-dashboard .call-status-panel,
.call-console-dashboard .call-status-panel > *,
.call-console-dashboard .call-kpi {
  min-width: 0;
}

.call-console-dashboard .call-kpi .card-body {
  overflow: hidden;
}

.call-console-dashboard .call-kpi .text-body-secondary {
  overflow-wrap: anywhere;
}

.call-console-dashboard .order-value-amount {
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
}

.call-console-dashboard .order-value-icon {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: .8rem;
  font-size: 1.1rem;
}

.call-console-dashboard .call-workspace-empty > .card-body {
  min-height: 19rem;
}

.call-console-dashboard .call-queue-name,
.call-console-dashboard .call-queue-detail {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.call-console-dashboard .call-queue-item {
  min-width: 0;
  overflow: hidden;
}

.call-console-secondary-tools {
  position: relative;
}

.call-console-secondary-actions {
  padding-top: .5rem;
}

.call-console-secondary-tools-summary {
  cursor: pointer;
  list-style: none;
}

.call-console-secondary-tools-summary::-webkit-details-marker {
  display: none;
}

.call-console-disclosure-icon {
  transition: transform .16s ease;
}

.call-console-secondary-tools[open] .call-console-disclosure-icon {
  transform: rotate(180deg);
}

.call-console-location-options {
  width: 100%;
}

.call-console-location-options > summary {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.call-console-location-options > summary::-webkit-details-marker {
  display: none;
}

.call-console-location-options[open] .call-console-disclosure-icon {
  transform: rotate(180deg);
}

@media (min-width: 1200px) {
  .call-console-dashboard .call-console-workspace-row {
    --call-console-workspace-height: clamp(32rem, 58vh, 42rem);
  }

  .call-console-dashboard .call-console-workspace-row > * {
    display: flex;
  }

  .call-console-dashboard .call-queue-panel,
  .call-console-dashboard .call-status-panel {
    width: 100%;
    height: var(--call-console-workspace-height);
    min-height: 0;
  }

  .call-console-dashboard .call-status-panel {
    display: flex;
    flex-direction: column;
  }

  .call-console-dashboard .call-workspace-empty {
    flex: 1 1 auto;
    min-height: 0;
  }

  .call-console-dashboard .call-workspace-empty > .card-body {
    min-height: 0;
  }
}

.call-work-page .call-queue-panel {
  min-height: 0;
}

.call-work-page #call-work-form > .card-body > section {
  margin-bottom: 1.5rem !important;
}

.call-work-page #call-work-form .alert {
  padding: .65rem .85rem;
}

.call-work-page [data-order-product-composition],
.call-work-page [data-bundle-product-details] {
  display: -webkit-box !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.call-work-page [data-order-product-composition][hidden],
.call-work-page [data-bundle-product-details][hidden] {
  display: none !important;
}

.call-work-page .bundle-product-highlight {
  padding: .5rem .65rem;
}

.call-work-page [data-call-contact-name],
.call-work-page [data-call-contact-email],
.call-work-page [data-call-contact-phone] {
  overflow-wrap: anywhere;
  white-space: normal !important;
}

.call-work-page [data-order-unit-price] {
  min-height: calc(1.5em + .75rem + 2px);
}

.call-queue-panel .card-header {
  border-bottom-color: rgba(29, 37, 48, .08);
}

.call-queue-item {
  border-color: rgba(29, 37, 48, .08);
  transition: background-color .18s ease, transform .18s ease;
}

.call-queue-item:hover {
  background: rgba(var(--mascarello-primary-rgb), .035);
}

.call-queue-item-last-order {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .3rem;
  margin-top: .35rem;
  color: var(--bs-secondary-color);
  font-size: .74rem;
  line-height: 1.25;
}

.call-queue-item-last-order .bi {
  color: var(--mascarello-primary);
}

.call-queue-item-last-order strong {
  color: var(--bs-body-color);
  font-weight: 700;
}

.call-queue-table th {
  white-space: nowrap;
}

.queue-sort-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.queue-sort-link:hover,
.queue-sort-link:focus-visible {
  color: var(--mascarello-primary);
}

.queue-sort-link .bi-arrow-down-up {
  font-size: .72rem;
  opacity: .42;
}

.queue-qualification-badge {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.call-kpi {
  overflow: hidden;
  border-bottom: .18rem solid rgba(var(--mascarello-primary-rgb), .18) !important;
}

.call-kpi .fs-3 {
  color: var(--mascarello-ink);
  line-height: 1;
}

.call-workspace {
  padding-bottom: 5.75rem;
  background:
    radial-gradient(circle at 50% 46%, rgba(var(--mascarello-primary-rgb), .045), transparent 34%),
    var(--bs-body-bg);
}

.call-draft-floating-action {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1035;
  padding: .35rem;
  border: 1px solid rgba(var(--mascarello-primary-rgb), .18);
  border-radius: .85rem;
  background: rgba(var(--bs-body-bg-rgb), .94);
  box-shadow: 0 .65rem 1.75rem rgba(29, 37, 48, .22);
  backdrop-filter: blur(.55rem);
}

.call-draft-floating-action .btn {
  min-width: 12rem;
  box-shadow: 0 .25rem .75rem rgba(var(--mascarello-primary-rgb), .2);
}

#product_id optgroup[data-product-group="bundles"],
#product_id option.bundle-product-option {
  color: var(--mascarello-primary);
  font-weight: 700;
}

.bundle-product-highlight {
  padding: .65rem .75rem;
  border: 1px solid rgba(var(--mascarello-primary-rgb), .22);
  border-left: .25rem solid var(--mascarello-primary);
  border-radius: .65rem;
  background: rgba(var(--mascarello-primary-rgb), .08);
}

.call-console .modal-content {
  border-radius: 1.1rem;
}

.call-console .display-6 {
  color: var(--mascarello-ink);
  letter-spacing: .02em;
}

.order-completion-summary-header {
  background: linear-gradient(135deg, rgba(var(--bs-success-rgb), .12), rgba(var(--mascarello-primary-rgb), .05));
}

.order-completion-summary-icon {
  display: inline-grid;
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 1rem;
  background: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
  font-size: 1.45rem;
}

.order-completion-summary-detail {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .85rem;
  background: var(--bs-tertiary-bg);
}

.order-completion-summary-table th,
.order-completion-summary-table td {
  padding: .8rem 1rem;
}

.order-completion-summary-schedule dt,
.order-completion-summary-schedule dd {
  padding-top: .3rem;
  padding-bottom: .3rem;
}

.order-completion-summary-totals {
  border: 1px solid rgba(var(--mascarello-primary-rgb), .18);
  background: rgba(var(--mascarello-primary-rgb), .055);
}

.order-value-card {
  position: relative;
  overflow: hidden;
  border-left: .24rem solid rgba(var(--mascarello-primary-rgb), .75) !important;
}

.order-value-card::after {
  position: absolute;
  width: 7rem;
  height: 7rem;
  right: -3.5rem;
  bottom: -4rem;
  border-radius: 50%;
  background: rgba(var(--mascarello-primary-rgb), .045);
  content: '';
}

.order-value-card-info {
  border-left-color: rgba(var(--mascarello-primary-rgb), .75) !important;
}

.order-value-card-success {
  border-left-color: rgba(var(--mascarello-primary-rgb), .75) !important;
}

.order-value-card-warning {
  border-left-color: rgba(var(--mascarello-primary-rgb), .75) !important;
}

.order-value-amount {
  color: var(--mascarello-ink);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.1;
}

.order-value-icon {
  display: inline-grid;
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 1rem;
  font-size: 1.35rem;
}

.dashboard-today-orders {
  border-left: .28rem solid var(--mascarello-primary) !important;
  background:
    radial-gradient(circle at 100% 0, rgba(var(--mascarello-primary-rgb), .09), transparent 34%),
    var(--bs-body-bg);
}

.dashboard-today-orders-layout {
  display: grid;
  grid-template-columns: minmax(17rem, .8fr) minmax(26rem, 1.4fr);
  gap: 1.5rem;
  align-items: center;
}

.dashboard-today-orders-icon {
  display: inline-grid;
  width: 3.65rem;
  height: 3.65rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 1.1rem;
  color: var(--mascarello-primary);
  background: rgba(var(--mascarello-primary-rgb), .1);
  font-size: 1.55rem;
}

.dashboard-today-orders-count {
  color: var(--mascarello-ink);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -.04em;
  line-height: 1;
}

.dashboard-today-currencies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: .75rem;
}

.dashboard-today-currency {
  min-width: 0;
  padding: .9rem 1rem;
  border: 1px solid rgba(29, 37, 48, .09);
  border-radius: .9rem;
  background: rgba(var(--bs-body-bg-rgb), .9);
}

.dashboard-today-currency-value {
  overflow: hidden;
  color: var(--mascarello-ink);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 750;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-analytics {
  scroll-margin-top: 5.5rem;
}

.dashboard-analytics-heading {
  min-height: 2.75rem;
}

.dashboard-analytics-tabs {
  gap: .35rem;
  padding: .35rem;
  border: 1px solid rgba(29, 37, 48, .09);
  border-radius: .85rem;
  background: var(--bs-tertiary-bg);
}

.dashboard-analytics-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: .45rem .8rem;
  border-radius: .6rem;
  color: var(--bs-body-color);
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-analytics-tabs .nav-link:hover,
.dashboard-analytics-tabs .nav-link:focus-visible {
  color: var(--mascarello-primary);
  background: rgba(var(--mascarello-primary-rgb), .08);
}

.dashboard-analytics-tabs .nav-link.active {
  color: #fff;
  background: var(--mascarello-primary);
  box-shadow: 0 .2rem .55rem rgba(var(--mascarello-primary-rgb), .22);
}

.dashboard-analytics .tab-pane:focus-visible {
  outline: 3px solid rgba(var(--mascarello-primary-rgb), .35);
  outline-offset: .25rem;
}

.dashboard-period-control { padding: 1rem; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); border-radius: .8rem; }
.dashboard-period-control select { max-width: 100%; }
.dashboard-operators-table { font-size: .9rem; }
.dashboard-operators-table th,
.dashboard-operators-table td { padding: .85rem .65rem; }
.dashboard-operator-threecx { display: flex; flex-wrap: wrap; gap: .35rem .75rem; font-size: .78rem; line-height: 1.35; }
.dashboard-operator-threecx > span { display: inline-flex; align-items: baseline; }
.dashboard-operator-threecx-period { padding: .4rem .5rem; border: 1px solid rgba(var(--mascarello-primary-rgb), .36); border-radius: .45rem; background: rgba(var(--mascarello-primary-rgb), .09); }
.dashboard-operator-threecx-live { padding: .35rem .5rem; border: 1px solid rgba(var(--mascarello-primary-rgb), .2); border-radius: .45rem; background: rgba(var(--mascarello-primary-rgb), .045); }
.dashboard-operator-threecx-label { color: var(--mascarello-primary); font-weight: 700; }
.dashboard-operator-threecx-answered { color: var(--bs-success-text-emphasis); }
.dashboard-operator-threecx-unanswered { color: var(--bs-warning-text-emphasis); }
.dashboard-operator-products { min-width: 10rem; max-width: 20rem; }
.dashboard-operator-products summary { color: var(--mascarello-primary); cursor: pointer; font-weight: 650; }
.dashboard-operator-products li { overflow-wrap: anywhere; }

.dashboard-weekly-summary {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: 1rem;
}

.dashboard-weekly-total,
.dashboard-weekly-peak {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .85rem;
  background: var(--bs-tertiary-bg);
  overflow-wrap: anywhere;
}

.dashboard-weekly-peak { border-left: .25rem solid var(--mascarello-primary); }
.dashboard-weekly-days { display: grid; gap: 1rem; }
.dashboard-weekly-day { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; }
.dashboard-weekly-day-label { display: grid; align-content: start; gap: .2rem; }
.dashboard-weekly-day-plot { min-width: 0; }
.dashboard-weekly-track { height: .45rem; overflow: hidden; border-radius: 1rem; background: var(--bs-tertiary-bg); }
.dashboard-weekly-track span { display: block; height: 100%; border-radius: inherit; background: var(--mascarello-primary); }
.dashboard-weekly-heatmap { max-width: 100%; overflow-x: auto; scrollbar-width: thin; border: 1px solid var(--bs-border-color); border-radius: .65rem; }
.dashboard-weekly-heatmap:focus-visible { outline: 3px solid var(--mascarello-primary); outline-offset: .2rem; }
.dashboard-weekly-heatmap table { table-layout: fixed; min-width: 50rem; text-align: center; font-size: .8rem; }
.dashboard-weekly-heatmap th,
.dashboard-weekly-heatmap td { padding: .6rem .2rem; vertical-align: middle; border: 2px solid var(--bs-body-bg); }
.dashboard-weekly-heatmap th:first-child { position: sticky; left: 0; z-index: 1; width: 6rem; text-align: left; padding-left: .5rem; background: var(--bs-body-bg); }
.dashboard-weekly-heatmap .weekly-heat-level-0 { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.dashboard-weekly-heatmap .weekly-heat-level-1 { background: #f4e5e9; color: var(--mascarello-ink); }
.dashboard-weekly-heatmap .weekly-heat-level-2 { background: #e4bdc7; color: var(--mascarello-ink); }
.dashboard-weekly-heatmap .weekly-heat-level-3 { background: #a0475c; color: #fff; }
.dashboard-weekly-heatmap .weekly-heat-level-4 { background: var(--mascarello-primary); color: #fff; font-weight: 750; }
.dashboard-weekly-heatmap .weekly-heat-peak { box-shadow: inset 0 0 0 2px var(--mascarello-primary); }

@media (max-width: 991.98px) {
  .dashboard-today-orders-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .dashboard-weekly-summary { grid-template-columns: 1fr; }
  .dashboard-weekly-day { grid-template-columns: 1fr; gap: .4rem; }
  .dashboard-weekly-day-label { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
  .dashboard-today-orders-summary {
    align-items: flex-start !important;
  }

  .dashboard-today-currencies {
    grid-template-columns: 1fr;
  }

  .dashboard-analytics-heading {
    align-items: stretch !important;
  }

  .dashboard-analytics-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
  }

  .dashboard-analytics-tabs .nav-link {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
}

/* PWA Autista: interfaccia mobile-first, leggibile e utilizzabile con una mano. */
.driver-body {
  --driver-primary: #8f1d35;
  --driver-primary-rgb: 143, 29, 53;
  min-height: 100vh;
  margin: 0;
  color: #202733;
  background: #f5f3f1;
  font-family: "Source Sans 3", system-ui, sans-serif;
}

.driver-topbar {
  position: sticky;
  z-index: 1030;
  top: 0;
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(32, 39, 51, .09);
  box-shadow: 0 4px 20px rgba(32, 39, 51, .06);
  backdrop-filter: blur(14px);
}

.driver-topbar-inner,
.driver-main,
.driver-footer {
  width: min(100% - 2rem, 62rem);
  margin-inline: auto;
}

.driver-topbar-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.driver-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: inherit;
  text-decoration: none;
}

.driver-brand img { width: 6.9rem; height: 2.8rem; object-fit: contain; object-position: left center; }
.driver-brand span { display: grid; border-left: 1px solid rgba(32, 39, 51, .14); padding-left: .75rem; line-height: 1.05; }
.driver-brand strong { color: var(--driver-primary); font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; }
.driver-brand small { color: #68707c; font-size: .72rem; }
.driver-topbar-actions { display: flex; align-items: center; gap: .5rem; }
.driver-topbar-actions form { margin: 0; }
.driver-connectivity { display: inline-flex; align-items: center; gap: .35rem; color: #16794b; font-weight: 700; font-size: .82rem; }
.driver-connectivity.is-offline { color: #a13418; }

.driver-main { min-height: calc(100vh - 8rem); padding-block: clamp(1.25rem, 3vw, 2.5rem) 3rem; }
.driver-alert { border: 0; border-radius: 1rem; box-shadow: 0 8px 24px rgba(32, 39, 51, .06); }
.driver-footer { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1rem calc(1rem + env(safe-area-inset-bottom)); border-top: 1px solid rgba(32, 39, 51, .08); color: #777f89; font-size: .78rem; }
.driver-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.driver-page-heading h1, .driver-trip-hero h1 { margin: .1rem 0; font-size: clamp(2rem, 6vw, 3rem); font-weight: 750; letter-spacing: -.03em; }
.driver-page-heading p, .driver-trip-hero p { margin: 0; color: #68707c; }
.driver-eyebrow { display: block; color: var(--driver-primary); font-size: .77rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.driver-trip-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.driver-trip-card, .driver-stop-card, .driver-empty, .driver-trip-hero { background: #fff; border: 1px solid rgba(32, 39, 51, .08); border-radius: 1.25rem; box-shadow: 0 12px 34px rgba(32, 39, 51, .07); }
.driver-trip-card { padding: clamp(1.15rem, 3vw, 1.5rem); overflow: hidden; }
.driver-trip-card.is-active { border-color: rgba(var(--driver-primary-rgb), .35); box-shadow: 0 16px 38px rgba(var(--driver-primary-rgb), .13); }
.driver-trip-card-top { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.driver-trip-card h2 { margin: .25rem 0 0; font-size: 1.5rem; font-weight: 750; }
.driver-trip-date { color: #68707c; font-weight: 650; }
.driver-vehicle { display: flex; align-items: center; gap: .8rem; margin: 1.25rem 0; padding: .85rem; border-radius: .9rem; background: #f7f7f8; }
.driver-vehicle > i { display: grid; width: 2.7rem; height: 2.7rem; place-items: center; border-radius: .75rem; color: #fff; background: var(--driver-primary); font-size: 1.2rem; }
.driver-vehicle span { display: grid; }
.driver-vehicle small { color: #68707c; }
.driver-progress-copy { display: flex; justify-content: space-between; margin-bottom: .35rem; }
.driver-progress { height: .55rem; margin-bottom: 1.1rem; background: #e8e9eb; }
.driver-progress .progress-bar, .driver-hero-progress .progress-bar { background: var(--driver-primary); }
.driver-next { display: grid; gap: .2rem; margin-bottom: 1rem; padding: .8rem .9rem; border-left: 3px solid var(--driver-primary); background: rgba(var(--driver-primary-rgb), .055); }
.driver-next > span { color: #68707c; font-size: .78rem; font-weight: 700; text-transform: uppercase; }
.driver-stop-mini { display: inline-grid; width: 1.55rem; height: 1.55rem; place-items: center; margin-right: .45rem; color: #fff; background: var(--driver-primary); border-radius: 50%; font-size: .8rem; }
.driver-empty { display: grid; justify-items: center; padding: 3rem 1.5rem; text-align: center; }
.driver-empty-icon { display: grid; width: 5rem; height: 5rem; place-items: center; color: var(--driver-primary); background: rgba(var(--driver-primary-rgb), .1); border-radius: 50%; font-size: 2.2rem; }
.driver-empty h2 { margin: 1rem 0 .25rem; }
.driver-empty p { color: #68707c; }
.driver-back { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .9rem; color: var(--driver-primary); font-weight: 750; text-decoration: none; }
.driver-trip-hero { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: clamp(1.15rem, 4vw, 2rem); margin-bottom: 1rem; }
.driver-trip-hero > .badge { align-self: start; font-size: .9rem; }
.driver-trip-hero-title p { font-weight: 650; }
.driver-hero-progress { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; }
.driver-hero-progress > div:first-child { display: grid; line-height: 1; }
.driver-hero-progress > div:first-child strong { font-size: 1.35rem; }
.driver-hero-progress > div:first-child span { margin-top: .2rem; color: #68707c; font-size: .75rem; }
.driver-hero-progress .progress { height: .75rem; }
.driver-start-button { min-height: 3.8rem; box-shadow: 0 12px 24px rgba(var(--driver-primary-rgb), .2); }
.driver-route-overview { overflow: hidden; margin-bottom: 1rem; background: #fff; border: 1px solid rgba(32, 39, 51, .08); border-radius: 1.25rem; box-shadow: 0 12px 34px rgba(32, 39, 51, .07); }
.driver-route-overview > header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1.15rem 1.25rem .9rem; }
.driver-route-overview h2 { margin: .1rem 0; font-size: clamp(1.35rem, 4vw, 1.75rem); font-weight: 750; }
.driver-route-overview header p { margin: 0; color: #68707c; }
.driver-route-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(32, 39, 51, .09); border-block: 1px solid rgba(32, 39, 51, .09); }
.driver-route-metrics > div { min-width: 0; display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; background: #f9f9fa; }
.driver-route-metrics > div.is-time { background: rgba(var(--driver-primary-rgb), .055); }
.driver-route-metrics i { flex: 0 0 auto; display: grid; width: 2.3rem; height: 2.3rem; place-items: center; color: var(--driver-primary); background: rgba(var(--driver-primary-rgb), .1); border-radius: .7rem; font-size: 1.05rem; }
.driver-route-metrics span { min-width: 0; display: grid; }
.driver-route-metrics small { overflow: hidden; color: #68707c; font-size: .72rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.driver-route-metrics strong { overflow: hidden; font-size: 1.18rem; text-overflow: ellipsis; white-space: nowrap; }
.driver-route-map-wrap { position: relative; background: #e8ece9; }
.driver-route-map { width: 100%; height: clamp(21rem, 44vw, 27rem); }
.driver-route-map .leaflet-control-attribution { font-size: 9px; }
.driver-route-map .leaflet-popup-content { min-width: 10.5rem; margin: .8rem 1rem; line-height: 1.35; }
.driver-map-popup-state { display: block; margin-bottom: .2rem; color: var(--driver-primary); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.driver-route-legend { position: absolute; z-index: 500; left: 50%; bottom: .65rem; display: flex; align-items: center; gap: .8rem; max-width: calc(100% - 1rem); padding: .45rem .65rem; transform: translateX(-50%); overflow-x: auto; background: rgba(255, 255, 255, .94); border: 1px solid rgba(32, 39, 51, .12); border-radius: 999px; box-shadow: 0 5px 16px rgba(32, 39, 51, .12); backdrop-filter: blur(8px); scrollbar-width: none; }
.driver-route-legend::-webkit-scrollbar { display: none; }
.driver-route-legend span { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .3rem; color: #4f5863; font-size: .7rem; font-weight: 700; }
.driver-route-legend b { display: inline-grid; width: 1.25rem; height: 1.25rem; place-items: center; color: #fff; background: #5f6874; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(32, 39, 51, .15); font-size: .58rem; }
.driver-route-legend b.is-origin { background: #177a50; }
.driver-route-legend b.is-current { background: var(--driver-primary); }
.driver-route-legend b.is-delivered { background: #198754; }
.driver-map-marker-shell { border: 0; background: transparent; }
.driver-map-marker { position: relative; display: grid; width: 36px; height: 36px; place-items: center; color: #fff; background: #59636f; border: 3px solid #fff; border-radius: 50% 50% 50% 0; box-shadow: 0 4px 12px rgba(32, 39, 51, .3); transform: rotate(-45deg); font-size: 13px; }
.driver-map-marker > * { transform: rotate(45deg); }
.driver-map-marker.is-origin { width: 42px; height: 42px; grid-template-columns: auto auto; gap: 2px; background: #177a50; }
.driver-map-marker.is-origin i { font-size: 11px; }
.driver-map-marker.is-origin b { font-size: 12px; }
.driver-map-marker.is-current { background: var(--driver-primary); box-shadow: 0 0 0 5px rgba(var(--driver-primary-rgb), .18), 0 5px 14px rgba(32, 39, 51, .32); }
.driver-map-marker.is-delivered { background: #198754; }
.driver-stop-strip { position: sticky; z-index: 1020; top: calc(4.25rem + env(safe-area-inset-top)); display: flex; gap: .45rem; overflow-x: auto; padding: .75rem .25rem; margin-bottom: .5rem; background: rgba(245, 243, 241, .94); scrollbar-width: none; backdrop-filter: blur(10px); }
.driver-stop-strip::-webkit-scrollbar { display: none; }
.driver-stop-strip a { flex: 0 0 2.6rem; display: grid; width: 2.6rem; height: 2.6rem; place-items: center; color: #58606b; background: #fff; border: 1px solid #d8dadd; border-radius: 50%; font-weight: 800; text-decoration: none; }
.driver-stop-strip a.is-current { color: #fff; background: var(--driver-primary); border-color: var(--driver-primary); box-shadow: 0 0 0 .3rem rgba(var(--driver-primary-rgb), .13); }
.driver-stop-strip a.is-delivered { color: #fff; background: #198754; border-color: #198754; }
.driver-stops { display: grid; gap: 1rem; }
.driver-stop-card { overflow: hidden; scroll-margin-top: 9rem; }
.driver-stop-card.is-current { border: 2px solid rgba(var(--driver-primary-rgb), .75); box-shadow: 0 16px 42px rgba(var(--driver-primary-rgb), .14); }
.driver-stop-card.is-delivered { border-color: rgba(25, 135, 84, .3); }
.driver-stop-card > header { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: .85rem; padding: 1rem; }
.driver-stop-card h2 { margin: .05rem 0; font-size: clamp(1.25rem, 5vw, 1.6rem); font-weight: 750; }
.driver-stop-number { display: grid; width: 2.8rem; height: 2.8rem; place-items: center; color: #fff; background: var(--driver-primary); border-radius: 50%; font-size: 1.05rem; font-weight: 800; }
.driver-stop-card.is-delivered .driver-stop-number { background: #198754; }
.driver-order-number { color: #68707c; font-weight: 700; text-decoration: none; }
.driver-stop-address { display: flex; align-items: start; gap: .75rem; padding: 1rem; color: #202733; background: #f7f7f8; border-block: 1px solid rgba(32, 39, 51, .07); }
.driver-stop-address > i { color: var(--driver-primary); font-size: 1.35rem; }
.driver-stop-address span { display: grid; }
.driver-stop-address small { margin-top: .25rem; color: #68707c; }
.driver-stop-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; padding: 1rem 1rem .5rem; }
.driver-stop-actions .btn { min-height: 3.4rem; display: flex; align-items: center; justify-content: center; gap: .55rem; }
.driver-deliver-button { min-height: 3.8rem; width: calc(100% - 2rem) !important; margin: .5rem 1rem 1rem; }
.driver-proof { display: grid; gap: .8rem; margin: 1rem; padding: 1rem; border: 1px solid rgba(25, 135, 84, .2); border-radius: 1rem; background: rgba(25, 135, 84, .06); }
.driver-proof-status { display: flex; align-items: center; gap: .7rem; color: #11663b; }
.driver-proof-status > i { font-size: 1.65rem; }
.driver-proof-status > div { display: grid; }
.driver-proof-status span { font-size: .85rem; }
.driver-proof img { width: 100%; max-height: 8rem; object-fit: contain; object-position: left center; background: #fff; border: 1px solid rgba(32, 39, 51, .1); border-radius: .7rem; }
.driver-proof p { margin: 0; }
.driver-signature-modal .modal-content { border: 0; border-radius: 1.25rem; overflow: hidden; }
.driver-signature-wrap { position: relative; min-height: 13rem; overflow: hidden; background: #fff; border: 2px dashed #aeb3ba; border-radius: 1rem; }
.driver-signature-wrap canvas { display: block; width: 100%; height: 13rem; touch-action: none; cursor: crosshair; }
.driver-signature-wrap > span { pointer-events: none; position: absolute; inset: 0; display: grid; place-items: center; color: #a0a5ac; font-size: 1.1rem; font-weight: 650; }
.driver-acceptance { padding: 1rem 1rem 1rem 2.75rem; background: #f5f6f7; border-radius: .8rem; }
.driver-acceptance .form-check-input { width: 1.35rem; height: 1.35rem; margin-left: -1.85rem; }
.driver-body .btn-primary { --bs-btn-bg: var(--driver-primary); --bs-btn-border-color: var(--driver-primary); --bs-btn-hover-bg: #74172b; --bs-btn-hover-border-color: #74172b; }

.shipment-delivery-signature {
  width: min(15rem, 100%);
  max-height: 6rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(25, 135, 84, .22);
  border-radius: .6rem;
}

@media (max-width: 575.98px) {
  .driver-topbar-inner, .driver-main, .driver-footer { width: min(100% - 1rem, 62rem); }
  .driver-brand img { width: 5.2rem; }
  .driver-brand small, .driver-connectivity span { display: none; }
  .driver-page-heading { align-items: start; }
  .driver-page-heading > .btn { width: 100%; }
  .driver-trip-hero { grid-template-columns: 1fr; }
  .driver-trip-hero > .badge { justify-self: start; }
  .driver-hero-progress { grid-column: 1; }
  .driver-route-overview > header { align-items: start; }
  .driver-route-metrics { grid-template-columns: 1fr; }
  .driver-route-metrics > div { padding-block: .7rem; }
  .driver-route-metrics small { white-space: normal; }
  .driver-route-map { height: 21rem; }
  .driver-route-legend { left: .5rem; right: .5rem; width: auto; transform: none; }
  .driver-stop-card > header { grid-template-columns: auto 1fr; }
  .driver-stop-card > header > .badge { grid-column: 2; justify-self: start; }
  .driver-signature-modal .modal-content { border-radius: 0; }
  .driver-signature-modal .modal-footer { display: grid; grid-template-columns: 1fr 2fr; padding-bottom: calc(.75rem + env(safe-area-inset-bottom)); }
  .driver-signature-modal .modal-footer .btn { margin: 0; }
}

@media print {
  .driver-topbar, .driver-footer, .driver-stop-strip, .driver-stop-actions, .driver-deliver-button, .driver-start-button { display: none !important; }
  .driver-main { width: 100%; padding: 0; }
}

/* Pianificazione cartografica delle spedizioni */
.shipment-map-heading {
  flex: 1 1 32rem;
  min-width: min(100%, 19rem);
}

.shipment-map-run-picker {
  flex: 0 1 30rem;
  min-width: min(100%, 20rem);
}

.shipment-run-master {
  overflow: hidden;
}

.shipment-run-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.shipment-run-selector-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .75rem;
  min-height: 5.25rem;
  padding: .85rem 1rem;
  border-width: 0 1px 1px 0;
}

.shipment-run-selector-item.is-selected {
  color: var(--bs-emphasis-color);
  background: rgba(var(--mascarello-primary-rgb), .07);
  box-shadow: inset .25rem 0 0 var(--mascarello-primary);
}

.shipment-run-selector-main,
.shipment-run-selector-meta {
  display: grid;
  min-width: 0;
  gap: .15rem;
}

.shipment-run-selector-main > strong,
.shipment-run-selector-main > small,
.shipment-run-selector-meta > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-run-selector-meta {
  justify-items: end;
  color: var(--bs-secondary-color);
  font-size: .78rem;
}

.shipment-run-selector-arrow {
  color: var(--bs-secondary-color);
}

.shipment-secondary-panel {
  overflow: hidden;
}

.shipment-secondary-panel > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .75rem;
  min-height: 3.75rem;
  cursor: pointer;
  list-style: none;
}

.shipment-secondary-panel > summary::-webkit-details-marker {
  display: none;
}

.shipment-secondary-panel > summary > span {
  font-weight: 600;
}

.shipment-secondary-panel > summary > small {
  color: var(--bs-secondary-color);
}

.shipment-secondary-panel > summary > .bi-chevron-down {
  transition: transform .2s ease;
}

.shipment-secondary-panel[open] > summary > .bi-chevron-down {
  transform: rotate(180deg);
}

.shipment-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
  background: linear-gradient(90deg, rgba(var(--mascarello-primary-rgb), .04), transparent 65%);
}

.shipment-route-map {
  min-height: 34rem;
  background: #e9edf1;
  isolation: isolate;
}

.shipment-route-map .leaflet-control-attribution {
  font-size: .68rem;
}

.shipment-map-sidepanel {
  display: flex;
  flex-direction: column;
  min-height: 34rem;
  background: var(--bs-body-bg);
}

.shipment-map-stop-list {
  flex: 1 1 auto;
  max-height: 23rem;
  overflow-y: auto;
}

.shipment-map-stop-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

.shipment-map-stop-item:hover {
  background: rgba(var(--mascarello-primary-rgb), .035);
}

.shipment-map-stop-item.is-origin {
  background: rgba(25, 135, 84, .07);
  border-bottom-color: rgba(25, 135, 84, .2);
}

.shipment-map-stop-number {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  border-radius: 50%;
  background: var(--mascarello-primary);
}

.shipment-map-stop-number.is-missing {
  color: #664d03;
  background: #ffda6a;
}

.shipment-map-stop-number.is-origin {
  background: #198754;
  box-shadow: 0 0 0 .22rem rgba(25, 135, 84, .13);
}

.shipment-map-legend {
  position: absolute;
  z-index: 500;
  right: 1rem;
  bottom: 1.7rem;
  display: flex;
  gap: .8rem;
  padding: .45rem .7rem;
  font-size: .75rem;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: .6rem;
  background: rgba(255, 255, 255, .94);
}

.shipment-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.shipment-legend-dot {
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
}

.shipment-legend-stop { background: var(--mascarello-primary); }
.shipment-legend-origin { background: #198754; }
.shipment-legend-opportunity { background: #f0ad00; }
.shipment-legend-available { background: #68727d; }

.shipment-legend-route {
  width: 1.4rem;
  height: .22rem;
  border-radius: 999px;
  background: var(--mascarello-primary);
}

.shipment-legend-route.is-preview {
  height: 0;
  border-top: 2px dashed #68727d;
  border-radius: 0;
  background: transparent;
}

.shipment-report-header {
  background:
    radial-gradient(circle at 92% 18%, rgba(var(--mascarello-primary-rgb), .12), transparent 28rem),
    var(--bs-body-bg);
}

.shipment-report-accent {
  height: .35rem;
  background: linear-gradient(90deg, var(--mascarello-primary), #d0a33a);
}

.shipment-report-brand img {
  width: auto;
  height: 2.5rem;
  object-fit: contain;
}

.shipment-report-map {
  min-height: 29rem;
  background: #e9edf1;
  isolation: isolate;
}

.shipment-report-map .leaflet-control-attribution {
  font-size: .68rem;
}

.shipment-report-stop-map {
  min-height: 16rem;
  background: #e9edf1;
  isolation: isolate;
}

.shipment-report-context-marker-shell {
  background: transparent;
}

.shipment-report-context-marker {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  color: #fff;
  font-size: .75rem;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #68727d;
  box-shadow: 0 .15rem .45rem rgba(0, 0, 0, .28);
}

.shipment-report-context-marker.is-current {
  width: 2.2rem;
  height: 2.2rem;
  margin: -.15rem;
  background: var(--mascarello-primary);
}

.shipment-report-context-marker.is-origin {
  background: #198754;
}

.shipment-report-context-marker.is-next {
  color: #332701;
  background: #f0ad00;
}

.shipment-report-stop-number {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 2.25rem;
  place-items: center;
  color: #fff;
  font-weight: 800;
  border-radius: 50%;
  background: var(--mascarello-primary);
}

.shipment-report-stop-number.is-origin {
  background: #198754;
}

.shipment-report-driver-nav {
  position: sticky;
  z-index: 1015;
  top: .75rem;
  border: 1px solid rgba(var(--mascarello-primary-rgb), .14) !important;
  background: rgba(var(--bs-body-bg-rgb), .96);
  backdrop-filter: blur(12px);
}

.shipment-report-stop-links {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding: .15rem .1rem .35rem;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.shipment-report-stop-link {
  display: flex;
  min-width: 11rem;
  max-width: 16rem;
  min-height: 3.5rem;
  flex: 0 0 auto;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  color: var(--bs-body-color);
  text-decoration: none;
  border: 1px solid var(--bs-border-color);
  border-radius: .7rem;
  background: var(--bs-body-bg);
  scroll-snap-align: start;
}

.shipment-report-stop-link:hover,
.shipment-report-stop-link:focus-visible {
  color: var(--mascarello-primary);
  border-color: rgba(var(--mascarello-primary-rgb), .55);
  box-shadow: 0 0 0 .2rem rgba(var(--mascarello-primary-rgb), .1);
}

.shipment-report-stop-link-number {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  flex: 0 0 2.2rem;
  place-items: center;
  color: #fff;
  font-weight: 800;
  border-radius: 50%;
  background: var(--mascarello-primary);
}

.shipment-report-stop-operational {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: rgba(var(--mascarello-primary-rgb), .035);
}

.shipment-report-stop-destination {
  display: grid;
  gap: .2rem;
}

.shipment-report-stop-destination > strong {
  font-size: 1.05rem;
}

.shipment-report-leg-summary {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-top: .25rem;
  padding: .25rem .5rem;
  color: var(--mascarello-primary);
  font-size: .875rem;
  border-radius: .4rem;
  background: rgba(var(--mascarello-primary-rgb), .09);
}

.shipment-report-leg-summary strong {
  margin-left: .25rem;
}

.shipment-report-stop-touch-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
}

.shipment-report-stop-touch-actions .btn,
.shipment-report-stop-pager .btn {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.shipment-report-stop {
  scroll-margin-top: 8.5rem;
}

.shipment-report-stop:target,
.shipment-report-stop:focus-visible {
  outline: .2rem solid rgba(var(--mascarello-primary-rgb), .25);
  outline-offset: .15rem;
}

.shipment-report-stop-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.shipment-report-stop-pager {
  display: flex;
  gap: .5rem;
}

.shipment-report-notes {
  white-space: pre-wrap;
}

.shipment-report-stop {
  overflow: hidden;
  border-left: .28rem solid var(--mascarello-primary) !important;
}

body.shipment-report-print-preparing .shipment-report {
  width: 186mm;
  max-width: calc(100vw - 2rem);
  margin-inline: auto;
}

body.shipment-report-print-preparing .shipment-report-map,
body.shipment-report-print-preparing .shipment-report-stop-map {
  width: 100%;
  min-height: 0;
  overflow: hidden;
  clip-path: inset(0);
}

body.shipment-report-print-preparing .shipment-report-map {
  height: 78mm;
}

body.shipment-report-print-preparing .shipment-report-stop-map {
  height: 62mm;
}

@media (max-width: 991.98px) {
  .shipment-report-stop-operational {
    grid-template-columns: minmax(0, 1fr);
  }

  .shipment-report-stop-touch-actions {
    justify-content: flex-start;
  }
}

.shipment-stop-marker-shell,
.shipment-origin-marker-shell,
.shipment-opportunity-marker-shell {
  background: transparent;
  border: 0;
}

.shipment-origin-marker {
  display: grid;
  grid-template-columns: auto auto;
  gap: .2rem;
  width: 42px;
  height: 42px;
  place-content: center;
  align-items: center;
  color: #fff;
  font-weight: 800;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #198754;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .3);
  transform: rotate(-45deg);
}

.shipment-origin-marker > * {
  transform: rotate(45deg);
}

.shipment-stop-marker,
.shipment-opportunity-marker {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  font-weight: 800;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--mascarello-primary);
  box-shadow: 0 3px 9px rgba(0, 0, 0, .28);
  transform: rotate(-45deg);
}

.shipment-stop-marker::after,
.shipment-opportunity-marker::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(var(--mascarello-primary-rgb), .22);
  border-radius: inherit;
}

.shipment-stop-marker,
.shipment-opportunity-marker {
  line-height: 1;
}

.shipment-stop-marker > *,
.shipment-opportunity-marker > *,
.shipment-opportunity-marker i {
  display: inline-block;
  transform: rotate(45deg);
}

.shipment-opportunity-marker {
  color: #332701;
  background: #ffc107;
}

.shipment-opportunity-marker::after {
  border-color: rgba(255, 193, 7, .35);
}

.shipment-opportunity-marker.is-available {
  color: #fff;
  background: #68727d;
}

.shipment-opportunity-marker.is-available::after {
  border-color: rgba(104, 114, 125, .35);
}

.shipment-opportunity-card {
  padding: .65rem;
  border: 1px solid rgba(240, 173, 0, .25);
  border-radius: .6rem;
  background: var(--bs-body-bg);
}

.shipment-map-position-editor {
  background: rgba(13, 110, 253, .04);
}

.shipment-position-icon {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  color: #fff;
  font-size: 1.25rem;
  border-radius: .7rem;
  background: #0d6efd;
}

.shipment-map-popup {
  min-width: 12rem;
}

@media (max-width: 1199.98px) {
  .shipment-map-sidepanel {
    min-height: auto;
    border-left: 0 !important;
    border-top: 1px solid var(--bs-border-color);
  }

  .shipment-map-stop-list {
    max-height: 18rem;
  }
}

@media (max-width: 575.98px) {
  .shipment-run-selector {
    grid-template-columns: 1fr;
  }

  .shipment-run-selector-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .shipment-run-selector-meta {
    grid-column: 1;
    justify-items: start;
    grid-template-columns: auto auto;
    align-items: center;
  }

  .shipment-run-selector-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .shipment-secondary-panel > summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .shipment-secondary-panel > summary > small {
    grid-column: 1;
  }

  .shipment-secondary-panel > summary > .bi-chevron-down {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .shipment-route-map {
    min-height: 26rem;
  }

  .shipment-map-toolbar > * {
    width: 100%;
  }

  .shipment-map-toolbar .btn,
  .shipment-map-toolbar form {
    flex: 1 1 auto;
  }
}

.product-sales-chart {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.product-sales-row {
  display: grid;
  grid-template-columns: minmax(13rem, 30%) minmax(0, 1fr);
  align-items: center;
  gap: 1rem 1.5rem;
}

.product-sales-label {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.product-sales-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-sales-rank {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(var(--mascarello-primary-rgb), .14);
  border-radius: .65rem;
  color: var(--mascarello-primary);
  background: rgba(var(--mascarello-primary-rgb), .06);
  font-size: .78rem;
  font-weight: 750;
}

.product-sales-track {
  height: .78rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  box-shadow: inset 0 0 0 1px rgba(29, 37, 48, .045);
}

.product-sales-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mascarello-primary), #b64d62);
  box-shadow: 0 .15rem .45rem rgba(var(--mascarello-primary-rgb), .22);
}

.product-gifts-card .product-sales-rank {
  border-color: rgba(var(--bs-warning-rgb), .3);
  color: var(--bs-warning-text-emphasis);
  background: rgba(var(--bs-warning-rgb), .12);
}

.product-gifts-card .product-sales-bar {
  background: linear-gradient(90deg, #a76b00, var(--bs-warning));
  box-shadow: 0 .15rem .45rem rgba(var(--bs-warning-rgb), .25);
}

@media (max-width: 767.98px) {
  .app-footer-content {
    flex-direction: column;
  }

  .app-release {
    white-space: normal;
  }

  .product-sales-row {
    grid-template-columns: minmax(0, 1fr);
    gap: .65rem;
  }

  .product-sales-plot {
    padding-left: 2.75rem;
  }

  .shipment-report-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .shipment-report-actions .btn {
    min-height: 3rem;
  }

  .shipment-report-header .card-body {
    padding: 1.25rem !important;
  }

  .shipment-report-header .display-6 {
    font-size: 1.75rem;
  }

  .shipment-report-brand {
    margin-bottom: 1.25rem !important;
  }

  .shipment-report-brand small {
    display: none;
  }

  .shipment-report-driver-nav {
    top: .35rem;
    margin-right: -.35rem;
    margin-left: -.35rem;
    border-radius: .75rem;
  }

  .shipment-report-driver-nav .text-body-secondary {
    font-size: .78rem;
  }

  .shipment-report-stop-link {
    min-width: 9.75rem;
  }

  .shipment-report-map {
    min-height: 20rem;
  }

  .shipment-report-stop {
    margin-right: -.35rem;
    margin-left: -.35rem;
    scroll-margin-top: 8rem;
  }

  .shipment-report-stop .card-header {
    padding: 1rem;
  }

  .shipment-report-stop .card-header h2 {
    font-size: 1.15rem;
  }

  .shipment-report-stop .card-header > .text-end {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    text-align: left !important;
  }

  .shipment-report-stop .card-header > .text-end strong {
    margin-top: 0 !important;
    font-size: 1.15rem !important;
  }

  .shipment-report-stop-operational {
    padding: 1rem;
  }

  .shipment-report-stop-touch-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .shipment-report-stop-touch-actions .btn {
    width: 100%;
    min-height: 3.35rem;
    font-size: 1rem;
  }

  .shipment-report-stop-map-panel > .d-flex {
    align-items: flex-start !important;
  }

  .shipment-report-stop-map-panel .badge {
    display: none;
  }

  .shipment-report-stop-map {
    min-height: 18rem;
  }

  .shipment-report-stop-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .shipment-report-stop-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .shipment-report-stop-pager .btn {
    width: 100%;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  html,
  body.shipment-report-page {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  body.shipment-report-page {
    background: #fff !important;
    color: #111 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.shipment-report-page .app-header,
  body.shipment-report-page .app-sidebar,
  body.shipment-report-page .app-content-header,
  body.shipment-report-page .app-footer,
  body.shipment-report-page .shipment-report-actions,
  body.shipment-report-page .shipment-report-driver-nav,
  body.shipment-report-page .shipment-report-stop-touch-actions,
  body.shipment-report-page .shipment-report-stop-pager,
  body.shipment-report-page .leaflet-control-zoom {
    display: none !important;
  }

  body.shipment-report-page .app-wrapper,
  body.shipment-report-page .app-main,
  body.shipment-report-page .app-content,
  body.shipment-report-page .app-content > .container-fluid {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  body.shipment-report-page .shipment-report,
  body.shipment-report-page #shipment-route-overview,
  body.shipment-report-page .shipment-report-stops,
  body.shipment-report-page .shipment-report-stop {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  body.shipment-report-page .shipment-report {
    font-size: 9.5pt;
  }

  body.shipment-report-page .shipment-report .card {
    border: 1px solid #d8d8d8 !important;
    box-shadow: none !important;
  }

  body.shipment-report-page .shipment-report-header .card-body {
    padding: 6mm !important;
  }

  body.shipment-report-page .shipment-report-brand {
    margin-bottom: 3mm !important;
  }

  body.shipment-report-page .shipment-report .table-responsive {
    overflow: visible !important;
  }

  body.shipment-report-page .shipment-report table {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 8.25pt;
  }

  body.shipment-report-page .shipment-report-header,
  body.shipment-report-page .shipment-report .row > div {
    break-inside: avoid;
  }

  body.shipment-report-page .shipment-report-stop {
    break-before: page;
    break-inside: auto;
    overflow: visible !important;
  }

  body.shipment-report-page .shipment-report-stop .card-header,
  body.shipment-report-page .shipment-report-stop-operational,
  body.shipment-report-page .shipment-report-stop-map-panel,
  body.shipment-report-page .shipment-report-stop-footer {
    break-inside: avoid;
  }

  body.shipment-report-page .shipment-report-map,
  body.shipment-report-page .shipment-report-stop-map {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    clip-path: inset(0);
    break-inside: avoid;
    page-break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.shipment-report-page .shipment-report-map {
    height: 78mm !important;
  }

  body.shipment-report-page .shipment-report-stop-map {
    height: 62mm !important;
  }

  body.shipment-report-page .shipment-report-stop-map-panel {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body.shipment-report-page .leaflet-container,
  body.shipment-report-page .leaflet-control-container {
    max-width: 100% !important;
  }

  body.shipment-report-page .leaflet-control-attribution {
    max-width: calc(100% - 8mm);
    font-size: 6pt;
    white-space: normal;
  }

  body.shipment-report-page .shipment-report a {
    color: inherit !important;
    text-decoration: none !important;
  }

  body.printing-order-summary {
    background: #fff !important;
    color: #111 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body.printing-order-summary .app-header,
  body.printing-order-summary .app-sidebar,
  body.printing-order-summary .app-content-header,
  body.printing-order-summary .app-footer,
  body.printing-order-summary .modal-backdrop,
  body.printing-order-summary .app-content > .container-fluid > .alert,
  body.printing-order-summary .call-console > :not(.order-completion-summary),
  body.printing-order-summary .order-completion-summary .modal-footer {
    display: none !important;
  }

  body.printing-order-summary .app-wrapper,
  body.printing-order-summary .app-main,
  body.printing-order-summary .app-content,
  body.printing-order-summary .app-content > .container-fluid,
  body.printing-order-summary .call-console {
    display: block !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.printing-order-summary .order-completion-summary {
    position: static !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
  }

  body.printing-order-summary .order-completion-summary .modal-dialog,
  body.printing-order-summary .order-completion-summary .modal-content,
  body.printing-order-summary .order-completion-summary .modal-body {
    position: static !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    transform: none !important;
    box-shadow: none !important;
  }

  body.printing-order-summary .order-completion-summary .modal-content {
    border: 0 !important;
  }

  body.printing-order-summary .order-completion-summary .modal-body,
  body.printing-order-summary .order-completion-summary .modal-header {
    padding-right: 0 !important;
    padding-left: 0 !important;
  }

  body.printing-order-summary .order-completion-summary .table-responsive {
    overflow: visible !important;
  }
}

@media (max-width: 419.98px) {
  .product-sales-plot {
    padding-left: 0;
  }

  .product-sales-totals {
    flex-direction: column;
    align-items: flex-start !important;
    gap: .15rem !important;
  }
}

.call-calendar section {
  transition: background-color .15s ease;
}

.call-calendar section:hover {
  background-color: rgba(var(--mascarello-primary-rgb), .025) !important;
}

.call-calendar article {
  border-left-width: .2rem !important;
}

.call-console [data-bulk-actions] {
  bottom: .75rem;
  z-index: 1020;
  border: 1px solid rgba(var(--mascarello-primary-rgb), .18);
  box-shadow: 0 .65rem 1.75rem rgba(29, 37, 48, .14);
}

.call-console [data-target-checkbox],
.call-console [data-select-page] {
  width: 1.05rem;
  height: 1.05rem;
  cursor: pointer;
}

.call-console [data-filtered-selection-active] {
  box-shadow: inset .2rem 0 0 var(--bs-success);
}

.call-console [data-filtered-selection-banner] {
  box-shadow: inset .2rem 0 0 var(--mascarello-primary);
}

.menu-create-card,
.menu-editor-card {
  border-radius: 1rem;
  overflow: hidden;
}

.menu-create-card .card-header,
.menu-editor-card .card-header {
  background: linear-gradient(135deg, rgba(var(--mascarello-primary-rgb), .055), transparent 70%);
  border-bottom-color: rgba(29, 37, 48, .08);
}

.menu-create-icon,
.menu-icon-preview {
  display: inline-grid;
  place-items: center;
  color: var(--mascarello-primary);
  background: rgba(var(--mascarello-primary-rgb), .09);
}

.menu-create-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: .75rem;
}

.menu-icon-preview {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(var(--mascarello-primary-rgb), .12);
  border-radius: .55rem;
}

.menu-field-disabled {
  opacity: .45;
}

.menu-editor-table {
  min-width: 1180px;
}

.menu-editor-table th {
  color: var(--mascarello-muted);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-editor-table .menu-group-row > td {
  background-color: rgba(var(--mascarello-primary-rgb), .035);
  border-top-color: rgba(var(--mascarello-primary-rgb), .13);
}

.menu-editor-table .menu-child-row > td:first-child {
  padding-left: 1.5rem;
}

.menu-branch {
  color: rgba(var(--mascarello-primary-rgb), .65);
  font-size: 1.15rem;
  font-weight: 700;
}

.menu-name-fields {
  min-width: 11rem;
  width: 14rem;
}

.menu-icon-input {
  color: var(--mascarello-muted);
  font-size: .75rem;
}

.menu-route-input {
  min-width: 12rem;
}

.menu-position-select {
  min-width: 12rem;
}

.menu-permission-select {
  min-width: 15rem;
}

.menu-order-input {
  width: 5.25rem;
}

@media (max-width: 767.98px) {
  .app-content-header .d-flex {
    align-items: flex-start !important;
    flex-direction: column;
    gap: .75rem;
  }

  .call-queue-panel {
    min-height: auto;
  }

  .call-console-dashboard .call-queue-scroll {
    max-height: 60vh;
  }

  .call-console-dashboard .call-console-actions {
    width: 100%;
  }

  .call-console-dashboard .call-console-primary-actions {
    flex: 1 1 100%;
  }

  .call-console-dashboard .call-console-primary-actions > .btn {
    flex: 1 1 auto;
  }

  .call-console-dashboard .call-console-secondary-tools {
    flex: 1 1 100%;
  }

  .call-console-dashboard .call-console-secondary-tools-summary {
    width: 100%;
    text-align: left;
  }

  .call-console-dashboard .call-console-secondary-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem !important;
    padding-top: .5rem;
  }

  .call-console-dashboard .call-console-secondary-actions > .btn {
    min-width: 0;
  }

  .call-console-dashboard .call-console-filter-body {
    padding-top: .75rem !important;
  }

  .call-console .display-6 {
    font-size: clamp(1.65rem, 9vw, 2.5rem);
  }

  .call-console [data-bulk-actions] {
    bottom: 0;
  }

  .call-draft-floating-action {
    right: .75rem;
    bottom: max(.75rem, env(safe-area-inset-bottom));
    left: .75rem;
  }

  .call-draft-floating-action .btn {
    width: 100%;
  }
}

.follow-up-list-header {
  gap: 1rem 1.5rem;
}

.follow-up-list-summary {
  flex: 1 1 14rem;
  min-width: 12rem;
}

.follow-up-filter-form {
  display: grid;
  flex: 1 1 46rem;
  grid-template-columns: minmax(16rem, 1.7fr) minmax(12rem, 1fr) auto auto;
  gap: .6rem;
  align-items: stretch;
  max-width: 58rem;
}

.follow-up-filter-form .input-group-text {
  color: var(--mascarello-primary);
  background: rgba(var(--mascarello-primary-rgb), .055);
  border-color: rgba(var(--mascarello-primary-rgb), .16);
}

.follow-up-filter-form .form-control,
.follow-up-filter-form .form-select {
  border-color: rgba(29, 37, 48, .14);
}

.follow-up-filter-form .form-control:focus,
.follow-up-filter-form .form-select:focus {
  border-color: rgba(var(--mascarello-primary-rgb), .45);
  box-shadow: 0 0 0 .2rem rgba(var(--mascarello-primary-rgb), .1);
}

.follow-up-filter-form .input-group-text,
.follow-up-filter-form .form-control,
.follow-up-filter-form .form-select,
.follow-up-filter-form .btn {
  min-height: 2.7rem;
}

.follow-up-filter-form .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  .follow-up-list-summary {
    flex-basis: 100%;
  }

  .follow-up-filter-form {
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  .follow-up-filter-form {
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
  }

  .follow-up-search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 575.98px) {
  .follow-up-filter-form {
    grid-template-columns: 1fr;
  }

  .follow-up-search-field,
  .follow-up-period-field,
  .follow-up-filter-submit,
  .follow-up-filter-reset {
    grid-column: 1;
    width: 100%;
  }
}

/* Editor ordini: la tabella conserva la densità desktop e diventa una serie
   di schede operative su schermi piccoli, senza modificare i campi del form. */
.order-editor-mobile-savebar {
  display: none;
}

@media (max-width: 767.98px) {
  .order-editor {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }

  .order-editor-lines-responsive {
    overflow: visible;
  }

  .order-editor-lines-table,
  .order-editor-lines-table > tbody,
  .order-editor-lines-table > tfoot,
  .order-editor-lines-table > tbody > tr,
  .order-editor-lines-table > tbody > tr > td {
    display: block;
    width: 100%;
  }

  .order-editor-lines-table > thead {
    display: none;
  }

  .order-editor-lines-table > tbody {
    display: grid;
    gap: .85rem;
    padding: .85rem;
  }

  .order-editor-lines-table > tbody > tr {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(29, 37, 48, .12);
    border-radius: .8rem;
    background: var(--bs-body-bg);
    box-shadow: 0 .15rem .5rem rgba(29, 37, 48, .04);
  }

  .order-editor-lines-table > tbody > tr.table-success {
    border-color: rgba(var(--bs-success-rgb), .35);
  }

  .order-editor-lines-table > tbody > tr.table-warning {
    border-color: rgba(var(--bs-warning-rgb), .52);
  }

  .order-editor-lines-table > tbody > tr > td {
    display: grid;
    grid-template-columns: minmax(6.5rem, .8fr) minmax(0, 1.2fr);
    gap: .45rem .75rem;
    align-items: center;
    padding: .65rem .8rem !important;
    border: 0;
    border-bottom: 1px solid rgba(29, 37, 48, .075);
    text-align: left !important;
  }

  .order-editor-lines-table > tbody > tr > td::before {
    color: var(--mascarello-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .order-editor-lines-table > tbody > tr > td[data-order-field="product"] {
    grid-template-columns: 1fr;
    padding-top: .85rem !important;
  }

  .order-editor-lines-table > tbody > tr > td[data-order-field="product"] .form-select,
  .order-editor-lines-table > tbody > tr > td[data-order-field="quantity"] .form-control {
    min-width: 0;
  }

  .order-editor-lines-table > tbody > tr > td[data-order-field="gift"] small,
  .order-editor-lines-table > tbody > tr > td[data-order-field="list-price"] small {
    grid-column: 2;
  }

  .order-editor-lines-table > tbody > tr > td[data-order-field="list-price"],
  .order-editor-lines-table > tbody > tr > td[data-order-field="line-total"] {
    font-weight: 650;
  }

  .order-editor-lines-table > tbody > tr > td[data-order-field="remove"] {
    grid-template-columns: 1fr;
    padding-bottom: .8rem !important;
    border-bottom: 0;
  }

  .order-editor-lines-table > tbody > tr > td[data-order-field="remove"]::before {
    display: none;
  }

  .order-editor-lines-table > tbody > tr > td[data-order-field="remove"] .btn {
    min-height: 2.65rem;
  }

  .order-editor-lines-table > tfoot {
    display: grid;
    gap: 0;
    padding: 0 .85rem .85rem;
  }

  .order-editor-lines-table > tfoot > tr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    border-bottom: 1px solid rgba(29, 37, 48, .075);
  }

  .order-editor-lines-table > tfoot > tr > th {
    padding: .65rem 0 !important;
    border: 0;
  }

  .order-editor-lines-table > tfoot > tr > th:first-child {
    flex: 1 1 auto;
    text-align: left !important;
  }

  .order-editor-lines-table > tfoot > tr > th:nth-last-child(2) {
    flex: 0 0 auto;
    text-align: right !important;
  }

  .order-editor-lines-table > tfoot > tr > th:last-child {
    display: none;
  }

  .order-editor-lines-table > tfoot > tr:last-child {
    border-bottom: 0;
  }

  .order-editor-footer [data-save-order] {
    display: none;
  }

  .order-editor-mobile-savebar {
    position: fixed;
    z-index: 1025;
    right: .75rem;
    bottom: max(.75rem, env(safe-area-inset-bottom));
    left: .75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .5rem .55rem .5rem .85rem;
    border: 1px solid rgba(var(--mascarello-primary-rgb), .2);
    border-radius: .85rem;
    background: rgba(var(--bs-body-bg-rgb), .96);
    box-shadow: 0 .6rem 1.6rem rgba(29, 37, 48, .2);
    backdrop-filter: blur(.55rem);
  }

  .order-editor-mobile-total {
    display: grid;
    min-width: 0;
    color: var(--mascarello-muted);
    font-size: .76rem;
    font-weight: 650;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .order-editor-mobile-total strong {
    overflow: hidden;
    color: var(--mascarello-primary);
    font-size: 1.1rem;
    letter-spacing: 0;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
  }

  .order-editor-mobile-savebar .btn {
    min-height: 2.75rem;
    flex: 0 0 auto;
    padding-right: 1rem;
    padding-left: 1rem;
  }
}

/* Shared operating patterns: clear identity, visible state, accessible controls. */
.account-menu-toggle { min-height: 44px; min-width: 44px; }
[data-invoiced-edit-action][hidden] { display: none !important; }
.account-avatar { background: rgba(var(--mascarello-primary-rgb), .1); color: var(--mascarello-primary); }
.list-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem .25rem; }
.form-feedback { flex-basis: 100%; margin: .75rem; padding: .65rem .85rem; text-wrap: pretty; }
.form-feedback:empty { display: none; }
[data-price-list-tag-selector][aria-invalid="true"] { border: 1px solid var(--bs-danger); border-radius: .5rem; padding: 1rem; }
.form-feedback:focus { outline: 3px solid rgba(var(--mascarello-primary-rgb), .45); outline-offset: 2px; }
form[aria-busy="true"] { cursor: progress; }
form[data-invoiced-form] .form-feedback { min-width: 8rem; max-width: 18rem; margin: .35rem 0; padding: .35rem .5rem; white-space: normal; }
.sidebar-menu .nav-link:focus-visible, .account-menu-toggle:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid rgba(var(--mascarello-primary-rgb), .65); outline-offset: 3px; }
.app-sidebar a:focus-visible { outline-color: #f2c24f; }
.calendar-mobile-agenda .list-group-item { padding: .85rem; }
.calendar-mobile-agenda a { display: inline-block; padding-block: .2rem; overflow-wrap: anywhere; }

@media (max-width: 575.98px) {
  .list-pagination { align-items: stretch; padding: .75rem .25rem; }
  .list-pagination > div { width: 100%; justify-content: space-between; }
  .list-pagination .btn { min-height: 44px; display: inline-flex; align-items: center; }
  .pipeline-board { display: grid; grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .pipeline-column { width: 100%; min-width: 0; }
  .pipeline-column .card-body { overflow-wrap: anywhere; }
  table[data-mobile-ready], table[data-mobile-ready] > tbody { display: block; width: 100%; }
  table[data-mobile-ready] > thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  table[data-mobile-ready] > tbody > tr { display: grid; grid-template-columns: minmax(0, 1fr); margin: .75rem; border: 1px solid var(--bs-border-color); border-radius: .75rem; overflow: hidden; }
  table[data-mobile-ready] > tbody > tr > td { display: block; width: 100%; min-width: 0; padding: .65rem .85rem; border: 0; border-bottom: 1px solid var(--bs-border-color-translucent); text-align: left !important; white-space: normal !important; overflow-wrap: anywhere; }
  table[data-mobile-ready] > tbody > tr > td[data-label]::before { content: attr(data-label); display: block; margin-bottom: .2rem; color: var(--mascarello-muted); font-size: .76rem; font-weight: 650; }
  table[data-mobile-ready] > tbody > tr > td:first-child { background: var(--bs-tertiary-bg); }
  table[data-mobile-ready] > tbody > tr > td:last-child { border-bottom: 0; }
  table[data-mobile-ready] .btn { min-height: 40px; min-width: 40px; }
  table[data-mobile-ready] .text-nowrap { white-space: normal !important; }
  table[data-mobile-ready] form[data-invoiced-form] { display: flex !important; flex-wrap: wrap; align-items: center; gap: .5rem; }
  table[data-mobile-ready] form[data-invoiced-form] .form-feedback { flex-basis: 100%; max-width: none; }
  table[data-mobile-ready] .form-check-input { width: 1.35rem; height: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .call-console-disclosure-icon, .shipment-secondary-panel > summary > .bi-chevron-down { transition: none; }
}

.call-work-disclosure { min-width: 0; }
.call-work-disclosure > summary { cursor: pointer; list-style: none; }
.call-work-disclosure > summary::-webkit-details-marker { display: none; }
.call-work-disclosure[open] > summary .bi-chevron-down { transform: rotate(180deg); }
.call-work-disclosure[data-has-values="true"] > summary { cursor: default; }
.call-work-disclosure[data-has-values="true"] > summary .bi-chevron-down { visibility: hidden; }
.call-work-disclosure > summary { min-height: 44px; }
#call-close-actions { scroll-margin-block: 5rem 9rem; }

@media (max-width: 767.98px) {
  .call-console-dashboard { display: flex; flex-direction: column; }
  .call-console-dashboard > .order-value-strip { order: 1; margin-top: .75rem; }
  .call-work-page { padding-bottom: 8rem; }
  .call-mobile-order-summary { padding: .25rem .35rem .5rem; font-size: .85rem; font-weight: 650; overflow-wrap: anywhere; }
  .call-mobile-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; }
  .call-mobile-actions > .btn { min-width: 0; min-height: 44px; padding: .55rem .35rem; font-size: .88rem; box-shadow: none; }
}


/* Shared design tokens keep navigation and operational states consistent. */
.btn-outline-primary {
  --bs-btn-color: var(--mascarello-primary);
  --bs-btn-border-color: var(--mascarello-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--mascarello-primary-hover);
  --bs-btn-hover-border-color: var(--mascarello-primary-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--mascarello-primary-active);
  --bs-btn-active-border-color: var(--mascarello-primary-active);
  --bs-btn-disabled-color: var(--mascarello-primary);
  --bs-btn-disabled-border-color: var(--mascarello-primary);
  --bs-btn-focus-shadow-rgb: var(--mascarello-primary-rgb);
}
.btn-primary { --bs-btn-focus-shadow-rgb: var(--mascarello-primary-rgb); }
.alert-primary { --bs-alert-color: var(--bs-primary-text-emphasis); --bs-alert-bg: var(--mascarello-primary-soft); --bs-alert-border-color: var(--bs-primary-border-subtle); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--mascarello-primary); box-shadow: 0 0 0 .2rem rgba(var(--mascarello-primary-rgb), .18); }
.form-check-input:checked { background-color: var(--mascarello-primary); border-color: var(--mascarello-primary); }
.btn-check:focus-visible + .btn { outline: 3px solid rgba(var(--mascarello-primary-rgb), .65); outline-offset: 3px; }
.status-badge { font-size: .78rem; font-weight: 650; padding: .38rem .55rem; border: 1px solid transparent; line-height: 1.2; white-space: normal; text-align: left; }
.status-primary { color: var(--mascarello-primary); background: var(--mascarello-primary-soft); border-color: var(--bs-primary-border-subtle); }
.status-success { color: var(--mascarello-success); background: var(--mascarello-success-soft); border-color: #bad8c7; }
.status-warning { color: var(--mascarello-warning); background: var(--mascarello-warning-soft); border-color: #ead694; }
.status-danger { color: var(--mascarello-danger); background: var(--mascarello-danger-soft); border-color: #e4b9c0; }
.status-neutral { color: var(--mascarello-neutral); background: var(--mascarello-neutral-soft); border-color: var(--mascarello-border); }
.list-filter-bar, .list-filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.list-filter-bar { justify-content: space-between; }
.list-filter-controls { flex: 1 1 30rem; }
.list-filter-search { max-width: 30rem; flex: 1 1 18rem; }
.list-filter-bar > .btn { flex-shrink: 0; }
.detail-label { display: block; color: var(--mascarello-muted); font-size: .75rem; font-weight: 650; margin-bottom: .25rem; }
.shared-empty-state { gap: .55rem; padding: 2.5rem 1rem; text-align: center; }
.shared-empty-state p { max-width: 34rem; }
.shared-empty-state > i { color: var(--mascarello-primary); }
.order-value-card .order-value-icon { color: var(--mascarello-primary) !important; background: var(--mascarello-primary-soft) !important; }
.order-value-card, .call-kpi { box-shadow: var(--mascarello-shadow) !important; }
.commercial-summary { border: 1px solid var(--mascarello-border); border-radius: var(--mascarello-radius); background: var(--bs-body-bg); }
.commercial-summary-toggle { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 48px; padding: .7rem 1rem; cursor: pointer; list-style: none; }
.commercial-summary-toggle::-webkit-details-marker, .call-customer-details > summary::-webkit-details-marker { display: none; }
.commercial-summary[open] > summary > .bi-chevron-down, .call-customer-details[open] > summary .bi-chevron-down { transform: rotate(180deg); }
.call-customer-details > summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
.call-work-page [data-call-contact-phone] { font-size: clamp(1.3rem, 2vw, 1.7rem) !important; overflow-wrap: anywhere; }
.call-queue-last-order { display: grid; grid-template-columns: 1fr auto; gap: .1rem .5rem; align-items: baseline; padding: .45rem .55rem; border: 1px solid rgba(var(--mascarello-primary-rgb), .18); border-radius: .45rem; background: rgba(var(--mascarello-primary-rgb), .045); }
.call-queue-last-order > small { grid-column: 1 / -1; }
.call-customer-secondary-phone { overflow-wrap: anywhere; }
[data-swiss-canton-group][hidden] { display: none !important; }
.order-list-table { width: 100%; table-layout: fixed; }
.order-list-table thead th { font-size: .78rem; font-weight: 650; color: var(--mascarello-muted); background: var(--bs-tertiary-bg); }
.order-list-table thead th:nth-child(1) { width: 17%; }
.order-list-table thead th:nth-child(2) { width: 20%; }
.order-list-table thead th:nth-child(3) { width: 17%; }
.order-list-table thead th:nth-child(4) { width: 15%; }
.order-list-table thead th:nth-child(5) { width: 11%; }
.order-list-table thead th:nth-child(6) { width: 20%; }
.order-list-summary > td { padding: .85rem .8rem .45rem; border: 0; }
.order-list-summary:hover > td { background: rgba(var(--mascarello-primary-rgb), .025); }
.order-list-identity a, .order-list-customer a { display: inline-block; max-width: 100%; }
.order-identifier { white-space: nowrap; font-size: .95rem; }
.order-list-customer, .order-list-operator { overflow-wrap: anywhere; }
.order-list-actions .btn { min-height: 40px; white-space: nowrap; }
.order-list-actions > .d-flex { flex-wrap: nowrap !important; }
.order-list-secondary > td { padding: 0 .8rem .35rem; border-color: var(--mascarello-border); }
.order-list-review { border-left: 3px solid var(--mascarello-danger); }
.order-list-details > summary { display: flex; justify-content: space-between; align-items: center; gap: .75rem; min-height: 36px; padding: .3rem 0; color: var(--mascarello-muted); font-size: .8rem; cursor: pointer; list-style: none; }
.order-list-details > summary::-webkit-details-marker { display: none; }
.order-list-details[open] > summary > .bi-chevron-down { transform: rotate(180deg); }
.order-list-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: .75rem 0 1rem; font-size: .9rem; }
.order-list-invoiced .form-check { min-height: 40px; display: flex; align-items: center; gap: .5rem; padding-left: 0; }
.order-list-invoiced .form-check-input { float: none; margin: 0; width: 1.2rem; height: 1.2rem; flex-shrink: 0; }
.order-list-mobile-label { display: none; }
#shipment-run-create { scroll-margin-top: 1rem; }

@media (max-width: 991.98px) {
  .order-list-table thead th:nth-child(1) { width: 17%; }
  .order-list-table thead th:nth-child(2) { width: 20%; }
  .order-list-table thead th:nth-child(3) { width: 17%; }
  .order-list-table thead th:nth-child(4) { width: 17%; }
  .order-list-table thead th:nth-child(5) { width: 11%; }
  .order-list-table thead th:nth-child(6) { width: 18%; }
  .order-list-detail-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .order-list-actions .btn { padding: .35rem .5rem; }
}
@media (max-width: 767.98px) {
  .call-console-primary-actions .btn { min-height: 40px; }
  .commercial-summary-toggle small { display: block; margin-left: 0 !important; }
  .list-filter-bar > .btn { width: 100%; }
  .list-filter-controls { flex-basis: 100%; }
  .list-filter-controls > .form-select { flex: 1 1 10rem; width: 100% !important; }
  .order-list-scroll { overflow: visible; }
  .order-list-table, .order-list-table > tbody { display: block; width: 100%; }
  .order-list-table > thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .order-list-table > .order-list-item { margin: .75rem; width: auto; border: 1px solid var(--mascarello-border); border-radius: var(--mascarello-radius); overflow: hidden; }
  .order-list-table > .order-list-review { border-left: 3px solid var(--mascarello-danger); }
  .order-list-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'identity identity' 'customer customer' 'operator operator' 'status total' 'actions actions'; gap: .6rem .75rem; padding: .8rem; }
  .order-list-table .order-list-summary > td { display: block; min-width: 0; padding: 0; border: 0; background: none; }
  .order-list-identity { grid-area: identity; }
  .order-list-customer { grid-area: customer; }
  .order-list-operator { grid-area: operator; }
  .order-list-status { grid-area: status; }
  .order-list-total { grid-area: total; align-self: end; }
  .order-list-actions { grid-area: actions; }
  .order-list-actions .d-flex { justify-content: flex-start !important; }
  .order-list-actions .btn { min-height: 44px; padding: .4rem .85rem; }
  .order-list-mobile-label { display: block; font-size: .75rem; color: var(--mascarello-muted); font-weight: 400; }
  .order-list-secondary, .order-list-secondary > td { display: block; width: 100%; }
  .order-list-secondary > td { padding: 0 .8rem; border-top: 1px solid var(--mascarello-border); border-bottom: 0; }
  .order-list-details > summary { min-height: 44px; }
  .order-list-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
  .order-list-invoiced { grid-column: 1 / -1; }
}

.row > div:has(> [data-swiss-canton-group][hidden]) { display: none; }

.driver-offline-panel > summary { cursor: pointer; list-style: none; min-height: 48px; }
.driver-offline-panel > summary::-webkit-details-marker { display: none; }
.driver-offline-panel[open] > summary > .bi-chevron-down { transform: rotate(180deg); }
.driver-offline-panel .btn { min-height: 44px; }

/* Contain absolute table labels and keep the map legend inside small screens. */
.table-responsive { position: relative; }
.shipment-map-legend { max-width: calc(100% - 2rem); flex-wrap: wrap; gap: .35rem .75rem; }

.shipment-order-assign { min-width: 11rem; }
.shipment-order-assign > summary { list-style: none; cursor: pointer; }
.shipment-order-assign > summary::-webkit-details-marker { display: none; }
.shipment-order-assign[open] > summary > .bi-chevron-down { transform: rotate(180deg); }
