<style>
  .asporto-prep-station,
  .asporto-pick-layout,
  .asporto-prep-layout,
  .asporto-call-layout {
    --asp-prep: #f58220;
    --asp-prep-soft: rgba(245, 130, 32, .14);
    --asp-call: #602d91;
    --asp-pick: #0d9488;
    --asp-time: #15265c;
    --asp-surface: var(--bs-card-bg);
    --asp-surface-2: var(--bs-tertiary-bg);
    --asp-border: var(--bs-border-color);
    --asp-text: var(--bs-body-color);
    --asp-muted: var(--bs-secondary-color);
    --asp-shadow: 0 6px 18px rgba(var(--bs-body-color-rgb, 21, 38, 92), .08);
    --asp-radius: var(--bs-border-radius, .375rem);
    --asp-radius-sm: var(--bs-border-radius, .375rem);
    --asp-h: calc(100vh - 9.5rem);
  }

  [data-bs-theme="dark"] .asporto-prep-station,
  [data-bs-theme="dark"] .asporto-pick-layout,
  [data-bs-theme="dark"] .asporto-prep-layout,
  [data-bs-theme="dark"] .asporto-call-layout {
    --asp-time: #9db0e8;
    --asp-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  }

  .asporto-prep-station {
    display: grid;
    grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
    gap: .85rem;
    min-height: var(--asp-h);
    height: var(--asp-h);
  }

  .asporto-prep-queue,
  .asporto-prep-detail {
    background: var(--asp-surface);
    border: 0;
    border-radius: var(--asp-radius);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    box-shadow: none;
  }

  .asporto-prep-queue__head,
  .asporto-prep-detail__head,
  .asporto-done-lane__head,
  .asporto-time-lane__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    min-height: 2.15rem;
    padding: .28rem .75rem;
    border-bottom: 3px solid var(--asp-prep);
    background: transparent;
    border-top: 0;
    border-radius: var(--asp-radius) var(--asp-radius) 0 0;
  }

  .asporto-lane-brand {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--asp-prep);
    min-width: 0;
  }

  .asporto-lane-brand > i {
    font-size: 1.15rem;
    line-height: 1;
  }

  .asporto-prep-queue__title,
  .asporto-prep-detail__title,
  .asporto-done-lane__title,
  .asporto-time-lane__title {
    margin: 0;
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--asp-text);
    line-height: 1;
  }

  .asporto-lane-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.4rem;
    padding: 0 .4rem;
    border-radius: var(--bs-border-radius-sm, .25rem);
    border: 1px solid var(--asp-border);
    background: var(--asp-surface);
    font-size: .85rem;
    font-weight: 800;
    line-height: 1;
    color: var(--asp-text);
  }

  .asporto-lane-count--pick {
    border-color: color-mix(in srgb, var(--asp-pick) 45%, var(--asp-border));
    background: color-mix(in srgb, var(--asp-pick) 14%, transparent);
    color: var(--asp-pick);
  }

  .asporto-lane-count--done {
    border-color: rgba(108, 117, 125, .4);
    background: rgba(108, 117, 125, .12);
    color: #495057;
  }

  .asporto-lane-count--prep {
    border-color: color-mix(in srgb, var(--asp-prep) 45%, var(--asp-border));
    background: color-mix(in srgb, var(--asp-prep) 14%, transparent);
    color: var(--asp-prep);
  }

  .asporto-lane-count--call {
    border-color: color-mix(in srgb, var(--asp-call) 45%, var(--asp-border));
    background: color-mix(in srgb, var(--asp-call) 14%, transparent);
    color: var(--asp-call);
  }

  .asporto-done-lane__head {
    border-bottom-color: #6c757d;
  }

  .asporto-done-lane__head .asporto-lane-brand {
    color: #6c757d;
  }

  .asporto-time-lane__head {
    border-bottom-color: var(--asp-time);
  }

  .asporto-time-lane__head .asporto-lane-brand {
    color: var(--asp-time);
  }

  .asporto-prep-queue__body,
  .asporto-prep-detail__body {
    flex: 1;
    overflow-y: auto;
    padding: .75rem;
    min-height: 0;
  }

  .asporto-prep-queue__foot,
  .asporto-prep-detail__foot {
    padding: .65rem .75rem;
    border-top: 1px solid var(--asp-border);
    background: var(--asp-surface-2);
  }

  .asporto-prep-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .35rem .75rem;
    align-items: center;
    width: 100%;
    text-align: left;
    border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius-sm);
    padding: .85rem .9rem;
    margin-bottom: .65rem;
    background: var(--asp-surface-2);
    color: var(--asp-text);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
  }

  .asporto-prep-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--asp-shadow);
    border-color: color-mix(in srgb, var(--asp-prep) 45%, var(--asp-border));
    background: var(--asp-surface);
  }

  .asporto-prep-item.is-active {
    border-color: var(--asp-prep);
    background: var(--asp-prep-soft);
    box-shadow: inset 3px 0 0 var(--asp-prep), var(--asp-shadow);
  }

  .asporto-prep-item__code {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
  }

  .asporto-prep-item__cliente {
    font-size: .95rem;
    font-weight: 600;
    margin-top: .15rem;
  }

  .asporto-prep-item__meta {
    grid-column: 1 / -1;
    font-size: .8rem;
    color: var(--asp-muted);
  }

  .asporto-prep-item__ora {
    font-size: 1.2rem;
    font-weight: 800;
    padding: .3rem .55rem;
    border-radius: var(--asp-radius-sm);
    background: color-mix(in srgb, var(--asp-prep) 18%, transparent);
    color: var(--asp-prep);
    line-height: 1;
  }

  .asporto-prep-panel {
    display: none;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }

  .asporto-prep-panel.is-visible {
    display: flex;
  }

  .asporto-prep-panel__intro {
    margin-bottom: .85rem;
  }

  .asporto-prep-panel__code {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
  }

  .asporto-prep-panel__sub {
    color: var(--asp-muted);
    font-size: .95rem;
    margin-top: .25rem;
  }

  .asporto-prep-panel__note {
    margin-top: .65rem;
    padding: .65rem .8rem;
    border-radius: var(--asp-radius-sm);
    background: rgba(var(--bs-warning-rgb), .14);
    border: 1px solid rgba(var(--bs-warning-rgb), .35);
    color: var(--asp-text);
    font-weight: 700;
    font-size: 1rem;
  }

  .asporto-prep-progress {
    min-width: 4.5rem;
    text-align: center;
    padding: .4rem .55rem;
    border-radius: var(--asp-radius-sm);
    background: var(--asp-surface-2);
    border: 1px solid var(--asp-border);
    font-weight: 800;
    font-size: 1.15rem;
    line-height: 1.1;
    color: var(--asp-text);
  }

  .asporto-prep-progress small {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--asp-muted);
    margin-top: .15rem;
  }

  .asporto-prep-progress.is-complete {
    border-color: #198754;
    background: rgba(25, 135, 84, .14);
    color: #198754;
  }

  .asporto-check-item {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: .85rem;
    padding: .85rem 1rem;
    border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius-sm);
    margin-bottom: .5rem;
    background: var(--asp-surface-2);
    color: var(--asp-text);
    cursor: pointer;
    font-size: 1.15rem;
    line-height: 1.3;
    user-select: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, opacity .12s ease, transform .12s ease;
  }

  .asporto-check-item .form-check-input {
    width: 1.85rem;
    height: 1.85rem;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
  }

  .asporto-check-item__qta {
    font-size: 1.75rem;
    font-weight: 900;
    min-width: 2.6rem;
    color: var(--asp-prep);
    line-height: 1;
  }

  .asporto-check-item__nome {
    display: block;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: .01em;
    line-height: 1.2;
  }

  .asporto-check-item__varianti {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .4rem;
  }

  .asporto-check-item__variante {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .55rem;
    border-radius: var(--bs-border-radius-sm, .25rem);
    background: color-mix(in srgb, var(--asp-prep) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--asp-prep) 40%, var(--asp-border));
    color: var(--asp-text);
    font-size: 1.05rem;
    font-weight: 700;
  }

  .asporto-check-item__variante em {
    font-style: normal;
    font-weight: 600;
    color: var(--asp-muted);
  }

  .asporto-check-item__note {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .4rem;
    padding: .3rem .55rem;
    border-radius: var(--bs-border-radius-sm, .25rem);
    background: rgba(var(--bs-warning-rgb), .22);
    color: var(--asp-text);
    font-size: 1.05rem;
    font-weight: 700;
  }

  .asporto-check-item.is-next {
    border-color: var(--asp-prep);
    background: var(--asp-prep-soft);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, .18);
  }

  /* Righe spuntate: compatte, lasciano spazio alle voci ancora da fare */
  .asporto-check-item.is-done {
    opacity: .78;
    text-decoration: none;
    border-color: color-mix(in srgb, #198754 45%, var(--asp-border));
    background: rgba(25, 135, 84, .08);
    gap: .45rem;
    padding: .28rem .55rem;
    margin-bottom: .28rem;
    font-size: .92rem;
    line-height: 1.15;
    align-items: center;
  }

  .asporto-check-item.is-done .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
  }

  .asporto-check-item.is-done .asporto-check-item__qta {
    font-size: 1rem;
    min-width: 1.6rem;
    color: #198754;
  }

  .asporto-check-item.is-done .asporto-check-item__nome {
    text-decoration: line-through;
    opacity: .8;
    font-size: .95rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .asporto-check-item.is-done .asporto-check-item__varianti,
  .asporto-check-item.is-done .asporto-check-item__note {
    display: none;
  }

  .asporto-prep-continua {
    width: 100%;
    min-height: 3.5rem;
    font-size: 1.2rem;
    font-weight: 800;
  }

  .asporto-prep-continua.is-ready:not(:disabled) {
    animation: asporto-prep-pulse 1.15s ease-in-out infinite;
  }

  @keyframes asporto-prep-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 130, 32, .35); }
    50% { transform: scale(1.015); box-shadow: 0 0 0 8px rgba(245, 130, 32, 0); }
  }

  .asporto-prep-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--asp-muted);
    padding: 2rem;
    font-size: 1.1rem;
  }

  /* Postazione chiamata */
  .asporto-call-station {
    --asp-prep: var(--asp-call);
    --asp-prep-soft: rgba(96, 45, 145, .14);
  }

  .asporto-call-station .asporto-prep-item__ora {
    background: var(--asp-call);
    color: #fff;
  }

  /* Chiamata: orario, codice e ritardo più leggibili in coda */
  .asporto-call-station .asporto-queue-item__time .asporto-prep-item__ora {
    font-size: 1.25rem;
    font-weight: 900;
    padding: .3rem .55rem;
    background: var(--asp-call);
    border: 0;
    color: #fff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .12);
  }

  .asporto-call-station .asporto-queue-item__code {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: .03em;
    color: var(--asp-text);
  }

  .asporto-call-station .asporto-queue-item__time .asporto-timing-badge.is-visible {
    font-size: .72rem;
    font-weight: 900;
    padding: .18rem .4rem;
    border-width: 1.5px;
  }

  .asporto-call-station .asporto-queue-item[data-timing-level="late"] .asporto-timing-badge {
    color: #fff;
    background: #dc3545;
    border-color: #b02a37;
  }

  .asporto-call-station .asporto-queue-item[data-timing-level="soon"] .asporto-timing-badge {
    color: #fff;
    background: var(--asp-call);
    border-color: color-mix(in srgb, var(--asp-call) 80%, #000);
  }

  .asporto-call-station .asporto-queue-item[data-timing-level="ok"] .asporto-timing-badge {
    color: #fff;
    background: #198754;
    border-color: #146c43;
  }

  .asporto-call-station .btn-primary.asporto-prep-continua.is-ready:not(:disabled) {
    animation: asporto-call-pulse 1.15s ease-in-out infinite;
  }

  @keyframes asporto-call-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(96, 45, 145, .35); }
    50% { transform: scale(1.015); box-shadow: 0 0 0 8px rgba(96, 45, 145, 0); }
  }

  .asporto-call-phone {
    margin: .25rem 0 1.1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--asp-radius-sm);
    border: 1px solid color-mix(in srgb, var(--asp-call) 40%, var(--asp-border));
    background: rgba(96, 45, 145, .1);
    text-align: center;
    box-shadow: var(--asp-shadow);
  }

  .asporto-call-phone__label {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--asp-muted);
  }

  .asporto-call-phone__number {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-top: .35rem;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    color: var(--asp-call);
    text-decoration: none;
  }

  .asporto-call-phone__number:hover {
    text-decoration: underline;
  }

  .asporto-call-phone__hint {
    margin-top: .35rem;
    font-size: .85rem;
    color: var(--asp-muted);
  }

  .asporto-call-phone__missing {
    margin-top: .35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--asp-muted);
  }

  .asporto-call-riepilogo__item {
    padding: .85rem 1rem;
    border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius-sm);
    background: var(--asp-surface-2);
    margin-bottom: .55rem;
  }

  .asporto-call-riepilogo__main {
    display: flex;
    align-items: baseline;
    gap: .65rem;
  }

  .asporto-call-riepilogo__qta {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--asp-call);
  }

  .asporto-call-riepilogo__nome {
    font-size: 1.1rem;
    font-weight: 700;
  }

  /* Tabella riepilogo righe (chiamata / ritiro) */
  .asporto-call-station .asporto-ordine-table,
  .asporto-pick-station .asporto-ordine-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    color: var(--asp-text);
  }

  .asporto-call-station .asporto-ordine-table thead th,
  .asporto-pick-station .asporto-ordine-table thead th {
    padding: .4rem .55rem;
    border-bottom: 2px solid color-mix(in srgb, var(--asp-prep) 45%, var(--asp-border));
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--asp-prep);
    background: color-mix(in srgb, var(--asp-prep) 8%, var(--asp-surface));
    text-align: left;
    white-space: nowrap;
  }

  .asporto-call-station .asporto-ordine-table tbody td,
  .asporto-pick-station .asporto-ordine-table tbody td {
    padding: .42rem .55rem;
    border-bottom: 1px solid color-mix(in srgb, var(--asp-prep) 14%, var(--asp-border));
    vertical-align: top;
    line-height: 1.25;
  }

  .asporto-call-station .asporto-ordine-table tbody tr:nth-child(even) td,
  .asporto-pick-station .asporto-ordine-table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--asp-prep) 6%, var(--asp-surface));
  }

  .asporto-call-station .asporto-ordine-table tbody tr:last-child td,
  .asporto-pick-station .asporto-ordine-table tbody tr:last-child td {
    border-bottom: 0;
  }

  .asporto-call-station .asporto-ordine-table__qta,
  .asporto-pick-station .asporto-ordine-table__qta {
    width: 3.25rem;
    text-align: right;
    font-weight: 900;
    color: var(--asp-prep);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .asporto-call-station .asporto-ordine-table thead .asporto-ordine-table__qta,
  .asporto-pick-station .asporto-ordine-table thead .asporto-ordine-table__qta {
    text-align: right;
  }

  .asporto-call-station .asporto-ordine-table__nome,
  .asporto-pick-station .asporto-ordine-table__nome {
    display: block;
    font-weight: 800;
    font-size: .98rem;
    color: var(--asp-text);
  }

  .asporto-call-station .asporto-ordine-table__varianti,
  .asporto-pick-station .asporto-ordine-table__varianti,
  .asporto-call-station .asporto-ordine-table__note,
  .asporto-pick-station .asporto-ordine-table__note {
    display: flex;
    align-items: flex-start;
    gap: .35rem;
    margin-top: .35rem;
    padding: .35rem .5rem;
    border-radius: var(--bs-border-radius-sm, .25rem);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.3;
  }

  .asporto-call-station .asporto-ordine-table__varianti > i,
  .asporto-pick-station .asporto-ordine-table__varianti > i,
  .asporto-call-station .asporto-ordine-table__note > i,
  .asporto-pick-station .asporto-ordine-table__note > i {
    margin-top: .1rem;
    flex-shrink: 0;
    font-size: 1rem;
    line-height: 1;
  }

  .asporto-call-station .asporto-ordine-table__varianti,
  .asporto-pick-station .asporto-ordine-table__varianti {
    background: color-mix(in srgb, var(--asp-prep) 12%, var(--asp-surface));
    border: 1px solid color-mix(in srgb, var(--asp-prep) 38%, var(--asp-border));
    color: var(--asp-text);
  }

  .asporto-call-station .asporto-ordine-table__varianti > i,
  .asporto-pick-station .asporto-ordine-table__varianti > i {
    color: var(--asp-prep);
  }

  .asporto-call-station .asporto-ordine-table__varianti em,
  .asporto-pick-station .asporto-ordine-table__varianti em {
    font-style: normal;
    font-weight: 600;
    color: var(--asp-muted);
  }

  .asporto-call-station .asporto-ordine-table__note,
  .asporto-pick-station .asporto-ordine-table__note {
    background: rgba(var(--bs-warning-rgb), .22);
    border: 1px solid rgba(var(--bs-warning-rgb), .45);
    color: var(--asp-text);
  }

  .asporto-call-station .asporto-ordine-table__note > i,
  .asporto-pick-station .asporto-ordine-table__note > i {
    color: var(--bs-warning);
  }

  [data-bs-theme="dark"] .asporto-call-station .asporto-ordine-table thead th,
  [data-bs-theme="dark"] .asporto-pick-station .asporto-ordine-table thead th {
    background: color-mix(in srgb, var(--asp-prep) 16%, var(--asp-surface));
  }

  [data-bs-theme="dark"] .asporto-call-station .asporto-ordine-table tbody tr:nth-child(even) td,
  [data-bs-theme="dark"] .asporto-pick-station .asporto-ordine-table tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--asp-prep) 12%, var(--asp-surface));
  }

  /* Postazione ritiro */
  .asporto-pick-station {
    --asp-prep: var(--asp-pick);
    --asp-prep-soft: rgba(13, 148, 136, .14);
  }

  .asporto-pick-station .asporto-prep-item__ora {
    background: color-mix(in srgb, var(--asp-pick) 18%, transparent);
    color: var(--asp-pick);
  }

  /* Coda condivisa: ora+ritardo | codice | cliente */
  .asporto-queue-item {
    grid-template-columns: auto minmax(3.5rem, max-content) minmax(0, 1fr);
    align-items: center;
    gap: .55rem .7rem;
    padding: .65rem .75rem;
  }

  .asporto-queue-item__time {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .28rem;
    min-width: 4.5rem;
  }

  .asporto-queue-item__time .asporto-prep-item__ora {
    font-size: 1.05rem;
    padding: .22rem .45rem;
  }

  .asporto-queue-item__time .asporto-prep-item__ora.is-empty {
    opacity: .45;
  }

  .asporto-queue-item__time .asporto-timing-badge {
    margin: 0;
    font-size: .68rem;
    padding: .12rem .35rem;
    max-width: 100%;
  }

  .asporto-queue-item__time .asporto-timing-badge:not(.is-visible) {
    display: none;
  }

  .asporto-queue-item__code {
    margin: 0;
    font-size: 1.15rem;
    white-space: nowrap;
  }

  .asporto-queue-item__cliente {
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }

  .asporto-pick-station .btn-success.asporto-prep-continua.is-ready:not(:disabled) {
    animation: asporto-pick-pulse 1.15s ease-in-out infinite;
  }

  @keyframes asporto-pick-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(13, 148, 136, .35); }
    50% { transform: scale(1.015); box-shadow: 0 0 0 8px rgba(13, 148, 136, 0); }
  }

  .asporto-pick-alert {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin: .25rem 0 1rem;
    padding: .85rem 1rem;
    border-radius: var(--asp-radius-sm);
    border: 1px solid rgba(var(--bs-warning-rgb), .4);
    background: rgba(var(--bs-warning-rgb), .14);
    font-size: 1rem;
  }

  .asporto-pick-alert i {
    font-size: 1.45rem;
    line-height: 1;
    color: #b58105;
  }

  .asporto-pick-cliente {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin-bottom: 1rem;
    padding: .85rem 1rem;
    border-radius: var(--asp-radius-sm);
    background: var(--asp-surface-2);
    border: 1px solid var(--asp-border);
  }

  .asporto-pick-cliente__tel {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--asp-pick);
  }

  .asporto-pick-qta {
    color: var(--asp-pick) !important;
  }

  .asporto-pick-panel {
    min-height: 0;
  }

  .asporto-pick-panel__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .asporto-pick-split {
    display: grid;
    grid-template-columns: minmax(200px, 38%) minmax(0, 1fr);
    gap: .85rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }

  .asporto-pick-split__info,
  .asporto-pick-split__items {
    min-height: 0;
    min-width: 0;
  }

  .asporto-pick-split__items {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .asporto-pick-split__items .asporto-call-riepilogo,
  .asporto-pick-split__checklist {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: .15rem;
  }

  .asporto-prep-alert {
    border-color: color-mix(in srgb, var(--asp-prep) 40%, var(--asp-border));
    background: color-mix(in srgb, var(--asp-prep) 12%, transparent);
  }

  .asporto-prep-alert i {
    color: var(--asp-prep);
  }

  .asporto-pick-split__code-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .65rem;
    margin-bottom: .75rem;
  }

  .asporto-pick-split__items-title {
    margin: 0 0 .55rem;
    font-size: .92rem;
    font-weight: 800;
    color: var(--asp-text);
  }

  .asporto-pick-facts {
    margin: 0 0 .85rem;
  }

  .asporto-pick-facts__row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: .35rem .65rem;
    padding: .35rem 0;
    border-bottom: 1px dashed var(--asp-border);
  }

  .asporto-pick-facts__row:last-child {
    border-bottom: 0;
  }

  .asporto-pick-facts dt {
    margin: 0;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--asp-muted);
    align-self: center;
  }

  .asporto-pick-facts dd {
    margin: 0;
    font-size: .98rem;
    font-weight: 700;
    color: var(--asp-text);
    word-break: break-word;
  }

  .asporto-pick-panel__foot {
    padding: .75rem;
  }

  .asporto-pick-panel__foot .asporto-prep-continua {
    min-height: 3.25rem;
    font-size: 1.15rem;
  }

  .asporto-pick-station {
    grid-template-columns: minmax(220px, 28%) minmax(0, 1fr) minmax(150px, 18%);
  }

  .asporto-pick-layout {
    --asp-prep: var(--asp-pick);
    --asp-prep-soft: rgba(13, 148, 136, .14);
    display: flex;
    flex-direction: column;
    gap: .85rem;
    min-height: var(--asp-h);
    height: var(--asp-h);
  }

  .asporto-prep-layout {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    min-height: var(--asp-h);
    height: var(--asp-h);
  }

  .asporto-call-layout {
    --asp-prep: var(--asp-call);
    --asp-prep-soft: rgba(96, 45, 145, .14);
    display: flex;
    flex-direction: column;
    gap: .85rem;
    min-height: var(--asp-h);
    height: var(--asp-h);
  }

  .asporto-pick-layout .asporto-prep-station,
  .asporto-prep-layout .asporto-prep-station,
  .asporto-call-layout .asporto-prep-station {
    flex: 1;
    min-height: 0;
    height: auto;
  }

  /* Preparazione / Chiamata: coda stretta, dettaglio ampio, info ordine più compatta */
  .asporto-prep-layout .asporto-prep-station,
  .asporto-call-layout .asporto-prep-station {
    grid-template-columns: minmax(200px, 24%) minmax(0, 1fr);
  }

  .asporto-prep-layout .asporto-pick-split,
  .asporto-call-layout .asporto-pick-split {
    grid-template-columns: minmax(150px, 26%) minmax(0, 1fr);
  }

  .asporto-h-timeline--prep {
    border-top: 0;
    border-bottom: 0;
  }

  .asporto-h-timeline--prep .asporto-h-timeline__head {
    border-bottom-color: var(--asp-prep);
  }

  .asporto-h-timeline--prep .asporto-h-timeline__brand {
    color: var(--asp-prep);
  }

  .asporto-h-timeline--prep .asporto-h-timeline__track {
    gap: .7rem;
  }

  .asporto-h-timeline--call .asporto-h-timeline__head {
    border-bottom-color: var(--asp-call);
  }

  .asporto-h-timeline--call .asporto-h-timeline__brand {
    color: var(--asp-call);
  }

  .asporto-h-timeline--call .asporto-h-timeline__track {
    gap: .7rem;
  }

  /* Timeline chiamata: orario e ritardo ad alto contrasto */
  .asporto-h-timeline--call .asporto-h-timeline__ora {
    display: inline-block;
    margin: 0 auto;
    padding: .22rem .45rem;
    border-radius: .35rem;
    background: var(--asp-call);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: .02em;
  }

  .asporto-h-timeline--call .asporto-h-timeline__codice {
    font-size: 1.12rem;
    font-weight: 900;
    color: var(--asp-text);
  }

  .asporto-h-timeline--call .asporto-timing-badge.is-visible {
    font-size: .7rem;
    font-weight: 900;
    padding: .18rem .4rem;
    border-width: 1.5px;
  }

  .asporto-h-timeline--call .asporto-h-timeline__item[data-timing-level="late"] .asporto-timing-badge {
    color: #fff;
    background: #dc3545;
    border-color: #b02a37;
  }

  .asporto-h-timeline--call .asporto-h-timeline__item[data-timing-level="soon"] .asporto-timing-badge {
    color: #fff;
    background: var(--asp-call);
    border-color: color-mix(in srgb, var(--asp-call) 80%, #000);
  }

  .asporto-h-timeline--call .asporto-h-timeline__item[data-timing-level="ok"] .asporto-timing-badge {
    color: #fff;
    background: #198754;
    border-color: #146c43;
  }

  .asporto-h-timeline--call .asporto-h-timeline__item[data-timing-level="late"] .asporto-h-timeline__ora {
    background: #dc3545;
    color: #fff;
  }

  .asporto-h-timeline--call .asporto-h-timeline__item[data-timing-level="soon"] .asporto-h-timeline__ora {
    background: color-mix(in srgb, var(--asp-call) 85%, #000);
    color: #fff;
  }

  .asporto-h-timeline--call .asporto-h-timeline__item[data-timing-level="ok"] .asporto-h-timeline__ora {
    background: #198754;
    color: #fff;
  }

  /* Timeline orizzontale */
  .asporto-h-timeline {
    flex: 0 0 auto;
    background: var(--asp-surface);
    border: 0;
    border-radius: var(--asp-radius);
    overflow: hidden;
    box-shadow: none;
  }

  .asporto-h-timeline__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    min-height: 2.15rem;
    padding: .28rem .75rem;
    background: transparent;
    border-bottom: 3px solid var(--asp-time);
    border-radius: var(--asp-radius) var(--asp-radius) 0 0;
  }

  .asporto-h-timeline__brand {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--asp-time);
    min-width: 0;
  }

  .asporto-h-timeline__brand > i {
    font-size: 1.15rem;
    line-height: 1;
  }

  .asporto-h-timeline__title {
    margin: 0;
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: .01em;
    color: var(--asp-text);
    line-height: 1;
  }

  .asporto-h-timeline__stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .35rem;
  }

  .asporto-h-stat {
    display: inline-flex;
    align-items: baseline;
    gap: .25rem;
    padding: .15rem .45rem;
    border-radius: var(--bs-border-radius-sm, .25rem);
    border: 1px solid var(--asp-border);
    background: var(--asp-surface);
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--asp-muted);
    white-space: nowrap;
  }

  .asporto-h-stat strong {
    font-size: .85rem;
    font-weight: 800;
    color: var(--asp-text);
  }

  .asporto-h-stat--late {
    border-color: rgba(220, 53, 69, .35);
    background: rgba(220, 53, 69, .1);
    color: #b02a37;
  }

  .asporto-h-stat--late strong { color: #dc3545; }

  .asporto-h-stat--soon {
    border-color: rgba(245, 130, 32, .4);
    background: rgba(245, 130, 32, .12);
    color: #b86a12;
  }

  .asporto-h-stat--soon strong { color: #f58220; }

  .asporto-h-timeline__now-btn {
    font-weight: 700;
    padding: .2rem .55rem;
    line-height: 1.2;
  }

  .asporto-h-timeline__now-btn i {
    font-size: .95rem;
    vertical-align: -1px;
  }

  .asporto-h-timeline__scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: .65rem .75rem .75rem;
    scrollbar-width: thin;
  }

  .asporto-h-timeline__track {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: .45rem;
    min-width: max-content;
    padding: 1.35rem .35rem .45rem;
  }

  .asporto-h-timeline__rail {
    position: absolute;
    left: .4rem;
    right: .4rem;
    top: 3.55rem;
    height: 2px;
    background: linear-gradient(90deg, var(--asp-prep), var(--asp-call), var(--asp-pick), #6c757d);
    opacity: .4;
    pointer-events: none;
  }

  .asporto-h-timeline__now {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 5;
    width: 0;
    pointer-events: none;
    transform: translateX(-50%);
  }

  .asporto-h-timeline__now-line {
    position: absolute;
    left: 0;
    top: .15rem;
    bottom: .2rem;
    width: 2px;
    background: #dc3545;
    box-shadow: 0 0 0 1px rgba(220, 53, 69, .25);
    border-radius: 2px;
  }

  .asporto-h-timeline__now-label {
    position: absolute;
    left: 50%;
    top: -.15rem;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .03em;
    color: #fff;
    background: #dc3545;
    padding: .25rem .6rem;
    border-radius: .45rem;
    box-shadow: 0 2px 8px rgba(220, 53, 69, .4);
    line-height: 1.15;
    z-index: 2;
  }

  .asporto-h-timeline__now-label::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #dc3545;
  }

  .asporto-h-timeline__item.asporto-timeline__item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 7.75rem;
    width: 7.75rem;
    padding: 0 .35rem .4rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: .78rem;
    color: var(--asp-text, var(--bs-body-color));
  }

  .asporto-h-timeline__above {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 1.55rem;
    margin-bottom: .45rem;
    width: 100%;
  }

  .asporto-h-timeline__above .asporto-timing-badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .asporto-h-timeline__dot.asporto-timeline__dot {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex: 0 0 auto;
    width: .55rem;
    height: .55rem;
    margin: 0 0 .45rem;
    z-index: 1;
  }

  .asporto-h-timeline__below {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: .12rem;
  }

  .asporto-h-timeline__ora {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
  }

  .asporto-h-timeline__codice {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--asp-text, var(--bs-body-color));
    line-height: 1.15;
  }

  .asporto-h-timeline__cliente {
    font-weight: 600;
    font-size: .78rem;
    line-height: 1.15;
    color: var(--asp-muted, var(--bs-secondary-color));
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .asporto-h-timeline__empty {
    padding: .75rem 1rem;
  }

  .asporto-h-timeline__item[data-timing-level="soon"],
  .asporto-h-timeline__item[data-timing-level="late"] {
    margin-left: 0;
    padding-left: .35rem;
    background: transparent;
  }

  .asporto-h-timeline__item[data-timing-level="late"] .asporto-h-timeline__ora {
    color: #dc3545;
  }

  .asporto-h-timeline__item[data-timing-level="soon"] .asporto-h-timeline__ora {
    color: var(--asp-prep);
  }

  .asporto-h-timeline__item.is-focus {
    outline: none;
  }

  .asporto-h-timeline__item.is-focus .asporto-h-timeline__below {
    outline: 2px solid var(--asp-time);
    outline-offset: 2px;
    border-radius: .45rem;
    padding: .15rem .2rem;
  }

  .asporto-done-lane {
    background: var(--asp-surface);
    border: 0;
    border-radius: var(--asp-radius);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    opacity: .95;
    box-shadow: none;
  }

  .asporto-done-lane__body {
    flex: 1;
    overflow-y: auto;
    padding: .55rem;
    min-height: 0;
  }

  .asporto-done-card {
    border: 1px solid var(--asp-border);
    border-radius: var(--asp-radius-sm);
    background: var(--asp-surface-2);
    padding: .5rem .55rem;
    margin-bottom: .45rem;
    color: var(--asp-muted);
  }

  .asporto-done-card__top {
    display: flex;
    align-items: baseline;
    gap: .4rem;
    min-width: 0;
  }

  .asporto-done-card__code {
    flex: 0 0 auto;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--asp-text);
    line-height: 1.1;
    letter-spacing: .01em;
  }

  .asporto-done-card__cliente {
    flex: 1 1 auto;
    min-width: 0;
    font-size: .82rem;
    font-weight: 600;
    color: var(--asp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
  }

  .asporto-done-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem .4rem;
    margin-top: .28rem;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.2;
  }

  .asporto-done-card__ora {
    color: var(--asp-text);
    font-weight: 700;
  }

  .asporto-done-card__ora:not(:last-child)::after,
  .asporto-done-card__upd:not(:last-child)::after {
    content: '·';
    margin-left: .35rem;
    color: var(--asp-muted);
    font-weight: 600;
  }

  .asporto-done-card__upd {
    color: var(--asp-muted);
  }

  .asporto-done-card__diff {
    font-weight: 800;
  }

  .asporto-done-card[data-diff-level="late"] .asporto-done-card__diff {
    color: #dc3545;
  }

  .asporto-done-card[data-diff-level="early"] .asporto-done-card__diff {
    color: #198754;
  }

  .asporto-done-card[data-diff-level="ok"] .asporto-done-card__diff {
    color: #198754;
  }

  .asporto-time-lane {
    background: var(--asp-surface);
    border: 0;
    border-radius: var(--asp-radius);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    box-shadow: none;
  }

  .asporto-time-lane__body {
    flex: 1;
    overflow-y: auto;
    padding: .55rem .65rem;
    min-height: 0;
  }

  .asporto-timeline {
    position: relative;
    padding-left: .95rem;
  }

  .asporto-timeline::before {
    content: '';
    position: absolute;
    left: .28rem;
    top: .2rem;
    bottom: .2rem;
    width: 2px;
    background: linear-gradient(180deg, var(--asp-prep), var(--asp-call), var(--asp-pick), #6c757d);
    opacity: .45;
  }

  .asporto-timeline__item {
    position: relative;
    padding: .4rem 0 .4rem .7rem;
    border-bottom: 1px dashed var(--asp-border);
    color: var(--asp-text);
    font-size: .82rem;
  }

  .asporto-timeline__item:last-child { border-bottom: 0; }

  .asporto-timeline__cliente {
    font-weight: 600;
    font-size: .8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .asporto-timeline__dot {
    position: absolute;
    left: -.82rem;
    top: .7rem;
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--asp-call);
    box-shadow: 0 0 0 3px rgba(96, 45, 145, .18);
  }

  .asporto-timeline__item[data-stato="preparazione"] .asporto-timeline__dot {
    background: var(--asp-prep);
    box-shadow: 0 0 0 3px rgba(245, 130, 32, .2);
  }
  .asporto-timeline__item[data-stato="chiamata"] .asporto-timeline__dot {
    background: var(--asp-call);
    box-shadow: 0 0 0 3px rgba(96, 45, 145, .2);
  }
  .asporto-timeline__item[data-stato="ritiro"] .asporto-timeline__dot {
    background: var(--asp-pick);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, .2);
  }
  .asporto-timeline__item[data-stato="consegnato"] {
    opacity: .65;
  }
  .asporto-timeline__item[data-stato="consegnato"] .asporto-timeline__dot {
    background: #6c757d;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, .2);
  }

  .asporto-prep-item__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
  }

  .asporto-timing-badge {
    display: none;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.1;
    padding: .2rem .45rem;
    border-radius: .45rem;
    white-space: nowrap;
  }

  .asporto-timing-badge.is-visible { display: inline-block; }

  .asporto-timing-badge--sm {
    font-size: .65rem;
    padding: .15rem .35rem;
  }

  .asporto-timing-chip {
    min-width: 5.5rem;
    text-align: right;
  }

  .asporto-timing-chip .asporto-timing-badge {
    font-size: .85rem;
    padding: .4rem .55rem;
  }

  [data-timing-level="ok"] {
    --timing-color: #198754;
    --timing-bg: rgba(25, 135, 84, .14);
  }
  [data-timing-level="soon"] {
    --timing-color: var(--asp-prep);
    --timing-bg: rgba(245, 130, 32, .16);
  }
  [data-timing-level="late"] {
    --timing-color: #dc3545;
    --timing-bg: rgba(220, 53, 69, .14);
  }

  .asporto-prep-item[data-timing-level="ok"],
  .asporto-prep-item[data-timing-level="soon"],
  .asporto-prep-item[data-timing-level="late"] {
    border-color: color-mix(in srgb, var(--timing-color) 55%, var(--asp-border));
  }

  .asporto-prep-item[data-timing-level="late"] {
    box-shadow: inset 4px 0 0 #dc3545;
  }

  .asporto-prep-item[data-timing-level] .asporto-timing-badge,
  .asporto-timeline__item[data-timing-level] .asporto-timing-badge,
  .asporto-prep-panel[data-timing-level] .asporto-timing-badge {
    display: inline-block;
    color: var(--timing-color);
    background: var(--timing-bg);
    border: 1px solid color-mix(in srgb, var(--timing-color) 35%, transparent);
  }

  .asporto-timeline__item[data-timing-level="soon"],
  .asporto-timeline__item[data-timing-level="late"] {
    background: var(--timing-bg);
    border-radius: .45rem;
    margin-left: -.15rem;
    padding-left: .85rem;
  }

  .asporto-timeline__item.is-focus {
    outline: 2px solid var(--asp-time);
    outline-offset: 1px;
    border-radius: .45rem;
  }

  .asporto-timeline__item[data-stato="consegnato"] .asporto-timing-badge {
    display: none !important;
  }

  @media (max-width: 991.98px) {
    .asporto-prep-station {
      grid-template-columns: 1fr;
      height: auto;
      min-height: 0;
    }

    .asporto-pick-layout,
    .asporto-prep-layout,
    .asporto-call-layout {
      height: auto;
      min-height: 0;
    }

    .asporto-pick-station {
      grid-template-columns: 1fr;
    }

    .asporto-pick-split {
      grid-template-columns: 1fr;
    }

    .asporto-prep-queue {
      max-height: 42vh;
    }

    .asporto-prep-detail {
      min-height: 48vh;
    }

    .asporto-done-lane,
    .asporto-time-lane {
      max-height: 26vh;
    }

    .asporto-h-timeline__item.asporto-timeline__item {
      flex-basis: 7.25rem;
      width: 7.25rem;
    }
  }
</style>
