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

:root {
    --bg-color: #f5f5f7; /* Светло-серый фон Apple */
    --card-bg: #ffffff;
    --border-color: #e5e5e7; /* Очень тонкие рамки */
    --border-focus: #1d1d1f;
    --primary-color: #000000; /* Черный акцент Apple */
    --primary-hover: #2d2d2f;
    --text-color: #1d1d1f; /* Почти черный текст Apple */
    --text-muted: #86868b; /* Серый текст Apple */
    --error-color: #ff3b30; /* Красный Apple */
    --success-color: #34c759; /* Зеленый Apple */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Цвета маркетплейсов в пастельных тонах */
    --wb-color: #8a3ffc;
    --ozon-color: #0f62fe;
    --yandex-color: #f1c40f;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    font-family: var(--font-family);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Фон без лишнего шума */
.bg-animations {
    display: none; /* Отключаем анимированные круги для минимализма */
}

/* ==========================================================================
   ФОРМА ВХОДА (LOGIN SCREEN) - APPLE STYLE
   ========================================================================== */

.login-container {
    width: 100%;
    max-width: 380px;
    padding: 40px 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.03);
    z-index: 10;
    position: relative;
    text-align: left;
}

.brand-section {
    text-align: center;
    margin-bottom: 35px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: #f5f5f7;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.brand-logo svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.1px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.brand-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

/* Элементы формы */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: -0.1px;
}

.input-field {
    width: 100%;
    padding: 12px 14px 12px 38px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.input-field:focus {
    border-color: var(--border-focus);
}

.input-icon {
    position: absolute;
    top: 36px;
    left: 12px;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.input-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    transition: fill 0.2s;
}

.input-field:focus + .input-icon svg {
    fill: var(--text-color);
}

/* Кнопки */
.submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.submit-btn:hover {
    background: var(--primary-hover);
}

.submit-btn:disabled {
    background: #e5e5e7;
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Тост (уведомления) */
.toast {
    position: absolute;
    bottom: -55px;
    left: 0;
    right: 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    background: #fff5f5;
    border: 1px solid #ffe5e5;
    color: var(--error-color);
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: #f4fbf7;
    border: 1px solid #e7f7ed;
    color: var(--success-color);
}


/* ==========================================================================
   ИНТЕРФЕЙС ДАШБОРДА (DESKTOP) - APPLE & SOTD MINIMAL
   ========================================================================== */

.dashboard-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr;
    width: 100vw;
    height: 100vh;
    z-index: 5;
    position: relative;
    background: #ffffff;
}

/* Боковое меню (Sidebar) - очень чистое и белое */
.sidebar {
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.sidebar-logo svg {
    width: 28px;
    height: 28px;
    fill: var(--text-color);
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.1px;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item.active a, .nav-item a:hover {
    color: var(--text-color);
    background: #f5f5f7;
}

.nav-item.active a {
    font-weight: 600;
    background: #f5f5f7;
    color: var(--text-color);
}

.nav-item a svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: fill 0.2s;
}

.nav-item.active a svg, .nav-item a:hover svg {
    fill: var(--text-color);
}

.sidebar-profile {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-bottom: 15px;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.profile-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 2px;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: #f5f5f7;
    border-color: var(--text-color);
}

.btn-logout svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Основная область (Main Content) */
.main-content {
    background: #f5f5f7; /* Фон Apple */
    padding: 40px 50px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
}

.page-title h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: normal;
}

.page-title p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Статистика (миниатюрные пилюли) */
.stats-bar {
    display: flex;
    gap: 12px;
}

.stat-pill {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

/* Панель фильтров */
.filter-bar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: normal;
    margin-right: 4px;
}

.filter-select {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border 0.2s;
}

.filter-select:focus {
    border-color: var(--text-color);
}

.search-input-wrapper {
    position: relative;
    flex-grow: 1;
}

.search-input-wrapper input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    background: #f5f5f7;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.search-input-wrapper input:focus {
    background: #ffffff;
    border-color: var(--text-color);
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.search-icon svg {
    width: 14px;
    height: 14px;
    fill: var(--text-muted);
}

/* ТАБЛИЦА В СТИЛЕ PAPER/LIST (Awwwards вайб) */
.table-container {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: visible; /* Для зума картинок */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}

.crm-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.crm-table th {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 14px 18px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crm-table td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.order-row {
    background: #ffffff;
}

.order-row:hover {
    background: #fafafa;
}

/* Эстетичный минималистичный зум картинок */
.table-img-container {
    position: relative;
    width: 34px;
    height: 34px;
    z-index: 5;
}

.table-img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: zoom-in;
}

.table-img-container:hover .table-img {
    transform: scale(4.5) translate(15px, 15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--text-color);
    z-index: 999;
    position: relative;
}

/* Тонкие рамки маркетплейсов */
.badge-mp {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    background: #f5f5f7;
    color: var(--text-color);
}

.badge-mp.wb {
    border-color: rgba(138, 63, 252, 0.3);
    color: var(--wb-color);
    background: rgba(138, 63, 252, 0.03);
}

.badge-mp.ozon {
    border-color: rgba(15, 98, 254, 0.3);
    color: var(--ozon-color);
    background: rgba(15, 98, 254, 0.03);
}

.badge-mp.yandex {
    border-color: rgba(243, 156, 18, 0.3);
    color: #e67e22;
    background: rgba(243, 156, 18, 0.03);
}

/* Статусы сборки */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-pill.awaiting {
    color: #e67e22;
}
.status-pill.awaiting .status-dot {
    background-color: #e67e22;
}

.status-pill.packed {
    color: var(--text-muted);
}
.status-pill.packed .status-dot {
    background-color: var(--text-muted);
}

/* Кнопка "Собрано" в стиле Apple (черная, строгая) */
.btn-action-pack {
    background: var(--primary-color);
    border: none;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-action-pack:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.btn-action-pack svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* Иконки документов */
.btn-doc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    margin-right: 4px;
}

.btn-doc:hover {
    border-color: var(--text-color);
    color: var(--text-color);
    background: #f5f5f7;
}

.btn-doc svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ==========================================================================
   ЭФФЕКТ ВЫПОЛНЕННОГО ЗАКАЗА (ВАЙБ ВЫЧЕРКНУТОГО ЛИСТА СБОРКИ)
   ========================================================================== */

.order-row.status-packed {
    opacity: 0.35;
    background: #fafafa !important;
}

.order-row.status-packed td {
    color: var(--text-muted);
    /* Эффект вычеркивания для текстовых колонок */
    text-decoration: line-through;
    text-decoration-color: rgba(29, 29, 31, 0.2);
}

/* Исключения из вычеркивания */
.order-row.status-packed td:first-child, /* Фото */
.order-row.status-packed td:nth-child(2), /* Маркетплейс */
.order-row.status-packed td:nth-child(8), /* Документы */
.order-row.status-packed td:last-child {  /* Сборка */
    text-decoration: none;
}

.order-row.status-packed .table-img {
    filter: grayscale(100%) contrast(80%);
    cursor: default;
}

.order-row.status-packed .table-img-container:hover .table-img {
    transform: none; /* Отключаем зум для собранных */
    box-shadow: none;
}

.order-row.status-packed .badge-mp {
    filter: grayscale(100%);
    opacity: 0.5;
}

.order-row.status-packed .btn-doc {
    opacity: 0.5;
}

/* Spinner */
.spinner {
    width: 12px;
    height: 12px;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

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

/* Пустая таблица */
.empty-placeholder {
    padding: 60px !important;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================================
   ДОСТАВКИ WILDBERRIES (WB DELIVERIES) - APPLE STYLE
   ========================================================================== */

.wb-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.wb-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
}

.wb-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
    border-color: var(--border-focus);
}

.wb-card-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wb-card-img-container {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.wb-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
    min-width: 0;
}

.wb-card-art {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
}

.wb-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-card-status {
    align-self: flex-start;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Статусы */
.wb-card-status.ready {
    background: #e6f4ea;
    color: #137333;
    border: 1px solid rgba(19, 115, 51, 0.2);
}

.wb-card-status.transit {
    background: #fef7e0;
    color: #b06000;
    border: 1px solid rgba(176, 96, 0, 0.2);
}

.wb-card-status.delayed {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid rgba(197, 34, 31, 0.2);
}

.wb-card-status.other {
    background: #f5f5f7;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.wb-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 12px;
    color: var(--text-color);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.wb-card-detail {
    display: flex;
    justify-content: space-between;
}

.wb-card-label {
    color: var(--text-muted);
}

.wb-card-value {
    font-weight: 500;
    text-align: right;
    max-width: 70%;
    word-break: break-all;
}

.wb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: auto;
}

.wb-card-code-container {
    display: flex;
    flex-direction: column;
}

.wb-card-code-title {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.wb-card-code {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-color);
    font-family: monospace;
    line-height: 1.1;
}

.wb-card-qr-container {
    position: relative;
    cursor: zoom-in;
}

.wb-card-qr-img {
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px;
    background: #ffffff;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Эстетичный минималистичный зум QR-кода */
.wb-card-qr-container:hover .wb-card-qr-img {
    transform: scale(4.5) translate(-35px, -35px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--text-color);
    z-index: 999;
    position: relative;
}

/* ==========================================================================
   BENTO-СПИСОК СБОРКИ ЗАКАЗОВ (ВАЙБ ОРИГИНАЛЬНЫХ ЛИСТОВ СБОРКИ)
   ========================================================================== */

.orders-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.bento-row {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 24px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.01);
    position: relative;
}

.bento-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
    border-color: var(--border-focus);
}

/* Колонки в Bento-ряду */
.bento-col-order {
    width: 150px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    padding-right: 16px;
}

.bento-order-num-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.bento-order-num {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: normal;
}

.bento-col-photo {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    position: relative;
}

.bento-photo-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: zoom-in;
}

.bento-col-photo:hover .bento-photo-img {
    transform: scale(4.5) translate(15px, 15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--text-color);
    z-index: 999;
    position: relative;
}

.bento-col-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-right: 1px solid var(--border-color);
    padding-right: 16px;
}

.bento-prod-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bento-prod-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bento-prod-art {
    font-size: 12px;
    color: var(--text-muted);
}

.bento-prod-city {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: #f5f5f7;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.bento-prod-details-btn {
    font-size: 12px;
    font-weight: 600;
    color: #0066cc;
    cursor: pointer;
    transition: opacity 0.2s;
}

.bento-prod-details-btn:hover {
    opacity: 0.8;
}

.bento-col-barcode {
    width: 100px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    padding-right: 16px;
}

/* Наклейка баркода мини */
.sticker-label-mini {
    background: #ffffff;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 85px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.barcode-mini-lines {
    height: 12px;
    width: 100%;
    background: repeating-linear-gradient(
        90deg,
        #1d1d1f,
        #1d1d1f 1px,
        transparent 1px,
        transparent 2.5px
    );
    opacity: 0.85;
}

.barcode-mini-text {
    font-family: monospace;
    font-size: 9px;
    font-weight: 600;
    margin-top: 3px;
    color: var(--text-color);
}

.bento-col-qty {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.bento-qty-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.bento-qty-num {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-color);
}

.bento-qty-num.bulk {
    font-size: 14px;
    font-weight: 700;
    color: #0066cc;
    background: #e5f0ff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-col-docs {
    width: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bento-col-action {
    width: 110px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* ==========================================================================
   ЭФФЕКТ ВЫПОЛНЕННОГО ЗАКАЗА ДЛЯ BENTO-РЯДА
   ========================================================================== */

.bento-row.status-packed {
    opacity: 0.35;
    background: #fafafa !important;
}

.bento-row.status-packed .bento-prod-name,
.bento-row.status-packed .bento-order-num {
    text-decoration: line-through;
    text-decoration-color: rgba(29, 29, 31, 0.3);
}

.bento-row.status-packed .bento-photo-img {
    filter: grayscale(100%) contrast(80%);
    cursor: default;
}

.bento-row.status-packed .bento-col-photo:hover .bento-photo-img {
    transform: none; /* Отключаем зум для собранных */
    box-shadow: none;
}

.bento-row.status-packed .badge-mp {
    filter: grayscale(100%);
    opacity: 0.5;
}

.bento-row.status-packed .btn-doc {
    opacity: 0.5;
}

/* ==========================================================================
   МОДАЛЬНОЕ ОКНО ДЕТАЛЕЙ ЗАКАЗА (BENTO-STYLE)
   ========================================================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    max-width: 680px;
    width: 90%;
    padding: 32px;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    from { transform: scale(0.95) translateY(10px); }
    to { transform: scale(1) translateY(0); }
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f5f5f7;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: #e5e5e7;
}

.modal-close-btn svg {
    width: 16px;
    height: 16px;
    fill: var(--text-color);
}

.modal-detail-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    margin-top: 10px;
}

.modal-detail-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-detail-img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.modal-detail-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modal-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.modal-city-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    background: #f5f5f7;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.modal-prod-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 20px;
}

.modal-info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.modal-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 6px;
}

.modal-info-label {
    color: var(--text-muted);
}

.modal-info-value {
    font-weight: 600;
    color: var(--text-color);
}

.modal-sticker-section {
    background: #f5f5f7;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.modal-sticker-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-sticker-label {
    background: #ffffff;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    padding: 12px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.modal-barcode-lines {
    height: 24px;
    width: 140px;
    background: repeating-linear-gradient(
        90deg,
        #1d1d1f,
        #1d1d1f 2px,
        transparent 2px,
        transparent 4px
    );
}

.modal-barcode-text {
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    margin-top: 8px;
    color: var(--text-color);
}

/* ==========================================================================
   АДАПТИВНОСТЬ (RESPONSIVENESS)
   ========================================================================== */

@media (max-width: 992px) {
    .bento-row {
        flex-wrap: wrap;
        gap: 16px;
        padding: 16px;
    }
    .bento-col-order {
        width: auto;
        border-right: none;
        padding-right: 0;
    }
    .bento-col-info {
        border-right: none;
        padding-right: 0;
    }
    .bento-col-barcode {
        border-right: none;
        padding-right: 0;
    }
    .bento-col-qty {
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none; /* Простая заглушка для мобилок */
    }
    .main-content {
        padding: 20px;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 576px) {
    .bento-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .bento-col-order, .bento-col-photo, .bento-col-info, .bento-col-barcode, .bento-col-qty, .bento-col-docs, .bento-col-action {
        width: 100%;
        border-right: none;
        padding-right: 0;
        justify-content: flex-start;
        align-items: flex-start;
    }
    .bento-col-photo {
        width: 50px;
        height: 50px;
    }
    .bento-col-action {
        justify-content: flex-start;
        margin-top: 8px;
        border-top: 1px solid var(--border-color);
        padding-top: 12px;
    }
    .sticker-label-mini {
        min-width: 100px;
    }
    .modal-card {
        padding: 24px;
        width: 95%;
    }
    .modal-detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .modal-detail-img {
        width: 150px;
        height: 150px;
    }
}

/* ==========================================================================
   СВЯЗАННЫЕ ЗАКАЗЫ И БЕЙДЖИ КОЛИЧЕСТВА (APPLE/SOTD STYLE)
   ========================================================================== */

.wb-card-img-container {
    position: relative;
}

.wb-card-qty-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #0066cc;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 10;
}

.linked-orders-section {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    width: 100%;
}

.linked-orders-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.linked-orders-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.linked-order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f7;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12px;
}

.linked-order-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.linked-order-id {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-color);
}

.linked-order-status {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid var(--border-color);
}
