body {
    min-height: 100vh;
}

.app-loading-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2000;
    height: 3px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    background: rgba(var(--bs-info-rgb), 0.18);
    transition: opacity 120ms ease;
}

.app-loading-bar-value {
    display: block;
    width: 38%;
    height: 100%;
    background: var(--bs-info);
    box-shadow: 0 0 0.5rem rgba(var(--bs-info-rgb), 0.7);
    transform: translateX(-110%);
}

html.app-is-loading .app-loading-bar {
    opacity: 1;
}

html.app-is-loading .app-loading-bar-value {
    animation: app-loading-bar-progress 1.1s ease-in-out infinite;
}

html.app-loading-complete .app-loading-bar {
    opacity: 0;
    transition-delay: 100ms;
}

html.app-loading-complete .app-loading-bar-value {
    width: 100%;
    animation: none;
    transform: translateX(0);
}

@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: app-page-transition-out 140ms ease-in both;
}

::view-transition-new(root) {
    animation: app-page-transition-in 200ms ease-out both;
}

html.app-ajax-view-transition::view-transition-old(root),
html.app-ajax-view-transition::view-transition-new(root) {
    animation: none;
}

::view-transition-group(app-async-content) {
    animation-duration: 220ms;
    animation-timing-function: ease-out;
}

::view-transition-old(app-async-content) {
    animation: app-content-fade-out 140ms ease-in both;
}

::view-transition-new(app-async-content) {
    animation: app-content-fade-in 220ms ease-out both;
}

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

.page-shell {
    max-width: 960px;
}

.app-header-actions {
    flex: 0 0 6.25rem;
}

.app-header-icon-button {
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.app-toast-region {
    position: fixed;
    top: 5.5rem;
    right: 1rem;
    z-index: 1090;
    width: min(24rem, calc(100vw - 2rem));
    animation: app-toast-in 180ms ease-out both;
}

.app-error-toast,
.app-status-toast {
    display: block;
    width: 100%;
    box-shadow: var(--bs-box-shadow-lg);
}

.app-header-menu-panel {
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 1080;
    width: min(18rem, calc(100vw - 2rem));
}

.app-header-menu-panel:not([hidden]) {
    display: block;
}

.app-toast-region.is-hiding {
    pointer-events: none;
    animation: app-toast-out 180ms ease-in both;
}

.progress-step-links {
    display: flex;
    gap: 0.35rem;
    padding-bottom: 0.25rem;
    overflow-x: auto;
    scrollbar-width: thin;
}

.progress-step-link {
    flex: 0 0 auto;
    min-width: 5rem;
}

.inbound-quantity-control {
    width: 11rem;
}

.inbound-quantity-control .form-control {
    min-width: 0;
}

.inbound-assignment-details {
    flex: 1 1 24rem;
}

.container-definition-json {
    max-height: 24rem;
    overflow: auto;
    font-size: 0.75rem;
    white-space: pre;
}

.replenishment-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
    min-width: 0;
}

.replenishment-detail {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 0.25rem 0.6rem;
    border-inline-end: 1px solid var(--bs-border-color);
    text-align: center;
}

.replenishment-detail:last-child {
    border-inline-end: 0;
}

.replenishment-detail > span,
.replenishment-confirm-grid span {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

.replenishment-detail > strong {
    overflow-wrap: anywhere;
    font-size: 0.82rem;
}

.replenishment-confirm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.replenishment-confirm-grid > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-block-end: 1px solid var(--bs-border-color);
}

.replenishment-confirm-grid > div:nth-child(odd) {
    border-inline-end: 1px solid var(--bs-border-color);
}

.replenishment-confirm-grid > div:nth-last-child(-n + 2) {
    border-block-end: 0;
}

.replenishment-confirm-grid strong {
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .replenishment-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 0.5rem;
    }

    .replenishment-detail:nth-child(even) {
        border-inline-end: 0;
    }
}

.delivery-debug-output {
    max-height: 20rem;
    overflow: auto;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.inbound-work-summary {
    width: 100%;
}

.work-unit-history {
    max-height: 24rem;
    scrollbar-width: thin;
}

.work-unit-history-item:last-child {
    padding-bottom: 0 !important;
}

.work-unit-history-icon {
    position: absolute;
    top: 0;
    left: -0.85rem;
    width: 1.7rem;
    height: 1.7rem;
}

.dashboard-work-unit-summary {
    cursor: pointer;
    list-style: none;
}

.dashboard-work-unit-summary::-webkit-details-marker {
    display: none;
}

.dashboard-work-unit-summary:focus-visible {
    outline: 3px solid rgba(var(--bs-primary-rgb), 0.35);
    outline-offset: -3px;
}

.dashboard-work-unit-chevron {
    transition: transform 150ms ease-in-out;
}

.dashboard-work-unit[open] .dashboard-work-unit-chevron {
    transform: rotate(180deg);
}

.dashboard-timeline {
    max-height: 42rem;
    overflow-y: auto;
    scrollbar-width: thin;
}

.dashboard-timeline-item:last-child {
    padding-bottom: 0 !important;
}

.dashboard-timeline-icon {
    position: absolute;
    top: 0;
    left: -0.9rem;
    width: 1.75rem;
    height: 1.75rem;
}

#dashboard-data[aria-busy="true"] [data-dashboard-status] .bi-arrow-repeat {
    animation: dashboard-spin 700ms linear infinite;
}

[data-dashboard-log][aria-busy="true"] [data-dashboard-log-refresh] .bi-arrow-repeat {
    animation: dashboard-spin 700ms linear infinite;
}

[data-work-unit-selection][aria-busy="true"] [data-work-unit-scan-icon] {
    display: inline-block;
    animation: dashboard-spin 700ms linear infinite;
    transform-origin: center;
}

[data-tote-scan-form][aria-busy="true"] [data-tote-scan-icon],
[data-lpn-scan-form][aria-busy="true"] [data-lpn-scan-icon],
[data-inventory-scan-form][aria-busy="true"] [data-inventory-scan-icon],
[data-adjustment-barcode-form][aria-busy="true"] [data-adjustment-barcode-scan-icon] {
    display: inline-block;
    animation: dashboard-spin 700ms linear infinite;
    transform-origin: center;
}

[data-review-container-definition][aria-busy="true"] [data-review-container-icon] {
    display: inline-block;
    animation: dashboard-spin 700ms linear infinite;
    transform-origin: center;
}

[data-send-container-definition][aria-busy="true"] [data-send-container-icon] {
    display: inline-block;
    animation: dashboard-spin 700ms linear infinite;
    transform-origin: center;
}

.dashboard-log-scroll {
    max-height: 28rem;
    overflow: auto;
    scrollbar-width: thin;
}

.dashboard-log-table {
    min-width: 56rem;
    font-size: 0.78rem;
}

.dashboard-log-table th,
.dashboard-log-table td {
    padding: 0.45rem 0.65rem;
}

.dashboard-log-table thead th {
    background-color: var(--bs-tertiary-bg);
}

.dashboard-log-time {
    width: 10rem;
    white-space: nowrap;
}

.dashboard-log-level {
    width: 5.5rem;
}

.dashboard-log-event {
    width: 14rem;
}

.dashboard-log-context {
    min-width: 24rem;
    overflow-wrap: anywhere;
}

@keyframes dashboard-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes app-loading-bar-progress {
    0% {
        transform: translateX(-110%);
    }

    55% {
        transform: translateX(115%);
    }

    100% {
        transform: translateX(285%);
    }
}

@keyframes app-page-transition-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes app-page-transition-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes app-content-fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes app-content-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes app-toast-in {
    from {
        opacity: 0;
        transform: translateY(-0.75rem);
    }

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

@keyframes app-toast-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-0.75rem);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-toast-region,
    .app-toast-region.is-hiding {
        animation: none;
    }

    html.app-is-loading .app-loading-bar-value {
        width: 100%;
        animation: none;
        transform: translateX(0);
    }

    ::view-transition-old(root),
    ::view-transition-new(root),
    ::view-transition-old(app-async-content),
    ::view-transition-new(app-async-content) {
        animation: none;
    }
}

.tote-diagram {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 1.25rem;
    gap: 0.25rem;
    width: min(100%, 9rem);
    align-items: stretch;
    margin-inline: auto;
}

.tote-layout-grid {
    display: grid;
    grid-template-columns: repeat(var(--tote-columns), minmax(0, 1fr));
    grid-template-rows: repeat(var(--tote-rows), minmax(0, 1fr));
    gap: 0.15rem;
    width: 100%;
    aspect-ratio: 3 / 2;
    padding: 0.15rem;
    border: 2px solid currentColor;
    color: var(--bs-primary);
    background: var(--bs-body-bg);
}

.tote-configuration-panels {
    display: grid;
    gap: 0.75rem;
}

.tote-layout-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.tote-layout-option {
    font-size: 0.75rem;
}

.tote-layout-option .tote-diagram {
    width: min(100%, 6rem);
}

.tote-layout-cell {
    min-width: 0;
    min-height: 0;
    border: 1px solid currentColor;
}

.tote-side-label {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor;
    border-radius: var(--bs-border-radius-sm);
    color: var(--bs-secondary-color);
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.tote-diagram > .tote-side-label {
    grid-column: 1;
    grid-row: 2;
}

.tote-diagram > .tote-layout-grid,
.tote-diagram > .tote-division-grid {
    grid-column: 1;
    grid-row: 1;
}

.tote-side-label.is-active {
    border-color: var(--bs-primary);
    color: var(--bs-white);
    background: var(--bs-success);
}

.tote-division-grid {
    display: grid;
    grid-template-columns: repeat(var(--tote-columns), minmax(0, 1fr));
    grid-template-rows: repeat(var(--tote-rows), minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    aspect-ratio: 3 / 2;
}

.tote-division-selector {
    width: min(100%, 13rem);
}

.tote-division-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    grid-column: var(--tote-column);
    grid-row: var(--tote-row);
}

.tote-division-cell.is-filled {
    border-color: var(--bs-success);
    color: var(--bs-success);
}

.adjustment-quantity-input {
    width: 6.5rem;
    min-width: 0;
}

[data-inbound-work-unit-details],
[data-replenishment-work-details] {
    animation: app-content-fade-in 220ms ease-out both;
}

#inbound-work-content.is-ajax-entry,
#replenishment-work-content.is-ajax-entry {
    animation: app-content-fade-in 220ms ease-out both;
}

@supports (view-transition-name: app-async-content) {
    [data-inbound-work-unit-details],
    [data-replenishment-work-details],
    #inbound-work-content.is-ajax-entry,
    #replenishment-work-content.is-ajax-entry {
        animation: none;
    }
}

[data-inbound-work-unit-details][aria-busy="true"],
[data-replenishment-work-details][aria-busy="true"] {
    opacity: 0.65;
    pointer-events: none;
}

.pending-container-definitions-dialog {
    width: min(calc(100% - 2rem), 44rem);
    max-width: none;
    max-height: min(85vh, 48rem);
    margin: auto;
    overflow: hidden;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
}

.pending-container-definitions-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.pending-container-definitions-panel {
    display: flex;
    min-height: 0;
    max-height: min(85vh, 48rem);
    flex-direction: column;
    background: var(--bs-body-bg);
}

.pending-container-definitions-header,
.pending-container-definitions-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.pending-container-definitions-header {
    justify-content: space-between;
    border-bottom: var(--bs-border-width) solid var(--bs-border-color);
}

.pending-container-definitions-body {
    min-height: 0;
    padding: 1rem;
    overflow-y: auto;
}

.pending-container-definitions-footer {
    justify-content: flex-end;
    border-top: var(--bs-border-width) solid var(--bs-border-color);
}

.pending-container-definition-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.pending-container-definition-details {
    display: grid;
    gap: 0.4rem;
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: var(--bs-border-width) solid var(--bs-border-color);
}

.pending-container-definition-detail {
    display: grid;
    grid-template-columns: minmax(7rem, 0.7fr) minmax(0, 1.3fr);
    gap: 1rem;
}

.pending-container-definition-detail dt {
    color: var(--bs-secondary-color);
    font-weight: 400;
}

.pending-container-definition-detail dd {
    min-width: 0;
    margin: 0;
    text-align: right;
}

@media (max-width: 575.98px) {
    .pending-container-definitions-dialog {
        width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
    }

    .pending-container-definitions-panel {
        max-height: calc(100vh - 1rem);
    }

    .pending-container-definition-heading {
        flex-direction: column;
    }

    .pending-container-definition-heading form,
    .pending-container-definition-heading .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-inbound-work-unit-details],
    [data-replenishment-work-details],
    #inbound-work-content.is-ajax-entry,
    #replenishment-work-content.is-ajax-entry {
        animation: none;
    }
}

.confirm-tote-diagram {
    width: min(100%, 36rem);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 1.5rem;
    gap: 0.5rem;
}

.confirm-tote-grid {
    aspect-ratio: 3 / 2;
}

.confirm-tote-division {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    justify-content: center;
    overflow: auto;
    padding: 0.75rem;
    border: 2px dashed var(--bs-border-color);
    border-radius: var(--bs-border-radius-sm);
    background: var(--bs-body-bg);
    grid-column: var(--tote-column);
    grid-row: var(--tote-row);
}

.confirm-tote-division.is-filled {
    justify-content: flex-start;
    border-style: solid;
    border-color: rgba(var(--bs-primary-rgb), 0.65);
    background: rgba(var(--bs-primary-rgb), 0.08);
}

@media (min-width: 576px) {
    .tote-layout-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .progress-step-links {
        display: grid;
        grid-template-columns: repeat(var(--progress-step-count), minmax(0, 1fr));
        padding-bottom: 0;
        overflow: visible;
    }

    .progress-step-link {
        min-width: 0;
    }

    .tote-configuration-panels.has-division-selector {
        grid-template-columns: minmax(0, 1fr) 14rem;
        align-items: start;
    }

    .tote-layout-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .inbound-work-summary {
        width: 24rem;
    }

    .tote-configuration-panels.has-division-selector {
        grid-template-columns: minmax(0, 1fr) 14rem;
        align-items: start;
    }
}

@media (min-width: 1200px) {
    .dashboard-timeline-panel {
        position: sticky;
        top: 1rem;
    }
}
