@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500&display=swap');

:root {
    --bg: #070b14;
    --surface: #0f1623;
    --elevated: #151d2e;
    --border: rgba(148, 163, 184, 0.14);
    --text: #f1f5f9;
    --muted: #94a3b8;
    --accent: #8b5cf6;
    --accent-2: #6366f1;
    --accent-glow: rgba(139, 92, 246, 0.35);
    --header-h: 64px;
    --toolbar-h: 0px;
    --sticky-below: 64px;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.28);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { font-family: 'Inter', system-ui, sans-serif; }

body.theme-dark {
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 90% 60% at 10% -10%, rgba(99, 102, 241, 0.18), transparent 55%),
        radial-gradient(ellipse 70% 50% at 95% 0%, rgba(16, 185, 129, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(139, 92, 246, 0.08), transparent 60%);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.glass-card {
    background: linear-gradient(155deg, rgba(21, 29, 46, 0.92), rgba(12, 18, 30, 0.96));
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-xl);
}

@media (hover: hover) {
    .glass-card:hover {
        border-color: rgba(139, 92, 246, 0.28);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(139, 92, 246, 0.08);
    }
}

.product-card.glass-card {
    background: #141c2b;
    backdrop-filter: none;
}

.product-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card .product-card-media {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 1rem 1rem 0 0;
    background: #0a0e17;
    position: relative;
}

.product-card-photo {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #0a0e17;
    cursor: pointer;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    display: block;
    font: inherit;
    text-align: left;
    border-radius: 1rem 1rem 0 0;
}

.product-card-photo--empty {
    cursor: default;
}

.product-card-photo:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 2px;
}

.product-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 1rem 1rem 0 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: filter 0.2s ease;
    padding: 0.65rem;
    box-sizing: border-box;
    background: radial-gradient(ellipse at 50% 42%, #2a3548 0%, #141c2b 55%, #0a0e17 100%);
}

.product-card-photo:hover .product-card-img {
    filter: brightness(0.88);
}

.product-card-photo-hint {
    position: static;
    align-self: center;
    margin: 0 0 0.45rem;
    transform: none;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 9999px;
    background: rgba(10, 14, 23, 0.92);
    border: 1px solid rgba(129, 140, 248, 0.45);
    color: #c7d2fe;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    flex-shrink: 0;
}

.product-card-photo-hint-icon {
    font-size: 0.75rem;
    line-height: 1;
}

.product-card:hover .product-card-photo-hint {
    background: #4f46e5;
    border-color: #6366f1;
    color: #fff;
}

.product-card-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 0.875rem;
    background: #1e293b;
}

.product-card-media-ui {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
}

.product-card-media-ui .product-edit-btn {
    pointer-events: auto;
    z-index: 15;
}

.product-card-badges,
.product-card-media-footer,
.product-card-photo-hint {
    pointer-events: none;
}

.product-card-media-footer {
    margin-top: auto;
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 0.5rem;
}

.product-card-names {
    padding-top: 0.85rem;
    margin-top: 0.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.product-card-sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 0.3rem 0.65rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card-sku:hover {
    color: #e2e8f0;
    border-color: rgba(129, 140, 248, 0.45);
    background: rgba(79, 70, 229, 0.12);
}

.product-card-sku--copied {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
}

.product-card .product-card-body {
    padding: 1.25rem 1.35rem 1.35rem;
    position: relative;
    z-index: 2;
    background: #141c2b;
    border-radius: 0 0 1rem 1rem;
}

.product-card-stock-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 1rem;
    background: #0c1220;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.product-card-stock-bar__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
}

.product-card-stock-bar--ok .product-card-stock-bar__dot {
    background: #34d399;
    color: #34d399;
}

.product-card-stock-bar--low .product-card-stock-bar__dot {
    background: #fbbf24;
    color: #fbbf24;
}

.product-card-stock-bar--out .product-card-stock-bar__dot {
    background: #f87171;
    color: #f87171;
}

.product-card-stock-bar__qty {
    display: inline-flex;
    align-items: baseline;
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
    line-height: 1;
}

.product-card-stock-input {
    width: 4.5ch;
    min-width: 2ch;
    max-width: 7ch;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    -moz-appearance: textfield;
    appearance: textfield;
    cursor: text;
    border-radius: 0.15rem;
}

.product-card-stock-input::-webkit-outer-spin-button,
.product-card-stock-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-card-stock-input:hover {
    background: rgba(255, 255, 255, 0.04);
}

.product-card-stock-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.product-card-stock-input--saving {
    opacity: 0.6;
}

.product-card-stock-bar__unit {
    font-size: 0.72rem;
    font-weight: 700;
    color: #94a3b8;
}

.product-card-stock-bar__label {
    margin-left: auto;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: right;
}

.product-card-stock-bar--ok .product-card-stock-bar__label { color: #6ee7b7; }
.product-card-stock-bar--low .product-card-stock-bar__label { color: #fcd34d; }
.product-card-stock-bar--out .product-card-stock-bar__label { color: #fca5a5; }

.product-card-stock-bar--ok {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.12) 0%, #0c1220 42%);
}

.product-card-stock-bar--low {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.14) 0%, #0c1220 42%);
}

.product-card-stock-bar--out {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.14) 0%, #0c1220 42%);
}

.product-card-zone {
    max-width: 5.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-packing-chips {
    margin-bottom: 0.25rem;
}

.sd-packing-chips .asm-pack-summary {
    margin-bottom: 0;
}

.product-card .product-edit-btn {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.product-card .product-edit-btn:hover {
    background: #4f46e5;
    border-color: #6366f1;
}

/* Полноэкранный просмотр фото */
.photo-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.photo-lightbox.hidden {
    display: none;
}

.photo-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
    padding: 0;
}

.photo-lightbox-panel {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 900px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
}

.photo-lightbox-panel > * {
    pointer-events: auto;
}

.photo-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(30, 41, 59, 0.9);
    color: #f1f5f9;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.photo-lightbox-close:hover {
    background: #4f46e5;
}

.photo-lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 4rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
    border: 2px solid rgba(129, 140, 248, 0.4);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
    background: #0a0e17;
    user-select: none;
    -webkit-user-drag: none;
}

.photo-lightbox-caption {
    text-align: center;
    max-width: 100%;
    padding: 0 0.5rem;
}

.product-card .product-title {
    font-size: 1.05rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-subtitle {
    font-size: 0.78rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

#catalog-grid {
    gap: 1.35rem;
}

.catalog-page-btn {
    min-width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.catalog-page-btn.active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.catalog-page-btn:not(.active) {
    background: rgba(30, 41, 59, 0.6);
    color: #cbd5e1;
    border: 1px solid var(--border);
}

.catalog-page-btn:not(.active):hover {
    background: rgba(51, 65, 85, 0.7);
    color: #f8fafc;
}

.catalog-page-ellipsis {
    color: #64748b;
    font-size: 0.85rem;
    padding: 0 0.25rem;
    user-select: none;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-card--hanox:hover {
    border-color: rgba(234, 88, 12, 0.55);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(234, 88, 12, 0.22);
}

.product-card--vendy:hover {
    border-color: rgba(2, 132, 199, 0.55);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(2, 132, 199, 0.22);
}

.product-card--wb:hover {
    border-color: rgba(124, 58, 237, 0.55);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(124, 58, 237, 0.22);
}

.product-listings {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.listing-chip {
    font-size: 0.625rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding: 0.2rem 0.45rem;
    border-radius: 0.4rem;
    border: 1px solid transparent;
    line-height: 1.3;
}

.listing-chip--wb {
    color: #c4b5fd;
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.28);
}

.listing-chip--hanox {
    color: #fdba74;
    background: rgba(234, 88, 12, 0.12);
    border-color: rgba(234, 88, 12, 0.28);
}

.listing-chip--vendy {
    color: #7dd3fc;
    background: rgba(2, 132, 199, 0.12);
    border-color: rgba(2, 132, 199, 0.28);
}

.product-card.hidden-by-search {
    display: none !important;
}

.input-dark {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #f1f5f9;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-dark:focus {
    outline: none;
    border-color: #818cf8;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-dark::placeholder { color: #64748b; }

.tab-active {
    background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
    color: white !important;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.tab-inactive {
    background: rgba(15, 23, 42, 0.55);
    color: #94a3b8;
    border: 1px solid transparent;
}

.tab-inactive:hover {
    background: rgba(51, 65, 85, 0.6);
    color: #f1f5f9;
}

.chip-active {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.chip-inactive {
    background: rgba(30, 41, 59, 0.8);
    color: #94a3b8;
    border: 1px solid var(--border);
}

.chip-inactive:hover { color: #e2e8f0; border-color: rgba(129, 140, 248, 0.3); }

.chip-wb.chip-inactive {
    color: #c4b5fd;
    border-color: rgba(124, 58, 237, 0.38);
    background: rgba(124, 58, 237, 0.14);
}
.chip-wb.chip-inactive:hover {
    border-color: rgba(124, 58, 237, 0.55);
    background: rgba(124, 58, 237, 0.22);
    color: #ddd6fe;
}

.chip-hanox.chip-inactive {
    color: #fdba74;
    border-color: rgba(234, 88, 12, 0.38);
    background: rgba(234, 88, 12, 0.12);
}
.chip-hanox.chip-inactive:hover {
    border-color: rgba(234, 88, 12, 0.55);
    background: rgba(234, 88, 12, 0.2);
    color: #fed7aa;
}

.chip-vendy.chip-inactive {
    color: #7dd3fc;
    border-color: rgba(2, 132, 199, 0.38);
    background: rgba(2, 132, 199, 0.12);
}
.chip-vendy.chip-inactive:hover {
    border-color: rgba(2, 132, 199, 0.55);
    background: rgba(2, 132, 199, 0.2);
    color: #bae6fd;
}

.chip-count {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    opacity: 0.9;
}

.chip-active .chip-count {
    background: rgba(255, 255, 255, 0.22);
}

.chip-inactive .chip-count {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
}

.chip-wb.chip-active { background: linear-gradient(135deg, #7c3aed, #6d28d9); box-shadow: 0 2px 8px rgba(124, 58, 237, 0.35); }
.chip-hanox.chip-active { background: linear-gradient(135deg, #ea580c, #c2410c); box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35); }
.chip-vendy.chip-active { background: linear-gradient(135deg, #0284c7, #0369a1); box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35); }

.badge-wb { background: rgba(124, 58, 237, 0.2); color: #c4b5fd; border: 1px solid rgba(124, 58, 237, 0.35); }
.badge-hanox { background: rgba(234, 88, 12, 0.2); color: #fdba74; border: 1px solid rgba(234, 88, 12, 0.35); }
.badge-vendy { background: rgba(2, 132, 199, 0.2); color: #7dd3fc; border: 1px solid rgba(2, 132, 199, 0.35); }
.api-tab {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(15, 23, 42, 0.5);
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.15s;
}

.api-tabs-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.api-field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: end;
}

@media (max-width: 640px) {
    .api-field-grid { grid-template-columns: 1fr; }
}

.api-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.api-field__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.api-field .secret-field {
    width: 100%;
}

.api-tab:hover { color: #e2e8f0; background: rgba(30, 41, 59, 0.8); }

.api-tab.active-hanox {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.25), rgba(194, 65, 12, 0.15));
    border-color: rgba(234, 88, 12, 0.45);
    color: #fdba74;
}

.api-tab.active-vendy {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(3, 105, 161, 0.15));
    border-color: rgba(2, 132, 199, 0.45);
    color: #7dd3fc;
}

.api-tab.active-wb {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(109, 40, 217, 0.15));
    border-color: rgba(124, 58, 237, 0.45);
    color: #c4b5fd;
}

.api-panel { display: none; }
.api-panel.active { display: block; }

.sync-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 0.65rem;
    padding: 0;
    line-height: 1.3;
}

.sync-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.sync-actions-grid--wb {
    grid-template-columns: 1fr 1fr;
}

.sync-action-form {
    display: flex;
    min-height: 2.5rem;
}

.sync-action-btn {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.sync-action-btn--hanox {
    background: rgba(234, 88, 12, 0.15);
    border-color: rgba(234, 88, 12, 0.25);
    color: #fdba74;
}
.sync-action-btn--hanox:hover { background: rgba(234, 88, 12, 0.25); }

.sync-action-btn--vendy {
    background: rgba(2, 132, 199, 0.15);
    border-color: rgba(2, 132, 199, 0.25);
    color: #7dd3fc;
}
.sync-action-btn--vendy:hover { background: rgba(2, 132, 199, 0.25); }

.sync-action-btn--wb {
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.25);
    color: #c4b5fd;
}
.sync-action-btn--wb:hover { background: rgba(124, 58, 237, 0.25); }

.sync-all-wrap {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sync-all-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #059669, #0d9488);
    transition: filter 0.15s;
}
.sync-all-btn:hover { filter: brightness(1.08); }

.sync-running-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: var(--text-primary, #e2e8f0);
    font-size: 0.875rem;
}

.sync-running-banner.hidden { display: none; }

.sync-running-banner__spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(59, 130, 246, 0.25);
    border-top-color: rgba(59, 130, 246, 0.9);
    border-radius: 50%;
    animation: sync-spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

form[action="/sync_marketplace"] button[type="submit"]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mp-pick-btn { min-width: 0; }

#api-settings-form > button[type="submit"] {
    margin-top: 0.75rem;
}
#edit-photo-zone { cursor: pointer; }

.field-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 0.35rem;
}

.field-hint {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 0.3rem;
    line-height: 1.35;
}

.form-field { margin-bottom: 0.15rem; }

.status-ok { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-low { background: rgba(245, 158,  11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-out { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.search-glow:focus {
    box-shadow: 0 0 0 3px var(--accent-glow), 0 0 20px rgba(129, 140, 248, 0.15);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeIn 0.25s ease forwards; }

#catalog-empty {
    display: none;
}

#catalog-grid:has(.product-card:not(.hidden-by-search)) ~ #catalog-empty,
#catalog-grid .product-card:not(.hidden-by-search) { }

.product-picker {
    position: relative;
}

.picker-search-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    position: relative;
}

.picker-search-row .picker-search {
    flex: 1;
    min-width: 0;
    min-height: 3.25rem;
    padding: 0.9rem 1rem 0.9rem 2.75rem;
    font-size: 1rem;
    line-height: 1.25;
    border-radius: 0.85rem;
}

.picker-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #64748b;
    pointer-events: none;
    z-index: 1;
}

.picker-toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 3.25rem;
    padding: 0 1.1rem;
    border-radius: 0.85rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.35);
    cursor: pointer;
    transition: background 0.15s;
}
.picker-toggle:hover { background: rgba(99, 102, 241, 0.25); }

.picker-toggle-chevron {
    font-size: 0.7rem;
    color: #94a3b8;
}

.picker-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    z-index: 30;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #111827;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.picker-list {
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.picker-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}

.picker-row:last-child { border-bottom: none; }
.picker-row:hover { background: rgba(99, 102, 241, 0.12); }

.picker-row-selected {
    background: rgba(99, 102, 241, 0.18);
    box-shadow: inset 3px 0 0 #818cf8;
}

.picker-row.hidden-by-search { display: none !important; }

.picker-row-photo {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.picker-row-photo--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #475569;
}

.picker-row-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.1rem;
}

.picker-row-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-row-meta {
    font-size: 0.68rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.datetime-picker__row {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.datetime-picker__field {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.datetime-picker__label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.datetime-picker__date,
.datetime-picker__time {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    color-scheme: dark;
}

.datetime-picker__clear {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.datetime-picker__clear:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25);
}

.datetime-picker__hidden {
    display: none;
}

/* Карточка коробки — заголовок и этикетка */
.box-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.box-card-head__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.box-card-head__title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #f8fafc;
    letter-spacing: 0.02em;
}

.box-card-head__meta {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

.box-label-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.1rem;
    border-radius: 0.85rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: #e0e7ff;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(79, 70, 229, 0.25));
    border: 1px solid rgba(129, 140, 248, 0.45);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

.box-label-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(79, 70, 229, 0.35));
    transform: translateY(-1px);
    color: #fff;
}

.box-label-btn__icon {
    font-size: 1rem;
    line-height: 1;
}

.box-item-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.box-item-row__qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.2rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.25);
    flex-shrink: 0;
}

.btn-complete-ready {
    background: linear-gradient(135deg, #6366f1, #7c3aed) !important;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.secret-field { position: relative; }

.secret-field .secret-input {
    padding-right: 2.75rem;
    width: 100%;
}

.secret-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.35rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    line-height: 1;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.15);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.secret-toggle:hover {
    color: #e2e8f0;
    background: rgba(129, 140, 248, 0.15);
}

/* Предпросмотр печати штрихкода */
.print-preview {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.print-preview.hidden {
    display: none;
}

.print-preview-backdrop {
    position: absolute;
    inset: 0;
    border: none;
    background: rgba(0, 0, 0, 0.82);
    cursor: pointer;
    padding: 0;
}

.print-preview-panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 420px);
    background: #141c2b;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 1rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.print-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.print-preview-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
}

.print-preview-close {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(30, 41, 59, 0.9);
    color: #f1f5f9;
    font-weight: 700;
    cursor: pointer;
}

.print-preview-close:hover {
    background: #4f46e5;
}

.print-preview-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: #0f172a;
}

.print-preview-screen-only {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.print-label-sheet {
    width: 43mm;
    height: 25mm;
    padding: 0;
    background: #fff;
    color: #000;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

.print-label-image {
    display: block;
    width: 43mm;
    height: 25mm;
    object-fit: fill;
}

.print-label-warn {
    font-size: 6pt;
    color: #b45309;
    margin-top: 1mm;
}

.print-label-article {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #94a3b8;
    text-align: center;
    margin-bottom: 0.65rem;
}

.print-mp-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-bottom: 0;
}

.print-mp-btn {
    padding: 0.4rem 0.75rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.print-mp-btn--active {
    color: #fff;
}

.print-mp-btn--wb.print-mp-btn--active {
    background: rgba(124, 58, 237, 0.35);
    border-color: rgba(167, 139, 250, 0.55);
}

.print-mp-btn--hanox.print-mp-btn--active {
    background: rgba(234, 88, 12, 0.35);
    border-color: rgba(251, 146, 60, 0.55);
}

.print-mp-btn--vendy.print-mp-btn--active {
    background: rgba(2, 132, 199, 0.35);
    border-color: rgba(56, 189, 248, 0.55);
}

.print-preview-actions {
    display: flex;
    gap: 0.65rem;
    padding: 1rem 1.15rem 1.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.print-preview-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.print-preview-btn-primary {
    background: #4f46e5;
    border-color: #6366f1;
    color: #fff;
}

.print-preview-btn-primary:hover {
    background: #6366f1;
}

.print-preview-btn-dl {
    flex: 0 1 auto;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.print-preview-btn-dl:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

/* —— Отчёт синхронизации —— */
.sync-report {
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(10, 14, 23, 0.98));
    padding: 1rem 1.1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.sync-report--ok {
    border-color: rgba(16, 185, 129, 0.35);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.08), 0 8px 32px rgba(0, 0, 0, 0.35);
}

.sync-report--warn {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1), 0 8px 32px rgba(0, 0, 0, 0.35);
}

.sync-report__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sync-report__head-main {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.sync-report__status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.65rem;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.sync-report--ok .sync-report__status-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.sync-report--warn .sync-report__status-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.sync-report__title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #f1f5f9;
    margin: 0;
}

.sync-report__time {
    font-size: 0.7rem;
    color: #64748b;
    margin: 0.15rem 0 0;
}

.sync-report__close {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #94a3b8;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
}

.sync-report__close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

.sync-report__grid {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.sync-report__grid--mp {
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.sync-report__grid--stats {
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.sync-report__cell {
    border-radius: 0.85rem;
    padding: 0.75rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sync-report__cell--hanox { border-left: 3px solid #f97316; background: rgba(249, 115, 22, 0.06); }
.sync-report__cell--vendy { border-left: 3px solid #38bdf8; background: rgba(56, 189, 248, 0.06); }
.sync-report__cell--wb { border-left: 3px solid #a78bfa; background: rgba(167, 139, 250, 0.06); }
.sync-report__cell--import { border-left: 3px solid #34d399; background: rgba(52, 211, 153, 0.05); }
.sync-report__cell--stocks { border-left: 3px solid #60a5fa; background: rgba(96, 165, 250, 0.05); }
.sync-report__cell--supplies { border-left: 3px solid #fbbf24; background: rgba(251, 191, 36, 0.05); }

.sync-report__cell-head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.sync-report__mp-icon { font-size: 0.85rem; line-height: 1; }
.sync-report__mp-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #e2e8f0;
}

.sync-report__badge {
    margin-left: auto;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
}

.sync-report__badge--ok { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.sync-report__badge--warn { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.sync-report__badge--error { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

.sync-report__cell-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #cbd5e1;
    margin: 0 0 0.35rem;
}

.sync-report__lines {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sync-report__lines li {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.45;
    padding: 0.1rem 0;
}

.sync-report__cell--status-warn .sync-report__lines li { color: #fcd34d; }
.sync-report__cell--status-error .sync-report__lines li { color: #fca5a5; }

.sync-report__stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 0 0 0.5rem;
}

.sync-report__stat-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.sync-report__stat-split {
    display: flex;
    gap: 1.25rem;
}

.sync-report__stat-split > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.sync-report__stat-num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.1;
}

.sync-report__stat-num--new { color: #34d399; }

.sync-report__stat-muted {
    font-size: 0.68rem;
    color: #64748b;
}

.sync-report__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.sync-report__chip {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sync-report__chip--hanox { color: #fdba74; border-color: rgba(249, 115, 22, 0.25); background: rgba(249, 115, 22, 0.1); }
.sync-report__chip--vendy { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.25); background: rgba(56, 189, 248, 0.1); }
.sync-report__chip--wb { color: #c4b5fd; border-color: rgba(167, 139, 250, 0.25); background: rgba(167, 139, 250, 0.1); }

.sync-report__sub {
    margin: 0.45rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sync-report__errors {
    margin-top: 0.65rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.sync-report__errors-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fca5a5;
    margin: 0 0 0.4rem;
}

.sync-report__errors ul {
    margin: 0;
    padding: 0 0 0 1rem;
}

.sync-report__errors li {
    font-size: 0.75rem;
    color: #fecaca;
    line-height: 1.45;
    margin-bottom: 0.2rem;
}

.sync-report--compact {
    padding: 0.75rem;
    margin-top: 0.75rem;
}

.sync-report--compact .sync-report__grid--mp {
    grid-template-columns: 1fr;
}

.sync-report--compact .sync-report__head {
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
}

.flash-toast {
    border-radius: 0.85rem;
    padding: 0.9rem 1.15rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.45;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #e2e8f0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.flash-messages .flash-toast,
.asm-flash-messages .flash-toast {
    padding: 1.15rem 1.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}

.flash-toast--dismissing {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
}

.flash-toast--success {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.flash-toast--warning {
    border-color: rgba(248, 113, 113, 0.38);
    background: rgba(185, 28, 28, 0.12);
    color: #fca5a5;
}

.flash-toast--error {
    border-color: rgba(239, 68, 68, 0.55);
    background: rgba(185, 28, 28, 0.2);
    color: #fecaca;
    box-shadow: 0 4px 22px rgba(239, 68, 68, 0.16);
}

.flash-toast--info {
    border-color: rgba(129, 140, 248, 0.35);
    background: rgba(99, 102, 241, 0.12);
    color: #c7d2fe;
}

.flash-toast--message {
    border-color: rgba(248, 113, 113, 0.32);
    background: rgba(127, 29, 29, 0.14);
    color: #fca5a5;
}

/* Sticky nav + sync flash */
.sticky-toolbar {
    position: sticky;
    top: var(--header-h);
    z-index: 35;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.catalog-toolbar {
    position: sticky;
    top: var(--sticky-below);
    z-index: 20;
}

.catalog-toolbar-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.catalog-search-wrap {
    flex: 1 1 0;
    min-width: 0;
}

.catalog-search-wrap .input-dark {
    height: 100%;
    min-height: 3.25rem;
}

.catalog-avail-badge {
    flex: 0 1 auto;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.55rem 1rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(14, 165, 233, 0.1));
    border: 1px solid rgba(129, 140, 248, 0.28);
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.06);
    text-align: right;
    min-width: 9.5rem;
}

.catalog-page-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 5.25rem;
    height: 3.25rem;
    padding: 0 0.95rem;
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.catalog-page-prefix {
    font-size: 0.72rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.01em;
    margin-right: 0.1rem;
}

.catalog-page-current {
    font-size: 1.05rem;
    font-weight: 800;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.catalog-page-sep {
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    line-height: 1;
}

.catalog-page-total {
    font-size: 0.92rem;
    font-weight: 700;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.catalog-avail-num {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    color: #e0e7ff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.catalog-avail-text {
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.25;
    color: #a5b4fc;
    text-transform: lowercase;
}

@media (max-width: 640px) {
    .catalog-toolbar-row {
        flex-wrap: wrap;
    }

    .catalog-search-wrap {
        order: 1;
        flex: 1 1 100%;
    }

    .catalog-page-badge {
        order: 2;
    }

    .catalog-avail-badge {
        order: 3;
        margin-left: auto;
        max-width: none;
    }
}

.flash-messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sync-flash-wrap {
    position: relative;
}

.sync-flash-toolbar {
    position: relative;
}

.sync-flash-collapse-btn {
    position: absolute;
    top: 0.55rem;
    left: 0.55rem;
    z-index: 6;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 14, 23, 0.75);
    color: #94a3b8;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.sync-flash-collapse-btn:hover {
    background: rgba(30, 41, 59, 0.9);
    color: #e2e8f0;
}

.sync-flash-mini {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.08);
    color: #fbbf24;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.sync-flash-mini__icon {
    font-weight: 800;
    flex-shrink: 0;
}

.sync-flash-mini__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sync-flash-mini__action {
    font-size: 0.68rem;
    color: #94a3b8;
    flex-shrink: 0;
}

.sync-flash-wrap--collapsed .sync-flash-body {
    display: none;
}

.sync-report--dismissible .sync-report__head {
    padding-left: 2.25rem;
}

.admin-user-edit-btn {
    background: rgba(251, 146, 60, 0.15);
    color: #fdba74;
    border: 1px solid rgba(251, 146, 60, 0.28);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.admin-user-edit-btn:hover {
    background: rgba(251, 146, 60, 0.28);
    color: #fed7aa;
}

/* Admin collapsible sections */
.collapse-section {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.12);
}

.collapse-section__head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    border: none;
    cursor: pointer;
    text-align: left;
    line-height: 1.25;
    transition: background 0.15s;
}

.collapse-section__body-inner {
    padding: 1rem;
}

.collapse-section__lead {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0 0 0.75rem;
    line-height: 1.4;
}

.collapse-section__head:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #cbd5e1;
}

.collapse-section__chevron {
    color: #64748b;
    font-size: 0.85rem;
    flex-shrink: 0;
    line-height: 1;
}

.collapse-section__meta {
    font-size: 0.68rem;
    color: #64748b;
    margin-left: auto;
    margin-right: 0.35rem;
    font-weight: 500;
}

.collapse-section__body {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.collapse-section--closed .collapse-section__body {
    border-top: none;
}

/* —— Заявки на поставку (wizard) —— */
.sd-step-indicator {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.sd-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
    background: none;
    border: none;
    padding: 0.15rem 0.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.sd-step:hover:not(.sd-step--disabled) {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
}

.sd-step--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sd-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.65rem;
}

.sd-step--active {
    color: #c7d2fe;
}

.sd-step--active span {
    background: #4f46e5;
    border-color: #6366f1;
    color: #fff;
}

.sd-step--done {
    color: #94a3b8;
}

.sd-step--done span {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
}

.sd-step-line {
    flex: 1;
    min-width: 0.75rem;
    height: 1px;
    background: rgba(148, 163, 184, 0.2);
}

.sd-btn-primary,
.sd-btn-secondary {
    padding: 0.65rem 1.1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.sd-btn-primary {
    background: #4f46e5;
    border: 1px solid #6366f1;
    color: #fff;
}

.sd-btn-primary:hover {
    background: #6366f1;
}

.sd-btn-primary--accent {
    background: linear-gradient(135deg, #059669, #047857);
    border-color: #10b981;
}

.sd-btn-primary--accent:hover {
    background: linear-gradient(135deg, #10b981, #059669);
}

.sd-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: #cbd5e1;
}

.sd-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sd-summary {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.sd-radio-card {
    display: block;
    padding: 1rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.sd-radio-card--active {
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(79, 70, 229, 0.12);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.sd-radio-card__title {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #e2e8f0;
}

.sd-radio-card__hint {
    display: block;
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.sd-box-card {
    background: rgba(15, 23, 42, 0.5);
}

.sd-box-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7.5rem, 9.5rem) minmax(6.5rem, 8.5rem);
    gap: 0.75rem;
    align-items: end;
}

.sd-step6-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.sd-final-status {
    flex: 1 1 12rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 0.65rem;
}

.sd-final-status--ok {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.sd-final-status--partial {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.sd-final-status--error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.sd-ozon-lk-link {
    text-decoration: none;
    white-space: nowrap;
}

.sd-box-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.sd-box-field__label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: #64748b;
    min-height: 0.9rem;
    line-height: 1.2;
}

.sd-box-product,
.sd-box-qty {
    font-size: 0.9rem;
    padding: 0.5rem 0.65rem;
    min-height: 2.5rem;
    border-radius: 0.5rem;
}

.sd-box-field__qty-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sd-box-qty {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.sd-box-field__unit {
    font-size: 0.8rem;
    color: #64748b;
    flex-shrink: 0;
    padding-bottom: 0.15rem;
}

.sd-box-field--stats {
    text-align: right;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #94a3b8;
    padding-bottom: 0.35rem;
}

@media (max-width: 768px) {
    .sd-box-item-row {
        grid-template-columns: 1fr;
    }

    .sd-box-field--stats {
        text-align: left;
        padding-bottom: 0;
    }
}

.sd-wizard-card {
    position: relative;
    z-index: 20;
    overflow: visible;
}

.sd-warehouse-picker {
    position: relative;
    z-index: 1;
}

.sd-warehouse-picker--open {
    z-index: 50;
}

.sd-warehouse-picker__dropdown--portal {
    position: fixed;
    z-index: 9999;
    max-height: min(18rem, 50vh);
    overflow-y: auto;
    display: none;
}

.sd-warehouse-picker__dropdown--portal:not(.hidden) {
    display: block;
}

.sd-warehouse-picker__control {
    position: relative;
}

.sd-warehouse-picker__clear {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 9999px;
    border: none;
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.sd-warehouse-picker__clear:hover {
    background: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}

.sd-warehouse-picker__dropdown {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 0.35rem);
    max-height: 14rem;
    overflow-y: auto;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(10, 15, 28, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.sd-warehouse-picker__option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.85rem;
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-size: 0.8rem;
    cursor: pointer;
}

.sd-warehouse-picker__option:hover,
.sd-warehouse-picker__option--active {
    background: rgba(99, 102, 241, 0.15);
}

.sd-warehouse-picker__option small {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    margin-top: 0.1rem;
}

.sd-warehouse-picker__empty {
    padding: 0.75rem 0.85rem;
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

.sd-request-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem 1.25rem;
    padding: 1rem;
}

.sd-request-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.sd-request-row__body {
    min-width: 0;
}

.sd-request-row__aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    width: 10.25rem;
    min-width: 9.5rem;
}

.sd-request-row__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.32rem;
    width: 100%;
}

@media (max-width: 720px) {
    .sd-request-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .sd-request-row__aside {
        width: 100%;
        min-width: 0;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
}

.sd-request-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.35rem;
    border: none;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.sd-request-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

.sd-request-toggle__chevron {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.2s ease;
    margin-top: -0.15rem;
}

.sd-request-row--open .sd-request-toggle__chevron {
    transform: rotate(45deg);
    margin-top: 0.1rem;
}

.sd-request-details {
    display: none;
    margin-top: 0.35rem;
}

.sd-request-details--empty {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

.sd-request-row--open .sd-request-details {
    display: block;
    max-height: 20rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.sd-request-products {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sd-request-products li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 0.65rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #94a3b8;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sd-request-products li:last-child {
    border-bottom: none;
}

.sd-request-product__name {
    min-width: 0;
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sd-request-row--open .sd-request-product__name {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
    hyphens: auto;
}

.sd-request-product__qty {
    flex-shrink: 0;
    font-weight: 700;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    padding-left: 0.15rem;
}

.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.62rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.15;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    min-height: 1.5rem;
    box-sizing: border-box;
}

.sd-request-row__aside .status-chip,
.ui-action-col .status-chip,
.list-row__aside .status-chip {
    width: 100%;
}

.status-chip--ozon {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.22);
}

.status-chip--pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.35);
}

.status-chip--wb {
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.22);
}

.status-chip--wb-created {
    background: rgba(139, 92, 246, 0.15);
    color: #ddd6fe;
    border-color: rgba(139, 92, 246, 0.28);
}

.status-chip--draft {
    background: rgba(245, 158, 11, 0.1);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.2);
}

/* —— Выравнивание кнопок и статусов в списках —— */
.list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.list-row:last-child {
    border-bottom: none;
}

.list-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.list-row__main {
    min-width: 0;
}

.list-row__aside {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-width: 9.5rem;
    width: 10.25rem;
}

.ui-action-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ui-action-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.32rem;
    width: 100%;
}

.ui-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.ui-action-row > form {
    display: inline-flex;
    margin: 0;
}

.ui-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 1.55rem;
    padding: 0.28rem 0.62rem;
    font-size: 0.625rem;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    border-radius: 9999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s, transform 0.12s;
    text-decoration: none;
    white-space: normal;
    word-break: break-word;
    box-sizing: border-box;
}

.ui-action-btn:active {
    transform: scale(0.98);
}

.ui-action-btn--indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

.ui-action-btn--indigo:hover {
    background: rgba(99, 102, 241, 0.28);
    color: #e0e7ff;
}

.ui-action-btn--solid-indigo {
    background: #4f46e5;
    color: #fff;
    border-color: rgba(99, 102, 241, 0.5);
}

.ui-action-btn--solid-indigo:hover {
    background: #6366f1;
}

.ui-action-btn--sky {
    background: #0284c7;
    color: #fff;
    border-color: rgba(14, 165, 233, 0.45);
}

.ui-action-btn--sky:hover {
    background: #0ea5e9;
}

.ui-action-btn--emerald {
    background: #059669;
    color: #fff;
    border-color: rgba(16, 185, 129, 0.45);
}

.ui-action-btn--emerald:hover {
    background: #10b981;
}

.ui-action-btn--violet {
    background: #7c3aed;
    color: #fff;
    border-color: rgba(139, 92, 246, 0.45);
}

.ui-action-btn--violet:hover {
    background: #8b5cf6;
}

.ui-action-btn--amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.35);
}

.ui-action-btn--amber:hover {
    background: rgba(245, 158, 11, 0.28);
}

.ui-action-btn--danger {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.25);
}

.ui-action-btn--danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
}

.ui-action-btn--ghost {
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

.ui-action-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ui-action-btn--violet-soft {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.3);
}

.ui-action-btn--violet-soft:hover {
    background: rgba(139, 92, 246, 0.28);
}

.assembly-task-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.assembly-task-card:last-child {
    border-bottom: none;
}

.assembly-task-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.assembly-task-card__main {
    min-width: 0;
}

.assembly-task-card__aside {
    width: 10.25rem;
    min-width: 9.5rem;
}

@media (max-width: 720px) {
    .list-row,
    .assembly-task-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .list-row__aside,
    .assembly-task-card__aside {
        width: 100%;
        min-width: 0;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* —— WMS v2: шапка, навигация, карточки —— */
.app-shell {
    min-height: 100vh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(7, 11, 20, 0.82);
    backdrop-filter: blur(20px) saturate(1.2);
}

.app-header__logo {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    border-radius: 0.9rem;
    background: linear-gradient(145deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.15));
    border: 1px solid rgba(129, 140, 248, 0.25);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
}

.app-header__title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #e0e7ff, #c4b5fd 55%, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.app-header__subtitle {
    font-size: 0.65rem;
    color: #64748b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
}

.app-header__user {
    font-size: 0.75rem;
    font-weight: 600;
    color: #c7d2fe;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.22);
}

.app-header__logout {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fca5a5;
    padding: 0.45rem 0.9rem;
    border-radius: 9999px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    transition: background 0.15s var(--ease-out);
}

.app-header__logout:hover {
    background: rgba(239, 68, 68, 0.22);
}

.main-nav-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 1.1rem;
    background: rgba(10, 15, 28, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    border-radius: 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s var(--ease-out), box-shadow 0.15s, background 0.15s, color 0.15s;
    border: none;
}

.nav-tab:active {
    transform: scale(0.98);
}

.nav-tab__icon {
    font-size: 1rem;
    line-height: 1;
}

.nav-tab__label {
    white-space: nowrap;
}

@media (max-width: 520px) {
    .nav-tab__label { font-size: 0.72rem; }
    .nav-tab { padding: 0.55rem 0.5rem; }
}

.tab-content {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out);
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.tab-content.tab-content--visible,
.tab-content.block.tab-content--visible {
    opacity: 1;
    transform: translateY(0);
}

.tab-content.hidden {
    display: none !important;
    content-visibility: hidden;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

@media (hover: hover) {
    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    }
}

.stat-card__glow {
    position: absolute;
    inset: -40% auto auto -20%;
    width: 70%;
    height: 120%;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.35;
    pointer-events: none;
}

.stat-card--emerald .stat-card__glow { background: #10b981; }
.stat-card--blue .stat-card__glow { background: #3b82f6; }
.stat-card--amber .stat-card__glow { background: #f59e0b; }
.stat-card--violet .stat-card__glow { background: #8b5cf6; }

.stat-card--emerald { border-left: 3px solid #34d399; }
.stat-card--blue { border-left: 3px solid #60a5fa; }
.stat-card--amber { border-left: 3px solid #fbbf24; }
.stat-card--violet { border-left: 3px solid #a78bfa; }

.stat-card__zone {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.stat-card__desc {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 0.2rem;
    line-height: 1.35;
}

.stat-card__qty {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-top: 0.65rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.stat-card__unit {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
}

.stat-card__sku {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.35rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.backup-list {
    max-height: 14rem;
    overflow-y: auto;
}

.backup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.backup-item__title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
}

.backup-item__sub {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.backup-item__dl {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    color: #a5b4fc;
    padding: 0.4rem 0.65rem;
    border-radius: 0.55rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    transition: background 0.15s;
}

.backup-item__dl:hover {
    background: rgba(99, 102, 241, 0.28);
    color: #fff;
}

/* Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.5) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.45);
    border-radius: 9999px;
}

/* —— Задания на сборку —— */
.assembly-filter-btn {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.assembly-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.assembly-filter-btn--active {
    background: rgba(99, 102, 241, 0.22);
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.45);
}

.assembly-group--rose { border-top: 3px solid rgba(244, 63, 94, 0.55); }
.assembly-group--emerald { border-top: 3px solid rgba(16, 185, 129, 0.55); }
.assembly-group--sky { border-top: 3px solid rgba(14, 165, 233, 0.55); }
.assembly-group--indigo { border-top: 3px solid rgba(99, 102, 241, 0.45); }

.assembly-create-details > summary::-webkit-details-marker { display: none; }

/* —— Форма заданий —— */
.asm-field-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.45rem;
}

.asm-field-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    font-size: 0.92rem;
    color: #f1f5f9;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.asm-field-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.asm-form-step {
    padding-bottom: 0.25rem;
}

.asm-lk-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.asm-lk-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.85rem 0.5rem;
    border-radius: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.15);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    text-align: center;
}

.asm-lk-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.asm-lk-card--active {
    border-color: rgba(99, 102, 241, 0.55);
    background: rgba(99, 102, 241, 0.12);
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.asm-lk-card__name {
    font-size: 0.9rem;
    font-weight: 800;
    color: #e2e8f0;
}

.asm-lk-card__hint {
    font-size: 0.65rem;
    color: #64748b;
}

.asm-product-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 4.5rem 2.25rem;
    gap: 0.65rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s, background 0.2s;
}

.asm-product-line--duplicate {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.07);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.12);
}

.asm-product-line--duplicate .asm-line-selected__name {
    color: #fca5a5;
}

.asm-product-line__main {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 2.75rem;
}

.asm-line-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 30;
    max-height: 11rem;
    overflow-y: auto;
    border-radius: 0.75rem;
    background: #0f172a;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.asm-line-opt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: #cbd5e1;
    background: transparent;
    border: none;
    cursor: pointer;
}

.asm-line-opt__name {
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.25;
}

.asm-line-opt__sku {
    font-size: 0.68rem;
    color: #64748b;
    line-height: 1.2;
}

.asm-line-opt:hover {
    background: rgba(99, 102, 241, 0.15);
}

.asm-line-opt:hover .asm-line-opt__name {
    color: #fff;
}

.asm-line-selected {
    padding: 0.35rem 0.5rem;
    border-radius: 0.55rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.asm-line-selected__name {
    display: block;
    font-weight: 700;
    color: #f1f5f9;
    font-size: 0.82rem;
    line-height: 1.3;
    word-break: break-word;
}

.asm-line-selected__sku {
    display: block;
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 0.12rem;
    line-height: 1.2;
}

.asm-line-change {
    margin-top: 0.35rem;
    font-size: 0.62rem;
    font-weight: 600;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.asm-line-change:hover {
    color: #cbd5e1;
}

.asm-line-qty {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.2rem;
    width: 100%;
    font-size: 0.62rem;
    color: #64748b;
    font-weight: 700;
    align-self: center;
    text-align: center;
}

.asm-line-qty > span {
    display: block;
    width: 100%;
    text-align: center;
    line-height: 1;
}

.asm-line-qty .asm-field-input {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 0.5rem 0.25rem;
    -moz-appearance: textfield;
}

.asm-line-qty .asm-field-input::-webkit-outer-spin-button,
.asm-line-qty .asm-field-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.asm-line-remove {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    font-size: 0.85rem;
    cursor: pointer;
    align-self: center;
    flex-shrink: 0;
}

.asm-photo-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.asm-photo-preview__item {
    position: relative;
    border-radius: 0.65rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    aspect-ratio: 1;
}

.asm-photo-preview__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.asm-photo-preview__rm {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 9999px;
    border: none;
    background: rgba(0, 0, 0, 0.65);
    color: #fecaca;
    font-size: 0.7rem;
    cursor: pointer;
    line-height: 1;
}

.asm-photo-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.25rem 1rem;
    border-radius: 0.85rem;
    border: 2px dashed rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: center;
}

.asm-photo-drop:hover {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(99, 102, 241, 0.06);
}

.asm-photo-drop__icon {
    font-size: 1.5rem;
}

.asm-photo-drop__text {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
}

.asm-sync-table-wrap {
    overflow-x: auto;
}

.asm-sync-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.asm-sync-table th {
    text-align: left;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.asm-sync-table__actions {
    width: 3.25rem;
    white-space: nowrap;
}

.asm-sync-print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 2.25rem;
    padding: 0.35rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.asm-sync-print-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.18);
}

.asm-assembled-row__controls .asm-sync-print-btn {
    min-width: 4.5rem;
}

.asm-sync-table td {
    padding: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.asm-sync-row--done {
    background: rgba(16, 185, 129, 0.06);
}

.asm-sync-row--partial {
    background: rgba(245, 158, 11, 0.05);
}

.asm-assembled-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.asm-assembled-row__controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
}

.asm-qty-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.asm-qty-input {
    width: 3.5rem;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.6rem;
}

.asm-qty-input--saved {
    border-color: rgba(16, 185, 129, 0.55) !important;
}

.asm-photo-thumb img {
    display: block;
}

/* Зелёная кнопка «Готово к поставке» — внутри карточки грузомест */
.asm-ready-banner-inner {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.asm-ready-banner-inner form {
    display: block;
    width: 100%;
}

.asm-ready-banner {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.25rem;
    border: none;
    border-radius: 0.85rem;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    cursor: pointer;
    text-align: center;
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.25);
    transition: opacity 0.15s, transform 0.15s;
}

.asm-ready-banner:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.asm-ready-banner--done {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.85rem;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.asm-matrix-qty--saved {
    border-color: rgba(16, 185, 129, 0.55) !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.asm-pack-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.asm-pack-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.asm-pack-chip--ok {
    border-color: rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

.asm-pack-chip--warn {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.08);
    color: #fcd34d;
}

.asm-pack-chip__name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asm-boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}

.asm-box-card {
    border-radius: 1rem;
    border: 1px solid rgba(129, 140, 248, 0.2);
    background: rgba(15, 23, 42, 0.55);
    padding: 0.85rem;
}

.asm-box-card__head {
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.asm-box-card__title {
    font-weight: 800;
    font-size: 0.9rem;
    color: #c7d2fe;
}

.asm-box-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.asm-box-item:last-child {
    border-bottom: none;
}

.asm-box-item__info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.asm-box-item__qty-form {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.asm-box-qty {
    width: 3.25rem;
    text-align: center;
    padding: 0.35rem;
    border-radius: 0.5rem;
}

.asm-box-item__del {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    border: 1px solid rgba(248, 113, 113, 0.25);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.asm-box-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.asm-box-add-form__select {
    flex: 1 1 10rem;
    min-width: 0;
}

.asm-box-add-form__qty {
    width: 4rem;
    text-align: center;
}

.asm-box-empty {
    padding: 1.25rem;
    border-radius: 0.85rem;
    border: 1px dashed rgba(148, 163, 184, 0.25);
    text-align: center;
}

.asm-cargo-groups {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 720px) {
    .asm-cargo-groups {
        grid-template-columns: 1fr;
    }
}

.asm-cargo-group {
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.asm-cargo-group__label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.45rem;
}

.asm-cargo-group__label--box {
    color: #a5b4fc;
}

.asm-cargo-group__label--pallet {
    color: #fcd34d;
}

.asm-cargo-group__empty {
    font-size: 0.72rem;
    color: #64748b;
    font-style: italic;
}

.asm-matrix-group--box {
    background: rgba(99, 102, 241, 0.12) !important;
    color: #c7d2fe !important;
    border-bottom: 1px solid rgba(129, 140, 248, 0.2);
}

.asm-matrix-group--pallet {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #fcd34d !important;
    border-bottom: 1px solid rgba(245, 158, 11, 0.22);
}

.asm-matrix-subhead--box {
    color: #a5b4fc !important;
    font-size: 0.62rem !important;
}

.asm-matrix-subhead--pallet {
    color: #fcd34d !important;
    font-size: 0.62rem !important;
    background: rgba(245, 158, 11, 0.05) !important;
}

.asm-matrix-cell--box {
    background: rgba(99, 102, 241, 0.04);
}

.asm-matrix-cell--pallet {
    background: rgba(245, 158, 11, 0.04);
}

.asm-matrix-qty--box:focus {
    border-color: rgba(129, 140, 248, 0.5);
}

.asm-matrix-qty--pallet:focus {
    border-color: rgba(245, 158, 11, 0.5);
}

.asm-box-count-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #c7d2fe;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.25);
}

.asm-box-count-badge--pallet {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

.asm-box-tab--pallet {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.28);
}

.asm-pack-matrix__th--pallet {
    color: #fcd34d !important;
    background: rgba(245, 158, 11, 0.08) !important;
}

.asm-box-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.asm-box-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.22);
}

.asm-box-tab__del {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.asm-box-tab__del button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    font-size: 0.85rem;
    line-height: 1;
    font-weight: 800;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.18);
    cursor: pointer;
}

.asm-box-tab__del button:hover {
    background: rgba(239, 68, 68, 0.32);
    color: #fff;
}

.asm-matrix-head {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.asm-matrix-head__del {
    display: inline-flex;
    margin: 0;
    padding: 0;
}

.asm-matrix-head__del button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    padding: 0;
    border: none;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 800;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.2);
    cursor: pointer;
}

.asm-matrix-head__del button:hover {
    background: rgba(239, 68, 68, 0.38);
    color: #fff;
}

.asm-pack-matrix-wrap {
    overflow-x: auto;
    border-radius: 0.85rem;
    border: 1px solid rgba(129, 140, 248, 0.2);
}

.asm-pack-matrix {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.asm-pack-matrix th {
    padding: 0.55rem 0.45rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.asm-pack-matrix td {
    padding: 0.5rem 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.asm-pack-matrix tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.asm-matrix-cell {
    display: inline-block;
    margin: 0 auto;
}

.asm-matrix-qty {
    width: 3.25rem;
    text-align: center;
    padding: 0.35rem 0.25rem;
    border-radius: 0.5rem;
}

.asm-matrix-qty:not([value="0"]):not([value=""]) {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.08);
}

.asm-box-pick-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(148, 163, 184, 0.2);
}

.asm-box-pick-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.asm-box-pick-row__info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 10rem;
}

.asm-box-pick-row__qty {
    width: 3.5rem;
    text-align: center;
    padding: 0.35rem;
}

@media (max-width: 640px) {
    .asm-lk-grid {
        grid-template-columns: 1fr;
    }

    .asm-product-line {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
    }

    .asm-product-line__main {
        grid-column: 1 / -1;
    }

    .asm-line-qty {
        grid-column: 1;
        width: 4.5rem;
        justify-self: start;
    }

    .asm-line-remove {
        justify-self: end;
    }
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
}
