/* Inventory presentation only. No stock state, interaction or business changes. */
#layoutSelectedStock {
    background: #fff;
    border-bottom-color: #edf0f6;
}
#layoutSelectedStock .layout-stock-heading { margin-bottom: 14px; }
#layoutSelectedStock #layoutStockTitle {
    color: #27344b;
    font-weight: 600;
    letter-spacing: -.35px;
}
#layoutStockItems {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    padding: 4px;
    border: 1px solid #e8ecf3;
    border-radius: 12px;
    background: #f7f9fc;
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    font-variant-numeric: lining-nums tabular-nums;
}
#layoutStockItems:has(.layout-stock-pill:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#layoutStockItems:has(.layout-stock-pill:nth-child(5)) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
#layoutStockItems:has(.layout-stock-pill:only-child) { grid-template-columns: minmax(0, 1fr); }
#layoutStockItems .layout-stock-pill {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    min-height: 60px;
    padding: 8px 16px;
    gap: 5px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
    cursor: default;
}
#layoutStockItems .layout-stock-pill + .layout-stock-pill::after {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 1px;
    background: #e2e7f0;
    pointer-events: none;
}
#layoutStockItems .layout-stock-pill b {
    color: #2c3951;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: .15px;
    white-space: nowrap;
    overflow-wrap: normal;
}
#layoutStockItems .layout-stock-pill > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #617087;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 500;
    letter-spacing: .1px;
    white-space: nowrap;
}
#layoutStockItems .layout-stock-pill > span::before {
    content: "";
    flex: 0 0 auto;
    box-sizing: border-box;
    width: 5px;
    height: 5px;
    border: 0;
    border-radius: 50%;
    background: currentColor;
}
#layoutStockItems .layout-stock-pill[data-view-stock="in"] > span { color: #15724f; }
#layoutStockItems .layout-stock-pill[data-view-stock="out"] > span { color: #617087; }
#layoutStockItems .layout-stock-pill[data-view-stock="out"] > span::before {
    width: 6px;
    height: 2px;
    border-radius: 1px;
}
#layoutStockItems .layout-stock-pill[data-view-stock="unknown"] > span { color: #865c1b; }
#layoutStockItems .layout-stock-pill[data-view-stock="unknown"] > span::before {
    width: 6px;
    height: 6px;
    border: 1.25px solid currentColor;
    background: transparent;
}
@media (max-width: 900px) {
    #layoutSelectedStock .layout-stock-heading { margin-bottom: 9px; }
    #layoutStockItems,
    #layoutStockItems:has(.layout-stock-pill:nth-child(4)),
    #layoutStockItems:has(.layout-stock-pill:nth-child(5)),
    #layoutStockItems:has(.layout-stock-pill:only-child) {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(60px, 1fr);
        padding: 3px;
        border-radius: 10px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }
    #layoutStockItems:has(.layout-stock-pill:nth-child(5)) { grid-auto-columns: minmax(74px, 1fr); }
    #layoutStockItems .layout-stock-pill {
        align-items: center;
        min-height: 46px;
        padding: 4px 5px;
        gap: 3px;
        text-align: center;
    }
    #layoutStockItems .layout-stock-pill + .layout-stock-pill::after { top: 8px; bottom: 8px; }
    #layoutStockItems .layout-stock-pill b { font-size: 13px; letter-spacing: .1px; }
    #layoutStockItems .layout-stock-pill > span { font-size: 12px; line-height: 1.4; }
}
