.stock-overview-page{letter-spacing:0}
.stock-page-header{min-height:48px;margin-bottom:10px}
.stock-page-header h1{margin-bottom:2px}

.stock-summary{margin-bottom:10px;background:#fff;border:1px solid var(--line)}
.stock-total-band{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:1px solid var(--line)}
.stock-total-cell{min-width:0;padding:12px 16px;border-right:1px solid var(--line)}
.stock-total-cell:last-child{border-right:0}
.stock-total-cell>span,.stock-total-cell>strong,.stock-total-cell>b{display:block}
.stock-total-cell>span{font-size:12px;font-weight:700}
.stock-total-cell>span small{margin-left:4px;font-size:9px;font-weight:400;opacity:.72}
.stock-total-cell>strong{margin-top:3px;font-size:24px;font-variant-numeric:tabular-nums}
.stock-total-cell>strong small{font-size:11px}
.stock-total-cell>b{margin-top:2px;font-size:10px;font-weight:400}
.stock-total-current{background:#e7f3ee;color:#115f4d}
.stock-total-order{background:#fff1cf;color:#805716}
.stock-total-all{background:#17272f;color:#fff}

.stock-breakdowns{display:grid;grid-template-columns:minmax(300px,.75fr) minmax(0,2.25fr)}
.stock-breakdowns>section{min-width:0}
.stock-breakdowns>section+section{border-left:1px solid var(--line)}
.stock-breakdowns h2{height:38px;display:flex;align-items:center;margin:0;padding:0 12px;border-bottom:1px solid var(--line);font-size:14px}
.stock-breakdown-grid{display:grid}
.stock-breakdown-grid>div{min-width:0;padding:9px 11px;border-right:1px solid #e1e7e9;border-bottom:1px solid #e1e7e9}
.stock-breakdown-grid>div strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.stock-breakdown-grid>div span{display:inline-block;margin-top:5px;margin-right:9px;color:var(--muted);font-size:11px;white-space:nowrap}
.stock-breakdown-grid>div span b{color:var(--ink);font-size:12px}
.stock-breakdown-grid>p{margin:0;padding:14px;color:var(--muted);font-size:12px}
.item-breakdown-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.grade-breakdown-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.grade-breakdown-grid>div{padding:11px 13px}
.grade-breakdown-grid>div strong{font-size:15px}
.grade-breakdown-grid>div span{font-size:12px}
.grade-breakdown-grid>div span b{font-size:14px}

.stock-section-heading{height:46px;padding:0 12px}
.stock-section-heading>div:first-child{display:flex;align-items:baseline;gap:8px}
.stock-section-heading>div:first-child>span{color:var(--muted);font-size:11px}
.stock-zoom-control{display:flex;align-items:center;gap:5px;white-space:nowrap}
.stock-zoom-control>span,.stock-zoom-control output{color:var(--muted);font-size:11px}
.stock-zoom-control output{width:38px;text-align:right}
.stock-zoom-control input{width:120px;accent-color:var(--green)}
.stock-zoom-step{width:26px;height:26px;display:grid;place-items:center;padding:0;border:1px solid #c8d1d5;background:#fff;font-size:16px;line-height:1}

.stock-filter-band{overflow-x:auto;padding:9px 12px;border-bottom:1px solid var(--line)}
.stock-filters{min-width:660px;display:grid;grid-template-columns:repeat(5,minmax(90px,1fr)) auto;align-items:end;gap:7px;white-space:nowrap}
.stock-filters label{min-width:0;display:grid;gap:3px}
.stock-filters label>span{color:var(--muted);font-size:11px}
.stock-filters select{width:100%;height:34px;border:1px solid #c8d1d5;background:#fff;padding:0 7px;font-size:12px}
.stock-filter-reset,.stock-filters noscript button{height:34px;display:grid;place-items:center;border:1px solid #c8d1d5;background:#fff;padding:0 10px;font-size:11px}

.stock-item-groups{display:grid}
.stock-item-group{border-bottom:1px solid var(--line)}
.stock-item-group:last-child{border-bottom:0}
.stock-item-group>summary{min-height:38px;display:flex;align-items:center;gap:8px;padding:7px 12px;background:#eef5f2;cursor:pointer;list-style-position:inside;user-select:none}
.stock-item-group>summary strong{font-size:14px}
.stock-item-group>summary span{color:var(--muted);font-size:11px}
.stock-table-wrap{overflow:auto}
.stock-table-zoom{width:max-content;transform-origin:top left}
.stock-overview-table{width:1320px;min-width:1320px;table-layout:fixed;font-size:13px;line-height:1.3}
.stock-overview-table th,.stock-overview-table td{padding:8px 9px;border-right:1px solid #edf0f1}
.stock-overview-table th:last-child,.stock-overview-table td:last-child{border-right:0}
.stock-overview-table th{height:44px;text-align:center;vertical-align:middle;white-space:normal;font-size:11px;line-height:1.3}
.stock-overview-table th:nth-child(1){width:125px;text-align:left}
.stock-overview-table th:nth-child(2){width:150px;text-align:left}
.stock-overview-table th:nth-child(3){width:70px}
.stock-overview-table th:nth-child(4){width:105px}
.stock-overview-table th:nth-child(5),.stock-overview-table th:nth-child(6){width:75px}
.stock-overview-table th:nth-child(7){width:75px}
.stock-overview-table th:nth-child(8){width:110px}
.stock-overview-table th:nth-child(9),.stock-overview-table th:nth-child(10){width:80px}
.stock-overview-table th:nth-child(11){width:115px}
.stock-overview-table th:nth-child(12){width:80px}
.stock-overview-table th:nth-child(13){width:115px}
.stock-overview-table td:nth-child(1),.stock-overview-table td:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.stock-overview-table td:nth-child(n+3){text-align:right;font-variant-numeric:tabular-nums}
.physical-stock strong,.total-stock strong,.total-stock-weight strong{color:var(--green)}
.current-stock-weight,.expected-inbound-weight,.total-stock-weight{white-space:nowrap}

.stock-movement-detail{position:relative;display:inline-block;color:var(--green);cursor:help;border-bottom:1px dotted currentColor;outline:none}
.monthly-outbound .stock-movement-detail{color:#805716}
.planned-sale .stock-movement-detail{color:#5a4d91}
.expected-inbound .stock-movement-detail{color:#2f6079}
.stock-movement-popover{position:absolute;top:calc(100% + 7px);left:50%;bottom:auto;z-index:20;width:300px;max-height:240px;overflow-y:auto;padding:8px 10px;background:#17272f;color:#fff;border:1px solid #334750;box-shadow:0 8px 24px rgba(0,0,0,.18);transform:translateX(-50%);white-space:normal;display:none!important;text-align:left}
.stock-movement-detail:hover .stock-movement-popover,.stock-movement-detail:focus .stock-movement-popover,.stock-movement-detail:focus-within .stock-movement-popover{display:block!important}
.stock-movement-line{display:block;padding:5px 0;border-bottom:1px solid #40525b}
.stock-movement-line:first-child{padding-top:0}
.stock-movement-line:last-child{padding-bottom:0;border-bottom:0}
.stock-movement-line strong,.stock-movement-line small{display:block}
.stock-movement-line small{color:#c5d0d5;margin-top:2px}
.stock-movement-popover::after{content:"";position:absolute;bottom:100%;left:50%;border:6px solid transparent;border-bottom-color:#17272f;transform:translateX(-50%)}
.stock-overview-table tbody tr:nth-last-child(-n+2) .stock-movement-popover{top:auto;bottom:calc(100% + 7px)}
.stock-overview-table tbody tr:nth-last-child(-n+2) .stock-movement-popover::after{top:100%;bottom:auto;border-top-color:#17272f;border-bottom-color:transparent}

@media(max-width:1200px) and (min-width:761px){
  .stock-breakdowns{grid-template-columns:1fr}
  .stock-breakdowns>section+section{border-top:1px solid var(--line);border-left:0}
  .grade-breakdown-grid{grid-template-columns:repeat(5,minmax(120px,1fr))}
}

@media(max-width:760px){
  .stock-page-header{min-height:0;margin-bottom:8px;gap:6px}
  .stock-total-cell{padding:9px 8px}
  .stock-total-cell>span{font-size:9px}
  .stock-total-cell>span small{display:none}
  .stock-total-cell>strong{font-size:15px}
  .stock-total-cell>strong small{font-size:8px}
  .stock-total-cell>b{font-size:8px}
  .stock-breakdowns{grid-template-columns:1fr}
  .stock-breakdowns>section+section{border-top:1px solid var(--line);border-left:0}
  .stock-breakdowns h2{height:34px;font-size:12px}
  .item-breakdown-grid,.grade-breakdown-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stock-breakdown-grid>div,.grade-breakdown-grid>div{padding:7px 8px}
  .stock-breakdown-grid>div strong,.grade-breakdown-grid>div strong{font-size:12px}
  .stock-breakdown-grid>div span,.grade-breakdown-grid>div span{font-size:10px}
  .stock-breakdown-grid>div span b,.grade-breakdown-grid>div span b{font-size:11px}
  .stock-section-heading{height:auto;min-height:42px;flex-wrap:wrap;gap:5px;padding:6px 8px}
  .stock-zoom-control input{width:72px}
  .stock-filter-band{padding:7px 8px}
  .stock-filters{min-width:540px;gap:4px}
  .stock-item-group>summary{min-height:34px;padding:6px 9px}
  .stock-overview-table{width:1050px;min-width:1050px;font-size:12px}
  .stock-overview-table th,.stock-overview-table td{padding:6px}
  .stock-overview-table th{font-size:10px}
  .stock-overview-table th:nth-child(1){width:100px}
  .stock-overview-table th:nth-child(2){width:120px}
  .stock-overview-table th:nth-child(3){width:55px}
  .stock-overview-table th:nth-child(4){width:90px}
  .stock-overview-table th:nth-child(5),.stock-overview-table th:nth-child(6),.stock-overview-table th:nth-child(7){width:58px}
  .stock-overview-table th:nth-child(8){width:90px}
  .stock-overview-table th:nth-child(9),.stock-overview-table th:nth-child(10){width:62px}
  .stock-overview-table th:nth-child(11){width:95px}
  .stock-overview-table th:nth-child(12){width:65px}
  .stock-overview-table th:nth-child(13){width:95px}
  .stock-movement-popover{left:0;transform:none}
  .stock-movement-popover::after{left:18px;transform:none}
}
