.stock-history-demo { margin: 0 0 56px; scroll-margin-top: 100px; }
.stock-history-demo h2 { max-width: 650px; font-size: clamp(28px, 4vw, 38px); line-height: 1.15; font-weight: 700; margin: 0 0 18px; }
.stock-history-demo > p { max-width: 680px; line-height: 1.7; }
.stock-history-demo button { cursor: pointer; }
.stock-history-demo button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.warehouse-workbench:not([data-workbench-ready]) .warehouse-tabs { display: none; }
.warehouse-tabs { display: flex; gap: 24px; margin: 28px 0; border-bottom: 1px solid var(--line); }
.warehouse-tabs button { padding: 14px 0; background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-size: 16px; font-weight: 600; }
.warehouse-tabs button[aria-selected="true"] { color: var(--sea); border-bottom-color: var(--sea); }
.warehouse-workbench [data-warehouse-panel][hidden], .warehouse-workbench [data-order-detail][hidden], .warehouse-workbench [data-order-empty][hidden] { display: none; }
.warehouse-panel-title { margin: 0 0 12px; font: 600 23px/1.3 "Outfit", sans-serif; color: var(--ink); }
.warehouse-workbench [data-warehouse-panel] { outline-offset: 5px; }
.warehouse-workbench [data-warehouse-panel] > p { max-width: 680px; line-height: 1.7; }
.warehouse-order-controls { display: grid; grid-template-columns: 1fr 1.3fr 1.2fr; gap: 18px; margin: 22px 0; }
.warehouse-order-controls label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.warehouse-order-controls select { width: 100%; min-width: 0; padding: 11px 28px 11px 12px; border: 1px solid #a8b4c8; border-radius: 6px; background: white; color: var(--ink); font-size: 14px; }
.warehouse-order-controls select:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.warehouse-order-workspace { display: grid; grid-template-columns: 1.25fr 1fr; border: 1px solid var(--line); border-radius: 16px; overflow: clip; min-height: 270px; }
.warehouse-order-list { background: white; padding: 26px; min-width: 0; }
.warehouse-order-count { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.warehouse-order-row { display: grid; gap: 10px; width: 100%; padding: 20px; text-align: left; background: #edf7f5; border: 1px solid #2e8b7c; border-left: 3px solid var(--sea); border-radius: 4px; color: var(--ink); }
.warehouse-order-row strong { font: 600 25px/1.2 "Outfit", sans-serif; }
.warehouse-order-row span { color: var(--sea); font-size: 14px; }
.warehouse-order-detail { display: flex; flex-direction: column; justify-content: center; padding: 28px; background: var(--ink); color: white; }
.warehouse-order-detail > span { font-size: 13px; color: #c5d5ef; }
.warehouse-order-detail h3 { margin: 10px 0 24px; font: 600 34px/1.2 "Outfit", sans-serif; }
.warehouse-order-detail dl { display: grid; gap: 18px; margin: 0; }
.warehouse-order-detail dt { color: #c5d5ef; font-size: 12px; }
.warehouse-order-detail dd { margin: 5px 0 0; font-size: 17px; }
.warehouse-order-empty { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); }
.warehouse-order-basis { color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.warehouse-order-sku { margin: 24px 0 10px; color: #c5d5ef; font-size: 13px; }
.warehouse-order-detail .warehouse-order-quantities { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 16px; padding-top: 18px; border-top: 1px solid #587291; }
.warehouse-order-quantities dd { font-weight: 600; }
.warehouse-agent-request { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.warehouse-agent-request[hidden] { display: none; }
.warehouse-workbench:not([data-workbench-ready]) [data-order-agent-copy] { display: none; }
.warehouse-agent-request summary { width: fit-content; cursor: pointer; color: var(--sea); font-size: 15px; font-weight: 600; }
.warehouse-agent-request p { max-width: 680px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.warehouse-agent-request label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 8px; }
.warehouse-agent-request textarea { display: block; width: 100%; box-sizing: border-box; resize: vertical; min-height: 100px; padding: 14px; border: 1px solid #a8b4c8; border-radius: 6px; background: white; color: var(--ink); font: 14px/1.7 "DM Sans", sans-serif; }
.warehouse-agent-request summary:focus-visible, .warehouse-agent-request textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.warehouse-agent-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 13px; color: var(--sea); }
.warehouse-agent-actions button { border: 1px solid var(--sea); border-radius: 6px; background: white; color: var(--sea); padding: 10px 14px; font-size: 13px; font-weight: 600; }
.aiaas-page .stock-history-demo .warehouse-agent-request a { color: var(--sea); text-decoration: underline; text-underline-offset: 3px; }
.warehouse-workbench:not([data-workbench-ready]) [data-warehouse-panel="movements"] { margin-top: 36px; }
.history-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 20px; }
.history-filters button { border: 1px solid #a8b4c8; border-radius: 8px; background: white; padding: 9px 12px; color: var(--ink); font-weight: 600; }
.history-filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: white; }
.history-workspace { display: grid; grid-template-columns: 1.25fr 1fr; border: 1px solid var(--line); border-radius: 16px; overflow: clip; }
.history-ledger { position: sticky; top: 100px; align-self: start; background: white; min-width: 0; padding: 22px; }
.history-ledger-title { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 12px; color: var(--muted); padding-bottom: 18px; }
.history-ledger-title strong { font-weight: 600; color: var(--ink); }
.history-rows { display: grid; gap: 10px; }
.stock-history-demo .movement-row { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; width: 100%; min-height: 108px; text-align: left; border: 1px solid var(--line); border-left: 3px solid var(--sea); background: #f7fafc; border-radius: 4px; padding: 15px; }
.stock-history-demo .movement-row[aria-pressed="true"] { background: #edf7f5; border-color: #2e8b7c; }
.movement-time { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.movement-kind { grid-column: 1 / -1; font-size: 15px; font-weight: 600; color: var(--ink); }
.movement-document { color: #315c85; font-size: 13px; }
.movement-quantity { color: var(--sea); font-size: 13px; font-weight: 700; }
.movement-row[data-source="dispatch"] .movement-quantity, .movement-row[data-source="transfer"] .movement-quantity { color: #9a441c; }
.history-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); margin-top: 20px; }
.history-pagination button { padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--ink); }
.history-pagination button:disabled { opacity: .45; cursor: default; }
.history-trace { display: flex; flex-direction: column; justify-content: center; min-width: 0; background: var(--ink); color: white; padding: 28px; }
.history-trace > span, .history-trace-time { color: #c5d5ef; font-size: 13px; }
.history-trace h3 { margin: 12px 0 6px; font: 600 34px "Outfit", sans-serif; }
.history-trace-time { margin: 0; }
.history-stock-change { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid #3d526e; border-bottom: 1px solid #3d526e; padding: 24px 0; margin: 24px 0 18px; }
.history-stock-change dt { color: #c5d5ef; font-size: 12px; }
.history-stock-change dd { margin: 5px 0 0; font-size: 19px; font-weight: 600; white-space: nowrap; }
.history-trace-quantity { display: grid; gap: 6px; margin: 0; font-size: 12px; color: #c5d5ef; }
.history-trace-quantity strong { font-size: 17px; color: white; }
.history-open-source { margin-top: 20px; width: fit-content; border: 1px solid #b4d2f5; border-radius: 8px; padding: 10px 14px; background: #ecf4ff; color: var(--ink); font-weight: 600; }
.history-source { margin-top: 20px; border-top: 1px solid #587291; padding-top: 18px; }
.history-source[hidden] { display: none; }
.history-source h4 { margin: 0 0 18px; font-size: 15px; }
.history-source dl { display: grid; gap: 14px; margin: 0; }
.history-source dt { color: #c5d5ef; font-size: 12px; }
.history-source dd { margin: 4px 0 0; font-size: 14px; line-height: 1.6; }
.history-source button { margin-top: 20px; border: 1px solid #b4d2f5; padding: 9px 12px; border-radius: 6px; background: transparent; color: white; font-size: 12px; }
.history-source button:disabled { opacity: .5; cursor: default; }
.history-source p { color: #c5d5ef; font-size: 12px; line-height: 1.7; margin: 14px 0 0; }
.history-transit { margin-top: 24px; padding-top: 20px; border-top: 1px solid #587291; }
.history-transit[hidden] { display: none; }
.history-transit h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.history-transit h4 span { font-size: 12px; color: #bde4dc; padding: 4px 8px; border: 1px solid #587291; border-radius: 4px; }
.history-source .history-transit-quantities { grid-template-columns: 1fr 1fr; gap: 12px; }
.history-source .history-transit-quantities dd { font-size: 19px; font-weight: 600; }
.history-source .history-transit-costs { margin-top: 20px; }
.history-existing-target { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; font-size: 12px; line-height: 1.6; color: #c5d5ef; cursor: pointer; }
.history-existing-target input { flex-shrink: 0; margin-top: 3px; accent-color: #bde4dc; }
.history-transit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.history-source .history-transit-actions button { margin-top: 0; text-align: left; line-height: 1.5; }
.history-source .history-reset-transfer { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; color: #c5d5ef; }
.stock-history-demo .history-note { margin: 20px 0 12px; color: var(--muted); font-size: 13px; }
.history-manual { color: var(--sea); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
@media (max-width: 650px) { .history-workspace, .warehouse-order-workspace { grid-template-columns: 1fr; } .warehouse-order-controls { grid-template-columns: 1fr; gap: 12px; } .warehouse-agent-request textarea { min-height: 180px; } .history-ledger { position: static; } .history-trace { padding: 24px; } .history-stock-change dd { font-size: 23px; } }

.warehouse-order-history { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.warehouse-order-history[hidden] { display: none; }
.warehouse-order-history summary { cursor: pointer; width: fit-content; font-size: 15px; font-weight: 600; color: var(--sea); }
.warehouse-order-history summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.warehouse-source-table { overflow-x: auto; margin-top: 18px; }
.warehouse-source-table table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: left; }
.warehouse-source-table caption { text-align: left; padding-bottom: 10px; font-weight: 600; color: var(--ink); }
.warehouse-source-table th, .warehouse-source-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.warehouse-source-table th { color: var(--muted); font-weight: 500; }
.warehouse-order-history p { max-width: 680px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.warehouse-history-pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.warehouse-history-pagination[hidden], .warehouse-workbench:not([data-workbench-ready]) .warehouse-history-pagination { display: none; }
.warehouse-history-pagination button { min-height: 44px; padding: 9px 12px; border: 1px solid var(--sea); border-radius: 6px; background: white; color: var(--sea); font-weight: 600; }
.warehouse-history-pagination button:disabled { color: var(--muted); border-color: var(--line); cursor: default; }
