/* Inventory Dashboard — Premium Minimal Dark */

:root {
    --bg: #000;
    --surface: rgba(255,255,255,0.02);
    --surface-hover: rgba(255,255,255,0.04);
    --surface-subtle: rgba(255,255,255,0.03);
    --text: rgba(255,255,255,0.92);
    --text-soft: rgba(255,255,255,0.50);
    --text-muted: rgba(255,255,255,0.25);
    --border: rgba(255,255,255,0.04);
    --border-subtle: rgba(255,255,255,0.06);

    --accent: #22c55e;
    --accent-soft: rgba(34,197,94,0.08);
    --accent-medium: rgba(34,197,94,0.15);
    --warning: #f59e0b;
    --warning-soft: rgba(245,158,11,0.08);
    --danger: #ef4444;
    --danger-soft: rgba(239,68,68,0.06);
    --success: #22c55e;
    --success-soft: rgba(34,197,94,0.08);
    --info: rgba(255,255,255,0.50);

    --radius: 16px;
    --radius-sm: 10px;
    --font-body: 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', ui-monospace, monospace;
}

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

body {
    min-height: 100vh;
    background: #000;
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

.app {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 32px;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

/* ── Header ── */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 60px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-stack {
    display: grid;
    gap: 2px;
}

.brand-kicker {
    display: none;
}

.logo {
    color: var(--text);
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 300;
    letter-spacing: -0.01em;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 0 10px;
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(34,197,94,0.06);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.update-time {
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-soft);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.02em;
}

button, .btn, .btn-sm, .btn-refresh {
    font: inherit;
}

.btn-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-soft);
    background: var(--surface);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all 0.15s;
}

.btn-refresh:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: rgba(255,255,255,0.10);
}

.btn-refresh.spinning svg { animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.main {
    display: flex;
    flex-direction: column;
    gap: 80px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Overview Cards ── */
.overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.card {
    min-width: 0;
    border: none;
    border-radius: var(--radius);
    background: var(--surface);
    position: relative;
    overflow: hidden;
    transition: background 0.2s;
    width: 100%;
    max-width: 100%;
}

.card:hover {
    background: var(--surface-hover);
}

.card::before {
    display: none;
}

.card-stat {
    min-height: 100px;
    padding: 20px;
    position: relative;
}

.card-stat .stat-label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.card-stat .stat-value {
    margin-top: 12px;
    color: var(--text);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1;
}

.card-stat .stat-value.highlight {
    color: var(--accent);
}

.card-stat .stat-unit {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 400;
}

.card-warning {
    background: var(--danger-soft);
}
.card-warning::before {
    display: none;
}

/* ── Section Headers ── */
.section {
    margin: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.section-title::before {
    display: none;
}

.icon-delivery, .icon-warehouse, .icon-warning {
    display: none;
}

.section-kicker {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

/* ── Delivery Stats ── */
.delivery-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 400;
    transition: background 0.15s;
}

.stat-item:hover {
    background: var(--surface-hover);
}

.stat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stat-dot.pending { background: var(--warning); }
.stat-dot.allocated { background: var(--info); }
.stat-dot.fulfilled { background: var(--success); }
.stat-dot.missing { background: var(--danger); }

/* ── Table ── */
.table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: fixed;
}

.table th {
    height: 40px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    text-align: left;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-soft);
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column widths for delivery table */
.table th:nth-child(1), .table td:nth-child(1) { width: 18%; }
.table th:nth-child(2), .table td:nth-child(2) { width: 10%; }
.table th:nth-child(3), .table td:nth-child(3) { width: 22%; }
.table th:nth-child(4), .table td:nth-child(4) { width: 8%; text-align: right; }
.table th:nth-child(5), .table td:nth-child(5) { width: 10%; }
.table th:nth-child(6), .table td:nth-child(6) { width: 14%; }
.table th:nth-child(7), .table td:nth-child(7) { width: 10%; text-align: center; }

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-hover); }

.row-warning { background: rgba(245,158,11,0.04); }
.row-missing { background: var(--danger-soft); }
.row-done { background: var(--success-soft); }

/* ── Delivery Scroll Container ── */
.delivery-scroll > div {
    max-height: 50vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

.delivery-scroll > div::-webkit-scrollbar {
    width: 4px;
}

.delivery-scroll > div::-webkit-scrollbar-track {
    background: transparent;
}

.delivery-scroll > div::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
}

.delivery-scroll > div::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.15);
}

/* Sticky header for delivery table */
.delivery-scroll > div table thead th {
    position: sticky;
    top: 0;
    background: rgba(0,0,0,0.95);
    z-index: 10;
    border-bottom: 1px solid var(--border-subtle);
    backdrop-filter: blur(8px);
}

/* ── Tags ── */
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-soft);
    font-weight: 500;
    white-space: nowrap;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.tag-in, .tag-fulfilled, .tag-shipped {
    color: var(--success);
    background: var(--success-soft);
}

.tag-out, .tag-missing, .tag-not_found {
    color: var(--danger);
    background: var(--danger-soft);
}

.tag-transfer {
    color: var(--text-soft);
    background: var(--surface);
}

.tag-picking {
    color: var(--info);
    background: var(--surface);
}

.tag-adjust {
    color: var(--text-soft);
    background: var(--surface);
}

.tag-pending, .tag-allocated, .tag-partial, .tag-partial_missing {
    color: var(--warning);
    background: var(--warning-soft);
}

.tag-cancelled {
    color: var(--text-muted);
    background: var(--surface);
}

/* ── Warehouse ── */
.warehouse-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
}

.legend-box {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    background: var(--surface);
}

.legend-box.has-stock { background: var(--accent-soft); }
.legend-box.empty { background: var(--surface); border: 1px dashed rgba(255,255,255,0.06); }
.legend-box.scrap { background: var(--danger-soft); }

.shelves-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

/* ── Shelf Cards ── */
.shelf-card-vw {
    min-width: 0;
    max-width: 100%;
    border-radius: var(--radius);
    background: var(--surface);
    position: relative;
    overflow: hidden;
    container-type: inline-size;
    container-name: shelf;
}

.shelf-card-vw::before,
.shelf-card-vw::after {
    display: none;
}

.shelf-card-vw-header {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.shelf-code-large {
    display: grid;
    place-items: center;
    width: 48px;
    height: 42px;
    border-radius: var(--radius-sm);
    color: var(--accent);
    background: var(--accent-soft);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
}

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

.shelf-stats {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
}

.shelf-body-vw {
    position: relative;
}

.shelf-levels-vw {
    display: grid;
    gap: 0;
    padding: 8px 12px 12px;
    overflow-x: auto;
    scrollbar-width: none;
}
.shelf-levels-vw::-webkit-scrollbar { display: none; }

.level-row-vw {
    display: flex;
    align-items: center;
    min-height: 52px;
    border-bottom: 1px solid var(--border);
}

.level-row-vw:last-child { border-bottom: 0; }

.level-label-vw {
    flex: 0 0 34px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
}

.level-boxes-vw {
    display: flex;
    flex: 1;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: wrap;
}

.level-boxes-vw::-webkit-scrollbar { display: none; }

.level-empty-vw {
    flex: 1;
    color: var(--text-muted);
    text-align: center;
}

.box-square {
    flex: 0 0 44px;
    width: 44px;
    height: 40px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    border: 1px solid rgba(34,197,94,0.12);
    border-radius: 8px;
    color: var(--accent);
    background: rgba(34,197,94,0.08);
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
    overflow: hidden;
}

.box-square::before {
    display: none;
}

.box-square:hover {
    border-color: rgba(34,197,94,0.25);
    background: rgba(34,197,94,0.12);
}

.box-square.box-empty {
    cursor: default;
    border-color: rgba(255,255,255,0.04);
    border-style: dashed;
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
}

.box-square.box-empty::before { display: none; }

.box-square.box-scrap {
    border-color: rgba(239,68,68,0.15);
    color: var(--danger);
    background: var(--danger-soft);
}

.box-square.box-scrap::before { display: none; }

.box-square.box-active {
    outline: 1.5px solid var(--accent);
    outline-offset: 2px;
}

.box-code-vw {
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 400;
}

.box-qty-vw {
    font-size: 10px;
    font-weight: 600;
}

/* ── Detail Panel ── */
.box-detail-panel {
    position: absolute;
    z-index: 100;
    width: 360px;
    max-width: min(360px, calc(100vw - 32px));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    background: rgba(8,8,12,0.96);
    backdrop-filter: blur(16px);
}

.box-detail-panel::before {
    display: none;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.panel-close, .modal-close {
    display: grid;
    place-items: center;
    min-width: 32px;
    min-height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.15s;
    position: relative;
    z-index: 10;
}

.panel-close:hover, .modal-close:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.panel-body {
    max-height: 330px;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
}

.box-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    margin-bottom: 8px;
    transition: background 0.15s;
}

.box-item:hover {
    background: var(--surface-hover);
}

.box-item:last-child { margin-bottom: 0; }
.box-item.item-zero { opacity: 0.4; }

.item-main {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
}

.item-sku {
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
}

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

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--text-muted);
    font-size: 12px;
}

.item-qty {
    color: var(--accent);
    font-weight: 600;
}

.item-status {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface);
    font-size: 10px;
    font-weight: 500;
}

.item-extra {
    display: grid;
    gap: 3px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.panel-empty, .empty-state {
    padding: 32px;
    color: var(--text-muted);
    text-align: center;
    font-size: 12px;
    font-weight: 400;
}

/* ── Loading ── */
.loading-overlay {
    display: grid;
    place-items: center;
    min-height: 300px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--text-soft);
    border-radius: 50%;
    animation: spin 900ms linear infinite;
}

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
}

.modal {
    width: min(980px, 100%);
    max-height: 86vh;
    overflow-y: auto;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    background: #0a0a0e;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.06) transparent;
}

.modal::before {
    display: none;
}

.modal-wide { width: min(1120px, 100%); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 24px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    margin-bottom: 12px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.7;
}

.detail-row {
    display: flex;
    gap: 14px;
    margin-bottom: 8px;
    color: var(--text-soft);
    font-size: 14px;
}

.detail-label {
    flex: 0 0 86px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 400;
}

.detail-value { word-break: break-word; }

.missing-list {
    display: grid;
    gap: 8px;
}

.missing-item {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: var(--radius-sm);
    background: var(--danger-soft);
    color: var(--text-soft);
    font-size: 13px;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ── Buttons ── */
.btn, .btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-soft);
    background: var(--surface);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}

.btn:hover, .btn-sm:hover {
    color: var(--text);
    background: var(--surface-hover);
    border-color: rgba(255,255,255,0.08);
}

.btn-primary, .btn-success {
    border-color: var(--accent);
    color: #000;
    background: var(--accent);
    font-weight: 600;
}

.btn-primary:hover, .btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #000;
}

.btn-success {
    border-color: var(--accent);
    background: var(--accent);
    color: #000;
}

.btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
}

.btn-sm.btn-success {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(34,197,94,0.2);
}

.btn-sm.btn-success:hover {
    background: var(--accent-medium);
}

.btn-secondary {
    color: var(--text-soft);
}

.btn-pick {
    min-height: 28px;
    color: var(--accent);
    border-color: rgba(34,197,94,0.15);
}

.btn-pick:hover {
    background: var(--accent-soft);
}

/* ── Progress Bar ── */
.progress-bar {
    position: relative;
    height: 24px;
    border-radius: 999px;
    background: var(--surface);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
    transition: width 260ms ease;
}

.progress-text {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Footer ── */
.footer {
    margin-top: 40px;
    padding: 24px 0 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ── Alerts Bottom ── */
.alerts-bottom {
    max-width: none !important;
    padding: 0 !important;
}

/* ── Utilities ── */
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--accent); }
.text-warning { color: var(--warning); }
.font-bold { font-weight: 600; }
.mono { font-family: var(--font-mono); }
.text-sm { font-size: 12px; }

[x-cloak] { display: none !important; }
.modal-overlay[x-cloak] { display: none !important; }

/* ── Responsive ── */
@media (max-width: 820px) {
    .app {
        width: 100%;
        padding: 16px;
    }

    .header {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 40px;
    }

    .header-left, .header-right {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-stat {
        min-height: 85px;
        padding: 16px;
    }

    .card-stat .stat-value {
        font-size: 22px;
    }

    .main {
        gap: 48px;
    }

    .section-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .shelves-container {
        grid-template-columns: 1fr;
    }

    .shelf-card-vw {
        min-width: 0;
    }

    .box-detail-panel {
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: auto;
        top: auto;
        width: auto;
        max-width: none;
        max-height: 60vh;
        overflow-y: auto;
    }

    .modal {
        width: 100%;
        max-height: 90vh;
    }

    .modal-wide {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .app {
        padding: 12px;
    }

    .header-left, .header-right {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .brand-stack {
        gap: 1px;
    }

    .logo {
        font-size: 18px;
    }

    .update-time, .btn-refresh {
        flex: 1;
        justify-content: center;
        min-height: 30px;
        padding: 0 8px;
        font-size: 12px;
    }

    .overview {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card-stat {
        min-height: 75px;
        padding: 12px;
    }

    .card-stat .stat-value {
        font-size: 20px;
    }

    .card-stat .stat-label {
        font-size: 10px;
    }

    .section-title {
        font-size: 14px;
    }

    .table th, .table td {
        padding: 8px;
        font-size: 12px;
    }

    .tag {
        font-size: 10px;
        padding: 0 6px;
        min-height: 20px;
    }

    .box-square {
        flex: 0 0 48px;
        width: 48px;
        height: 44px;
    }

    .box-code-vw {
        font-size: 9px;
    }

    .box-qty-vw {
        font-size: 11px;
    }

    .level-label-vw {
        flex: 0 0 28px;
        font-size: 10px;
    }

    .level-row-vw {
        min-height: 52px;
    }

    .shelf-code-large {
        width: 40px;
        height: 36px;
        font-size: 16px;
    }

    .shelf-card-vw-header {
        grid-template-columns: 40px 1fr;
        padding: 12px;
    }

    .shelf-name {
        font-size: 13px;
    }

    .shelf-stats {
        font-size: 11px;
    }

    .modal-header h3 {
        font-size: 14px;
    }

    .modal-body {
        padding: 16px;
    }

    .detail-row {
        font-size: 13px;
        gap: 8px;
    }

    .detail-label {
        flex: 0 0 70px;
        font-size: 11px;
    }

    .btn, .btn-sm {
        min-height: 30px;
        padding: 0 10px;
        font-size: 11px;
    }
}

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