#scannerVideo {
    backface-visibility: hidden;
    transform: translateZ(0);
}

#scannerCanvas {
    pointer-events: none;
}

#scannerResultCanvas {
    background: #111827;
}

.wizard-stepper {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 2px 0 6px;
    margin: 0;
    overflow-x: auto;
    list-style: none;
}

.wizard-stepper-item {
    position: relative;
    display: flex;
    justify-content: center;
    flex: 1 0 58px;
    min-width: 58px;
}

.wizard-stepper-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: calc(50% + 26px);
    right: calc(-50% + 26px);
    height: 3px;
    border-radius: 999px;
    background: #d9dee8;
    transform: translateY(-50%);
}

.wizard-stepper-item.completed:not(:last-child)::after {
    background: #71dd37;
}

.wizard-stepper-dot {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid #cfd6e4;
    border-radius: 50%;
    background: #fff;
    color: #566a7f;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.wizard-stepper-dot:hover,
.wizard-stepper-dot:focus-visible {
    border-color: #696cff;
    color: #696cff;
    box-shadow: 0 0 0 4px rgba(105, 108, 255, .14);
    outline: 0;
}

.wizard-stepper-dot.completed {
    border-color: #71dd37;
    background: #e8fadf;
    color: #2b7a0b;
}

.wizard-stepper-dot.active {
    border-color: #696cff;
    background: #696cff;
    color: #fff;
    box-shadow: 0 8px 18px rgba(105, 108, 255, .28);
}

.wizard-stepper-caption {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid #d9dee8;
    border-radius: 6px;
    background: #fff;
    color: #384551;
    font-size: 13px;
    font-weight: 700;
}

.scan-ocr-status-loading {
    display: block;
}

.scan-ocr-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid #dbe7ff;
    border-radius: 8px;
    background:
        linear-gradient(120deg, rgba(105, 108, 255, .10), rgba(3, 195, 236, .10)),
        #fff;
    color: #384551;
    box-shadow: 0 8px 22px rgba(105, 108, 255, .10);
}

.scan-ocr-loader-icon {
    position: relative;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
}

.scan-ocr-loader-icon::before,
.scan-ocr-loader-icon::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.scan-ocr-loader-icon::before {
    inset: 0;
    border: 3px solid rgba(105, 108, 255, .18);
    border-top-color: #696cff;
    border-right-color: #03c3ec;
    animation: scanOcrSpin .85s linear infinite;
}

.scan-ocr-loader-icon::after {
    inset: 10px;
    background: #fff;
    box-shadow: 0 0 0 5px rgba(105, 108, 255, .08);
    animation: scanOcrPulse 1.2s ease-in-out infinite;
}

.scan-ocr-loader-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.25;
}

.scan-ocr-loader-label {
    font-size: 13px;
    font-weight: 800;
    color: #2f3a4a;
}

.scan-ocr-loader-sub {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #697a8d;
}

.scan-ocr-loader-dots {
    display: inline-flex;
    gap: 3px;
    padding-left: 2px;
}

.scan-ocr-loader-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #696cff;
    animation: scanOcrDot 1s ease-in-out infinite;
}

.scan-ocr-loader-dots i:nth-child(2) {
    animation-delay: .14s;
}

.scan-ocr-loader-dots i:nth-child(3) {
    animation-delay: .28s;
}

@keyframes scanOcrSpin {
    to { transform: rotate(360deg); }
}

@keyframes scanOcrPulse {
    0%, 100% { transform: scale(.86); opacity: .65; }
    50% { transform: scale(1.06); opacity: 1; }
}

@keyframes scanOcrDot {
    0%, 80%, 100% { transform: translateY(0); opacity: .45; }
    40% { transform: translateY(-4px); opacity: 1; }
}

.wizard-top-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.wizard-top-actions .btn {
    justify-content: center;
    min-height: 42px;
    white-space: normal;
}

.address-suggestions {
    width: 100%;
    max-height: 220px;
    margin-top: 6px;
    overflow-y: auto;
    border: 1px solid #d9dee8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(67, 89, 113, .12);
}

.address-suggestion-option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 0;
    border-bottom: 1px solid #edf0f5;
    background: #fff;
    color: #384551;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.address-suggestion-option:last-child {
    border-bottom: 0;
}

.address-suggestion-option:hover,
.address-suggestion-option:focus-visible {
    background: #f5f5ff;
    color: #696cff;
    outline: 0;
}

.address-suggestion-empty {
    padding: 10px 12px;
    color: #697a8d;
    font-size: 12px;
    line-height: 1.35;
}

.account-slip-table-wrap {
    overflow-x: auto;
}

.account-slip-items-table {
    min-width: 680px;
}

.account-slip-items-table th,
.account-slip-items-table td {
    white-space: nowrap;
}

.account-slip-items-table th:nth-child(1),
.account-slip-items-table td:nth-child(1),
.account-slip-items-table th:nth-child(2),
.account-slip-items-table td:nth-child(2) {
    min-width: 116px;
}

.account-slip-items-table th:nth-child(3),
.account-slip-items-table td:nth-child(3),
.account-slip-items-table th:nth-child(4),
.account-slip-items-table td:nth-child(4) {
    min-width: 96px;
}

.account-slip-items-table th:nth-child(5),
.account-slip-items-table td:nth-child(5) {
    min-width: 92px;
}

.account-slip-items-table th:nth-child(6),
.account-slip-items-table td:nth-child(6) {
    width: 44px;
}

@media (max-width: 575.98px) {
    .wizard-top-actions {
        grid-template-columns: 1fr;
    }

    .account-slip-table-wrap {
        overflow: visible;
    }

    .account-slip-items-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0;
    }

    .account-slip-items-table thead {
        display: none;
    }

    .account-slip-items-table,
    .account-slip-items-table tbody,
    .account-slip-items-table tfoot,
    .account-slip-items-table tr,
    .account-slip-items-table td,
    .account-slip-items-table th {
        display: block;
        width: 100%;
    }

    .account-slip-items-table tbody tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
        margin-bottom: 12px;
        border: 1px solid #d9dee8;
        border-radius: 8px;
        background: #fff;
    }

    .account-slip-items-table tbody td {
        display: grid;
        grid-template-columns: minmax(78px, .42fr) minmax(0, 1fr);
        gap: 10px;
        align-items: center;
        width: 100%;
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .account-slip-items-table tbody td::before {
        content: attr(data-label);
        color: #566a7f;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .account-slip-items-table tbody td > .form-select,
    .account-slip-items-table tbody td > .form-control {
        width: 100%;
        min-width: 0;
    }

    .account-slip-items-table tbody td.account-slip-action-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100% !important;
        min-width: 0;
    }

    .account-slip-items-table .account-slip-action-cell::before {
        content: attr(data-label);
        color: #566a7f;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

    .account-slip-items-table tfoot tr {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        border-top: 1px solid #d9dee8;
        background: #f8f9fa;
    }

    .account-slip-items-table tfoot th {
        min-width: 0;
        padding: 0;
        border: 0;
        white-space: normal;
    }

    .account-slip-items-table tfoot th[colspan] {
        text-align: left !important;
    }

    .account-slip-items-table tfoot th:last-child {
        display: none;
    }
}
