/* ==================== ERP BATCH OVERLAY ==================== */
.erp-right-column {
    position: relative;
}
.erp-batch-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--theme-card-bg);
    backdrop-filter: blur(8px);
    z-index: 2000;
    flex-direction: column;
    padding: 14px 16px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--theme-erp-accent);
}
.erp-right-column.batch-active .erp-batch-overlay {
    display: flex;
}
.erp-batch-overlay-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-shrink: 0;
}
.erp-batch-overlay-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}
.erp-batch-overlay-title i {
    color: var(--theme-erp-accent);
}
.erp-batch-overlay-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 40%, transparent);
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
    color: var(--theme-erp-accent);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.erp-batch-overlay-back:hover {
    background: color-mix(in srgb, var(--theme-erp-accent) 20%, transparent);
    border-color: var(--theme-erp-accent);
}

/* ==================== TWO-ROW STATUS BAR ==================== */
.erp-wizard-status {
    display: grid;
    grid-template-columns: 1fr 0.55fr 1fr 0.55fr 1fr 0.55fr 1fr 0.55fr 1fr;
    grid-template-rows: auto auto auto auto;
    row-gap: 6px;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px 4px 6px;
    background: color-mix(in srgb, var(--theme-erp-accent) 5%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 20%, transparent);
    border-radius: 8px;
    flex-shrink: 0;
}
.erp-wizard-phase-caps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    align-self: center;
    min-width: 0;
}
.erp-wizard-phase-orb {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.erp-wizard-phase-orb.is-done {
    background: var(--theme-erp-accent);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-erp-accent) 20%, transparent);
}
.erp-wizard-phase-orb.is-upcoming {
    border: 1.5px solid color-mix(in srgb, var(--theme-erp-accent) 45%, transparent);
    background: transparent;
}
.erp-wizard-phase-cap {
    font-size: 0.62rem;
    padding: 2px 10px;
    border-radius: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 30%, transparent);
    color: var(--text-light);
    background: var(--theme-card-bg);
    white-space: nowrap;
    transition: all 0.3s ease;
}
.erp-wizard-phase-cap.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--theme-erp-accent), var(--theme-erp-accent-light));
    border-color: var(--theme-erp-accent);
    font-weight: 600;
}
.erp-wizard-phase-cap.is-done {
    color: var(--theme-erp-accent);
    border-color: var(--theme-erp-accent);
}
.erp-wizard-phase-req {
    justify-self: center;
    align-self: center;
    font-size: 0.63rem;
    font-weight: 500;
    color: var(--theme-erp-accent);
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
}
.erp-wizard-icn {
    justify-self: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-light);
    background: var(--theme-card-bg);
    border: 2px solid color-mix(in srgb, var(--theme-erp-accent) 25%, transparent);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}
.erp-wizard-icn.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--theme-erp-accent), var(--theme-erp-accent-light));
    border-color: var(--theme-erp-accent);
    animation: erp-wizard-glow 2s ease-in-out infinite;
    will-change: box-shadow;
}
.erp-wizard-icn.is-done {
    color: #ffffff;
    background: var(--theme-erp-accent);
    border-color: var(--theme-erp-accent);
}
.erp-wizard-icn.is-upcoming {
    color: var(--text-light);
}
@keyframes erp-wizard-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(31, 138, 156, 0.6); }
    50% { box-shadow: 0 0 0 9px rgba(31, 138, 156, 0); }
}
.erp-wizard-conn {
    height: 3px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--theme-erp-accent) 15%, transparent);
    transition: background 0.3s ease;
}
.erp-wizard-conn.is-done {
    background: var(--theme-erp-accent);
}
.erp-wizard-label {
    justify-self: center;
    font-size: 0.62rem;
    color: var(--text-light);
    text-align: center;
    max-width: 90px;
    line-height: 1.2;
    transition: color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erp-wizard-label.is-active {
    color: var(--theme-erp-accent);
    font-weight: 600;
}
.erp-wizard-label.is-done {
    color: var(--theme-erp-accent);
}

/* Per-step icon animations on active step */
.erp-wizard-icn.is-active .fa-pen {
    animation: erp-pen-write 1.4s ease-in-out infinite;
}
.erp-wizard-icn.is-active .fa-file-lines {
    animation: erp-doc-fill 1.6s ease-in-out infinite;
}
.erp-wizard-icn.is-active .fa-ship {
    animation: erp-ship-bob 1.6s ease-in-out infinite;
}
.erp-wizard-icn.is-active .fa-truck-fast {
    animation: erp-truck-drive 1.6s ease-in-out infinite;
}
.erp-wizard-icn.is-active .fa-boxes-stacked {
    animation: erp-boxes-stack 1.6s ease-in-out infinite;
}
@keyframes erp-pen-write {
    0%, 100% { transform: translateX(-2px) rotate(-6deg); }
    50% { transform: translateX(2px) rotate(6deg); }
}
@keyframes erp-doc-fill {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(-2px); opacity: 0.75; }
}
@keyframes erp-ship-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes erp-truck-drive {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}
@keyframes erp-boxes-stack {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px) scale(1.05); }
}

/* ==================== WIZARD BODY ==================== */
.erp-wizard-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 16px 8px 8px;
}
.erp-wizard-body::-webkit-scrollbar {
    width: 12px;
}
.erp-wizard-body::-webkit-scrollbar-track {
    background: transparent;
}
.erp-wizard-body::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--theme-erp-accent) 45%, transparent);
    border-radius: 6px;
    border: 4px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 0 4px rgba(31, 138, 156, 0.3);
}
.erp-wizard-save-btn {
    position: center;
    min-height: 17px;
    padding: 2px 12px;
    font-size: 0.68rem;
}
.erp-wizard-save-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    border: 2px solid var(--theme-erp-accent);
    opacity: 0;
    pointer-events: none;
    animation: erp-wizard-save-pulse 2.4s ease-out infinite;
}
.erp-wizard-save-btn.saved::after {
    animation: none;
    opacity: 0;
}
.erp-wizard-save-btn.saved {
    background: rgba(32, 143, 79, 0.12);
    border-color: #208f4f;
    color: #208f4f;
}
@keyframes erp-wizard-save-pulse {
    0% { opacity: 0.7; transform: scale(1); }
    70% { opacity: 0; transform: scale(1.25); }
    100% { opacity: 0; transform: scale(1.25); }
}
.erp-wizard-page {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
}
.erp-wizard-page.is-active {
    display: flex;
}
.erp-wizard-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-erp-accent);
    padding-bottom: 6px;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-erp-accent) 25%, transparent);
}
.erp-wizard-wenr {
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.82rem;
    padding: 2px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 30%, transparent);
}
.erp-wizard-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.erp-wizard-field-label {
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 500;
}
.erp-wizard-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 25%, transparent);
    border-radius: 8px;
    background: #f3fcfd;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.82rem;
    transition: border-color 0.2s ease;
}
.erp-wizard-input:focus {
    outline: none;
    border-color: var(--theme-erp-accent);
}
.erp-wizard-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.erp-wizard-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}
.erp-wizard-subgroup {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: color-mix(in srgb, var(--theme-erp-accent) 5%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 15%, transparent);
    border-radius: 8px;
}
.erp-wizard-price-auto {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--theme-erp-accent);
    font-style: italic;
}
.erp-wizard-price-auto i {
    font-size: 0.8rem;
}
.erp-wizard-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.erp-wizard-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-dark);
    cursor: pointer;
}
.erp-wizard-check input {
    accent-color: var(--theme-erp-accent);
    width: 15px;
    height: 15px;
    cursor: pointer;
}
#erp-order-klc-wrap {
    font-size: 1.08rem;
    justify-content: flex-end;
    width: fit-content;
    margin-left: auto;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 40%, transparent);
    border-radius: 8px;
    padding: 8px 12px;
    background: color-mix(in srgb, var(--theme-erp-accent) 5%, transparent);
    transition: border-color 0.2s ease;
}
#erp-order-klc-wrap input[type="checkbox"] {
    margin-left: 4px;
}
#erp-order-klc-wrap:hover {
    border-color: var(--theme-erp-accent);
}
.erp-wizard-check[hidden],
.erp-wizard-summary-table[hidden] {
    display: none;
}
.erp-wizard-summary-table.erp-order-summary-open {
    animation: erp-order-summary-slide 0.28s ease;
}
@keyframes erp-order-summary-slide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.erp-wizard-order-choice {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}
.erp-wizard-order-choice[hidden] {
    display: none;
}
.erp-wizard-order-summary-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}
.erp-wizard-order-summary-actions[hidden] {
    display: none;
}
.erp-wizard-order-summary-actions .erp-wizard-save-btn {
    min-height: 24px;
    padding: 4px 14px;
    font-size: 0.78rem;
}
.erp-wizard-special-row {
    cursor: pointer;
    transition: background 0.15s ease;
}
.erp-wizard-special-row:hover {
    background: color-mix(in srgb, var(--theme-erp-accent) 8%, transparent);
}
.erp-wizard-special-cell {
    white-space: nowrap;
}
.erp-wizard-special-input {
    margin-left: 6px;
}
.erp-wizard-special-value {
    font-weight: 600;
    color: var(--theme-erp-accent);
}
.erp-wizard-special-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 40%, transparent);
    border-radius: 50%;
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
    color: var(--theme-erp-accent);
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    transition: background 0.15s ease;
}
.erp-wizard-special-add:hover {
    background: var(--theme-erp-accent);
    color: #fff;
}
.erp-wizard-special-input {
    width: 88px;
    padding: 3px 6px;
}
.erp-wizard-special-ok,
.erp-wizard-special-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin-left: 4px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.erp-wizard-special-ok {
    border: 1px solid color-mix(in srgb, #27ae60 40%, transparent);
    background: color-mix(in srgb, #27ae60 10%, transparent);
    color: #208f4f;
}
.erp-wizard-special-ok:hover {
    background: #27ae60;
    color: #fff;
}
.erp-wizard-special-cancel {
    border: 1px solid color-mix(in srgb, #e74c3c 40%, transparent);
    background: color-mix(in srgb, #e74c3c 10%, transparent);
    color: #e74c3c;
}
.erp-wizard-special-cancel:hover {
    background: #e74c3c;
    color: #fff;
}
.erp-wizard-special-ok[hidden],
.erp-wizard-special-cancel[hidden] {
    display: none;
}
.erp-wizard-sum-cell-price {
    white-space: nowrap;
}
.erp-wizard-sum-price-na {
    color: var(--text-light);
    opacity: 0.6;
}

/* Product search */
.erp-wizard-search {
    position: relative;
}
.erp-wizard-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--theme-card-bg);
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 30%, transparent);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    z-index: 30;
    max-height: 180px;
    overflow-y: auto;
    padding: 4px;
    flex-direction: column;
    gap: 2px;
}
.erp-wizard-search-results.open {
    display: flex;
}
.erp-wizard-search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-dark);
    transition: background 0.15s ease;
}
.erp-wizard-search-item:hover {
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
}
.erp-wizard-search-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erp-wizard-search-cas {
    font-size: 0.68rem;
    color: var(--text-light);
    flex-shrink: 0;
}
.erp-wizard-search-empty {
    padding: 8px 10px;
    font-size: 0.78rem;
    color: var(--text-light);
    font-style: italic;
}
.erp-wizard-selected-product {
    display: none;
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--theme-erp-accent) 8%, transparent);
    color: var(--theme-erp-accent);
    font-size: 0.78rem;
    font-weight: 500;
    align-items: center;
    gap: 6px;
}
.erp-wizard-selected-product:not(:empty) {
    display: flex;
}
.erp-wizard-search-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.erp-wizard-search-main {
    flex: 1;
}
.erp-wizard-result {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 30%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--theme-erp-accent) 5%, transparent);
}
.erp-wizard-result[hidden] {
    display: none;
}
.erp-wizard-result-head {
    display: flex;
    align-items: center;
    gap: 8px;
}
.erp-wizard-result-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dark);
}
.erp-wizard-result-form {
    font-size: 0.72rem;
    color: var(--theme-erp-accent);
    background: #eef9fb;
    border-radius: 6px;
    padding: 2px 8px;
    margin-left: auto;
    flex-shrink: 0;
}
.erp-wizard-result-remove {
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 5px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}
.erp-wizard-result-remove:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}
.erp-wizard-result-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.erp-wizard-mod-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.erp-wizard-mod-item {
    padding: 6px 14px;
    background: #f3fcfd;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 25%, transparent);
    border-radius: 20px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    min-height: 34px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}
.erp-wizard-mod-item:hover {
    border-color: var(--theme-erp-accent);
    background: color-mix(in srgb, var(--theme-erp-accent) 8%, transparent);
}
.erp-wizard-mod-item.active {
    background: var(--theme-erp-accent);
    border-color: var(--theme-erp-accent);
    color: white;
}
.erp-wizard-grade-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.erp-wizard-grade-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #f3fcfd;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 25%, transparent);
    border-radius: 20px;
    transition: all 0.2s ease;
}
.erp-wizard-grade-item:has(.erp-wizard-grade-check input:checked) {
    background: color-mix(in srgb, var(--theme-erp-accent) 12%, transparent);
    border-color: var(--theme-erp-accent);
}
.erp-wizard-grade-check {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    min-height: 34px;
    -webkit-tap-highlight-color: transparent;
}
.erp-wizard-grade-check input {
    width: 18px;
    height: 18px;
    accent-color: var(--theme-erp-accent);
    cursor: pointer;
    flex-shrink: 0;
}
.erp-wizard-grade-solid {
    font-size: 0.78rem;
    color: var(--text-dark);
    background: white;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 30%, transparent);
    border-radius: 14px;
    padding: 4px 8px;
    cursor: pointer;
    max-width: 150px;
    min-height: 30px;
}

/* Port / Price */
.erp-wizard-port {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    align-items: stretch;
}
.erp-wizard-port[hidden] {
    display: none;
}
.erp-wizard-port-list {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: #f3fcfd;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 25%, transparent);
    border-radius: 8px;
}
.erp-wizard-port-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 20%, transparent);
    border-radius: 6px;
    padding: 6px 10px;
    transition: all 0.2s ease;
    flex-wrap: wrap;
    cursor: pointer;
}
.erp-wizard-port-item:hover {
    border-color: color-mix(in srgb, var(--theme-erp-accent) 55%, transparent);
}
.erp-wizard-port-item:has(.erp-wizard-port-row input:checked) {
    border-color: var(--theme-erp-accent);
}
.erp-wizard-port-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-dark);
    cursor: pointer;
    min-height: 26px;
    -webkit-tap-highlight-color: transparent;
}
.erp-wizard-port-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--theme-erp-accent);
    flex-shrink: 0;
    cursor: pointer;
}
.erp-wizard-port-flag {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}
.erp-wizard-port-name {
    flex: 1;
    min-width: 0;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.erp-wizard-port-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    color: var(--text-light);
    background: color-mix(in srgb, var(--theme-erp-accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 20%, transparent);
    white-space: nowrap;
    flex-shrink: 0;
}
.erp-wizard-port-badge.is-priced {
    color: #208f4f;
    background: rgba(32, 143, 79, 0.1);
    border-color: rgba(32, 143, 79, 0.3);
}
.erp-wizard-port-badge.is-requested {
    color: #e0781f;
    background: rgba(224, 120, 31, 0.1);
    border-color: rgba(224, 120, 31, 0.35);
}
.erp-wizard-port-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding: 0;
    border-top: none;
}
.erp-wizard-port-price[hidden] {
    display: none;
}
.erp-wizard-port-price .erp-wizard-input {
    width: calc(176px * 0.8);
    min-width: 0;
}
.erp-wizard-port-price-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
}
.erp-wizard-port-request {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.7rem;
}
.erp-wizard-port-request.is-requested {
    background: rgba(224, 120, 31, 0.12);
    border-color: #e0781f;
    color: #e0781f;
}
.erp-wizard-port-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.erp-wizard-port-hint {
    font-size: 0.68rem;
    color: var(--text-light);
    text-align: left;
    padding: 2px 4px;
}
.erp-wizard-port-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.erp-wizard-currency-toggle {
    display: flex;
    gap: 4px;
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 40%, transparent);
}
.erp-wizard-currency-btn {
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.71rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.erp-wizard-currency-btn.active {
    background: var(--theme-erp-accent);
    color: white;
}

/* Summary actions (copy + confirm amount) */
#erp-plan-search {
    background: #f3fcfd;
}
.erp-wizard-summary-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}
.erp-wizard-summary-actions #erp-plan-copy {
    margin-left: auto;
}
.erp-wizard-summary-actions #erp-plan-amount-confirm[hidden] {
    display: none;
}
.erp-wizard-summary-head-actions #erp-plan-confirm {
    margin-left: auto;
    align-self: stretch;
    box-sizing: border-box;
    padding-top: 2px;
    padding-bottom: 2px;
}
.erp-wizard-summary-head-actions #erp-plan-confirm[hidden] {
    display: none;
}
.erp-wizard-summary-head-actions .erp-wizard-btn.disabled,
.erp-wizard-summary-actions .erp-wizard-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Amount step (integrated into summary table Amount column) */
.erp-wizard-summary {
    min-width: 0;
}
.erp-wizard-sum-cell-amount .erp-wizard-amount-input {
    width: 90px;
    text-align: center;
    padding: 3px 6px;
}
.erp-wizard-amount-hint {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 500;
    color: #e74c3c;
    padding: 2px 4px;
}
.erp-wizard-amount-hint[hidden] {
    display: none;
}

/* Result actions */
.erp-wizard-result-actions {
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

/* Manual browse panel */
.erp-wizard-manual {
    margin-top: 6px;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 30%, transparent);
    border-radius: 8px;
    background: #f3fcfd;
    display: flex;
    flex-direction: column;
    max-height: 260px;
}
.erp-wizard-manual[hidden] {
    display: none;
}
.erp-wizard-manual-toggle {
    display: flex;
    gap: 4px;
    padding: 8px 10px 6px 10px;
    border-bottom: 2px solid color-mix(in srgb, var(--theme-erp-accent) 25%, transparent);
}
.erp-wizard-manual-tab {
    padding: 5px 10px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.71rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.erp-wizard-manual-tab i {
    font-size: 0.9rem;
}
.erp-wizard-manual-tab.active {
    background: var(--theme-erp-accent);
    color: white;
}
.erp-wizard-manual-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px 10px 10px;
    overflow-y: auto;
    min-height: 0;
}
.erp-wizard-manual-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    background: white;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 20%, transparent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    color: var(--text-dark);
    transition: all 0.2s ease;
}
.erp-wizard-manual-item:hover {
    transform: translateX(3px);
    border-color: var(--theme-erp-accent);
}
.erp-wizard-manual-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.erp-wizard-manual-icon {
    color: var(--theme-erp-accent);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.erp-wizard-manual-count {
    font-size: 0.7rem;
    color: var(--text-light);
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 600;
    flex-shrink: 0;
}
.erp-wizard-manual-back {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--theme-erp-accent);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.erp-wizard-manual-back:hover {
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
}

/* Summary */
.erp-wizard-sum-product {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: color-mix(in srgb, var(--theme-erp-accent) 8%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--theme-erp-accent) 15%, transparent);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}
.erp-wizard-sum-product:hover {
    background: color-mix(in srgb, var(--theme-erp-accent) 14%, transparent);
}
.erp-wizard-sum-chevron {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    color: var(--theme-erp-accent);
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}
.erp-wizard-sum-details {
    display: flex;
    flex-direction: column;
}
.erp-wizard-sum-details.collapsed {
    display: none;
}
.erp-wizard-sum-details .erp-wizard-sum-row:last-child {
    border-bottom: 1px solid color-mix(in srgb, var(--theme-erp-accent) 15%, transparent);
}
.erp-wizard-sum-product-nr {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--theme-erp-accent);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
}
.erp-wizard-sum-product-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.erp-wizard-sum-remove {
    border: none;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 5px;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}
.erp-wizard-sum-remove:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}
.erp-wizard-sum-empty {
    padding: 10px;
    font-size: 0.76rem;
    color: var(--text-light);
    font-style: italic;
}

/* Summary */
.erp-wizard-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.erp-wizard-summary-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #f3fcfd;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 25%, transparent);
    border-radius: 8px;
    overflow: hidden;
}
.erp-wizard-summary-table table.erp-wizard-sum-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.74rem;
}
.erp-wizard-sum-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 10px;
    font-size: 0.76rem;
}
.erp-wizard-sum-row:nth-child(even) {
    background: rgba(31, 138, 156, 0.05);
}
.erp-wizard-sum-label {
    color: var(--text-light);
}
.erp-wizard-sum-value {
    color: var(--text-dark);
    font-weight: 600;
}
.erp-wizard-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.erp-wizard-summary-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.erp-wizard-summary-expand-btn {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    background: var(--theme-erp-accent);
    color: #fff;
    font-size: 0.72rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.erp-wizard-summary-expand-btn:hover {
    background: var(--theme-erp-accent-light);
}
.erp-wizard-summary-toggle {
    display: flex;
    gap: 4px;
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 40%, transparent);
}
.erp-wizard-summary-toggle-btn {
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.71rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.erp-wizard-summary-toggle-btn i {
    font-size: 0.85rem;
}
.erp-wizard-summary-toggle-btn.active {
    background: var(--theme-erp-accent);
    color: white;
}
.erp-wizard-sum-table th,
.erp-wizard-sum-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid color-mix(in srgb, var(--theme-erp-accent) 15%, transparent);
    color: var(--text-dark);
    vertical-align: top;
}
.erp-wizard-sum-table th {
    font-weight: 600;
    color: var(--theme-erp-accent);
    background: color-mix(in srgb, var(--theme-erp-accent) 6%, transparent);
    white-space: nowrap;
}
.erp-wizard-sum-table tbody tr:hover {
    background: rgba(31, 138, 156, 0.04);
}
.erp-wizard-sum-table td.erp-wizard-sum-cell-name {
    font-weight: 600;
    min-width: 140px;
}
.erp-wizard-sum-table td.erp-wizard-sum-cell-amount {
    font-weight: 600;
    color: var(--theme-erp-accent);
    text-align: center;
    white-space: nowrap;
}
.erp-wizard-sum-amount {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--theme-erp-accent);
    margin-left: auto;
    flex-shrink: 0;
}
.erp-wizard-sum-amount-input {
    width: 88px;
    flex-shrink: 0;
    text-align: center;
    padding: 4px 6px;
    font-size: 0.78rem;
    margin-left: auto;
}
.erp-wizard-sum-amount-input.is-missing,
.erp-wizard-amount-input.is-missing {
    border-color: rgba(231, 76, 60, 0.7);
    animation: erp-amount-missing-pulse 1.3s ease-in-out infinite;
}
@keyframes erp-amount-missing-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); }
}
.erp-wizard-sum-table .erp-wizard-sum-remove {
    padding: 1px 4px;
    font-size: 0.8rem;
}

/* File uploads */
.erp-wizard-upload {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.erp-wizard-file {
    padding: 8px;
    border: 1px dashed color-mix(in srgb, var(--theme-erp-accent) 40%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--theme-erp-accent) 5%, transparent);
    font-size: 0.75rem;
    color: var(--text-dark);
    cursor: pointer;
}
.erp-wizard-file::file-selector-button {
    background: var(--theme-erp-accent);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 5px 14px;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}
.erp-wizard-file::file-selector-button:hover {
    background: #167582;
}
.erp-wizard-file-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.erp-wizard-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #f3fcfd;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 20%, transparent);
    font-size: 0.74rem;
}
.erp-wizard-file-item i {
    color: var(--theme-erp-accent);
    flex-shrink: 0;
}
.erp-wizard-file-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.erp-wizard-file-name {
    color: var(--text-dark);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erp-wizard-file-rename {
    color: var(--theme-erp-accent);
    font-size: 0.68rem;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erp-wizard-finish-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--theme-erp-accent) 12%, transparent);
    color: var(--theme-erp-accent);
    font-size: 0.76rem;
    font-weight: 600;
    animation: erp-finish-appear 0.3s ease;
}
@keyframes erp-finish-appear {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.erp-wizard-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--theme-erp-accent) 40%, transparent);
    background: color-mix(in srgb, var(--theme-erp-accent) 10%, transparent);
    color: var(--theme-erp-accent);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.erp-wizard-btn:hover {
    background: color-mix(in srgb, var(--theme-erp-accent) 20%, transparent);
    border-color: var(--theme-erp-accent);
}
.erp-wizard-btn.primary {
    background: linear-gradient(135deg, var(--theme-erp-accent), var(--theme-erp-accent-light));
    border-color: var(--theme-erp-accent);
    color: #ffffff;
}
.erp-wizard-btn.primary:hover {
    filter: brightness(1.08);
}
.erp-wizard-btn.ghost {
    background: transparent;
}
.erp-wizard-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Footer nav */
.erp-wizard-footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--theme-erp-accent) 15%, transparent);
    flex-shrink: 0;
}
.erp-wizard-footer #erp-wizard-back {
    justify-self: start;
}
.erp-wizard-footer #erp-wizard-save {
    justify-self: center;
}
.erp-wizard-footer #erp-wizard-next {
    justify-self: end;
}

/* ==================== LEGACY ID LIST (unused, kept for reference) ==================== */
.erp-batch-panel-note {
    margin-top: 2px;
    text-align: center;
    font-size: 0.8rem;
    font-style: italic;
    color: var(--theme-erp-accent);
    letter-spacing: 0.5px;
}
