.bb-board{display:grid;gap:14px;min-width:0;color:var(--text,#17263e)}.bb-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.bb-stat{background:var(--card,#fff);border:1px solid var(--line,#dce6f5);border-radius:14px;padding:14px 18px}.bb-stat span,.bb-muted{color:var(--muted,#71809a);font-size:12px}.bb-stat b{display:block;font-size:26px;line-height:1.5}.bb-tools{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.bb-tools input{min-width:210px;max-width:320px}.bb-tools select{width:auto;min-width:120px}.bb-table-wrap{overflow:auto;max-height:680px;border:1px solid var(--line,#dce6f5);border-radius:12px}.bb-table{border-collapse:collapse;width:100%;min-width:1120px;font-size:13px;table-layout:fixed}.bb-table th{position:sticky;top:0;z-index:1;background:var(--panel,#f3f6fc);text-align:center;padding:12px 9px;border-bottom:1px solid var(--line,#dce6f5);font-size:12px;color:var(--muted,#71809a)}.bb-table td{text-align:center;padding:14px 10px;border-bottom:1px solid var(--line,#e5edf7);vertical-align:middle;overflow-wrap:anywhere}.bb-table tbody tr:nth-child(even){background:var(--panel-soft,#fafcff)}.bb-table .bb-left{text-align:left}.bb-product{font-weight:750;color:var(--primary,#087aff)}.bb-grade{display:inline-block;border-radius:6px;background:#eaf3ff;color:#0667cc;padding:2px 6px;margin-right:6px;font-weight:750}.bb-meta{font-size:12px;color:var(--muted,#71809a);margin-top:4px}.bb-stock-text{display:flex;justify-content:space-between;gap:5px;white-space:nowrap}.bb-meter{height:6px;position:relative;background:#e8eef7;border-radius:6px;margin:7px 0}.bb-meter span{display:block;height:100%;border-radius:6px;background:#087aff}.bb-meter:after{content:'';position:absolute;left:50%;top:-2px;height:10px;width:1px;background:#8192ac}.bb-badge{display:inline-block;padding:3px 8px;border-radius:7px;background:#eaf3ff;color:#166acc;font-size:12px;white-space:nowrap;font-weight:650}.bb-badge.warn{background:#fff1dc;color:#a25a04}.bb-badge.danger{background:#fff0ee;color:#bc3333}.bb-badge.success{background:#e8f7ee;color:#168154}.bb-rowactions{display:flex;gap:5px;justify-content:center;flex-wrap:wrap}.bb-rowactions .action-btn{padding:5px 10px;min-height:30px;white-space:nowrap}.bb-head-filter{border:0;background:none;color:inherit;font:inherit;display:inline-flex;gap:8px;align-items:center;padding:0}.bb-head-filter.active{color:#087aff}.bb-popup{position:absolute;z-index:40;width:240px;background:var(--card,#fff);border:1px solid var(--line,#dce6f5);box-shadow:0 12px 30px #17284620;border-radius:12px;padding:12px}.bb-popup label{display:flex;gap:7px;padding:5px 0;align-items:center;font-size:12px}.bb-popup input[type=checkbox]{width:15px;height:15px}.bb-popup-values{max-height:240px;overflow:auto;margin:8px 0}.bb-popup input[type=search]{width:100%}.bb-board{position:relative}.bb-empty{text-align:center;padding:40px;color:var(--muted,#71809a)}.bb-dialog{border:1px solid var(--line,#dce6f5);border-radius:16px;background:var(--card,#fff);color:var(--text,#17263e);width:min(1150px,94vw);max-height:90vh;padding:0;box-shadow:0 24px 70px #15233f33}.bb-dialog::backdrop{background:#1b2e4b55}.bb-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line,#dce6f5);position:sticky;top:0;background:var(--card,#fff);z-index:2}.bb-dialog-head h3{margin:0}.bb-dialog-body{padding:18px 20px;display:grid;gap:16px}.bb-notice{border-radius:10px;background:#eef5ff;color:#315078;padding:11px 14px;font-size:13px}.bb-notice.danger{background:#fff0ee;color:#b23636}.bb-detail-table{min-width:760px}.bb-detail-table td{padding:9px}.bb-detail-table th{position:static}.bb-qty{width:76px!important;text-align:center;min-height:30px!important;padding:5px!important}.bb-form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.bb-form-grid label{display:grid;gap:6px;color:var(--muted,#71809a);font-size:12px}.bb-form-grid input,.bb-form-grid select{width:100%;min-width:0;box-sizing:border-box;border:1px solid var(--line,#dce6f5);border-radius:9px;padding:8px;color:var(--text,#17263e);background:var(--card,#fff)}.bb-dialog input[type=checkbox]{width:16px;height:16px;min-height:0}.bb-form-grid .wide{grid-column:1/-1}.bb-plan{border:1px solid var(--line,#dce6f5);border-radius:12px;padding:12px 15px;display:grid;gap:8px}.bb-plan-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.bb-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.bb-event{border-left:2px solid #dae6f8;padding:5px 10px;margin:4px 0;font-size:12px}.bb-dialog details summary{cursor:pointer;color:var(--muted,#71809a);font-size:13px}.bb-msg{white-space:pre-wrap;font-size:13px}.bb-board .shipment-section-card{min-width:0}.bb-col-note{line-height:1.55}.bb-checkbox{display:flex;align-items:center;gap:8px;font-size:13px}.bb-dialog button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:760px){.bb-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.bb-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bb-dialog-body{padding:12px}.bb-tools input{min-width:160px}.bb-dialog-head{padding:14px}}

.bb-period{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 14px;background:var(--panel-soft,#f7faff);border:1px solid var(--line,#dce6f5);border-radius:12px}
.bb-period label{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted,#71809a);white-space:nowrap}
.bb-period input,.bb-period select{box-sizing:border-box;min-height:34px;padding:6px 10px;border:1px solid var(--line,#dce6f5);border-radius:9px;background:var(--card,#fff);color:var(--text,#17263e);font:inherit}
.bb-period select{width:135px}.bb-period input{width:146px}.bb-period-dates{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.bb-period-dates[hidden]{display:none}
.bb-dialog:has(.bb-analysis-table){width:min(1370px,94vw)}.bb-analysis-table{min-width:1190px}.bb-analysis-table th:first-child{width:52px}.bb-analysis-table th{line-height:1.5}.bb-analysis-table .bb-meta{white-space:normal;font-weight:400;line-height:1.4}
.bb-trend{font-size:12px;margin-top:4px;color:var(--muted,#71809a)}.bb-trend.up{color:#b86108}.bb-trend.down{color:#168154}
@media(max-width:760px){.bb-period{gap:9px;padding:10px}.bb-period-dates{width:100%}.bb-period-dates>span{display:none}.bb-period input{width:140px}}

.bb-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px 20px;flex-wrap:wrap}.bb-toolbar .bb-tools{gap:8px}.bb-toolbar .bb-tools input{width:270px}.bb-toolbar #bbPeriodControls{margin-left:auto;max-width:100%}.bb-toolbar .bb-period{border:0;background:none;padding:0;gap:8px;justify-content:flex-end}.bb-toolbar .bb-period>span{font-size:11px}.bb-toolbar .bb-period input{width:135px}.bb-toolbar .bb-period select{width:114px}.bb-toolbar .bb-period-dates{gap:6px}
.bb-main-table{min-width:1240px}.bb-main-table th{padding:9px 6px;height:44px;box-sizing:border-box}.bb-main-table .bb-head-filter{min-height:28px;gap:7px;justify-content:center;max-width:100%;white-space:nowrap;cursor:pointer}.bb-filter-icon{display:inline-flex;align-items:center;justify-content:center;width:25px;height:25px;border:1px solid transparent;border-radius:6px;flex:0 0 25px}.bb-filter-icon svg{display:block;width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}.bb-head-filter:hover .bb-filter-icon,.bb-head-filter.active .bb-filter-icon{background:#eaf3ff;border-color:#cadfff;color:#087aff}.bb-sort-mark{color:#087aff;font-size:13px}.bb-main-table .bb-grade{margin-right:0;min-width:24px}.bb-main-table td{padding:12px 10px}.bb-filter-chips{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}.bb-filter-chips:empty{display:none}.bb-filter-chips .action-btn{background:#eef5ff;color:#226bc3;border-color:#d5e5fa;font-size:12px;padding:4px 9px;min-height:28px;box-shadow:none}
.bb-popup{position:fixed;z-index:1000;width:300px;max-width:calc(100vw - 24px);box-sizing:border-box;display:flex;flex-direction:column;gap:9px;border:1px solid var(--line,#dce6f5);border-radius:14px;padding:14px;box-shadow:0 12px 35px #17284626;overflow:auto;font-size:13px;color:var(--text,#17263e)}.bb-popup [hidden]{display:none!important}.bb-filter-title{display:flex;align-items:center;justify-content:space-between}.bb-filter-title button{border:0;background:none;font-size:21px;color:var(--muted,#71809a);cursor:pointer;line-height:1;padding:3px 6px}.bb-filter-sort{display:grid;grid-template-columns:1fr 1fr;gap:7px}.bb-popup .action-btn{font-size:12px;min-height:31px;padding:5px 9px;box-shadow:none}.bb-clear-column{border:0;background:#f1f6fc;text-align:left;padding:8px 10px;border-radius:8px;font:inherit;color:#376596;cursor:pointer}.bb-popup input[type=search],.bb-popup input[type=number],.bb-popup select{box-sizing:border-box;min-width:0;min-height:33px;border:1px solid var(--line,#dce6f5);border-radius:8px;padding:6px 9px;background:var(--card,#fff);color:var(--text,#17263e);font:inherit}.bb-popup input[type=checkbox]{accent-color:#087aff;flex:0 0 15px;margin:0;min-height:0}.bb-number-filter{display:grid;gap:7px}.bb-number-filter label{justify-content:space-between;padding:0}.bb-number-filter select{width:168px}.bb-number-values{display:flex;align-items:center;gap:6px}.bb-number-values input{width:100%;flex:1 1 0}.bb-popup .bb-select-all{border-bottom:1px solid var(--line,#e5edf7);margin:0;padding:7px 8px;font-weight:600;flex-shrink:0}.bb-popup-values{margin:0;max-height:210px;min-height:40px;overflow:auto;flex:0 1 auto}.bb-popup-values label{padding:6px 8px;border-radius:6px;cursor:pointer;gap:9px}.bb-popup-values label:hover{background:#eef5ff}.bb-popup-values label span{overflow-wrap:anywhere}.bb-popup-values small{margin-left:auto;color:var(--muted,#71809a)}.bb-filter-count{font-size:11px;color:var(--muted,#71809a)}.bb-filter-error{color:#bb3838;font-size:12px}.bb-filter-error:empty{display:none}.bb-filter-footer{display:flex;justify-content:flex-end;gap:8px;border-top:1px solid var(--line,#e5edf7);padding-top:10px;flex-shrink:0}.bb-filter-empty{padding:16px;text-align:center;color:var(--muted,#71809a)}
@media(max-width:1000px){.bb-toolbar #bbPeriodControls{width:100%;margin-left:0}.bb-toolbar .bb-period{justify-content:flex-start}}

/* Compact segmented period selector, variant B. */
.bb-toolbar #bbPeriodControls{width:auto;flex:0 0 auto;max-width:100%;margin-left:auto}.bb-period.bb-period-compact{display:block;position:relative;border:0;background:none;border-radius:0;padding:0;box-shadow:none}.bb-period-main{display:flex;align-items:center;gap:9px;min-height:36px}.bb-period-label{font-size:14px;font-weight:600;color:var(--text,#17263e);white-space:nowrap}.bb-period-segments{display:inline-flex;border:1px solid var(--line,#dce6f5);border-radius:7px;overflow:hidden;background:var(--card,#fff)}.bb-period-segment{appearance:none;border:0;border-right:1px solid var(--line,#dce6f5);background:transparent;box-sizing:border-box;min-width:56px;min-height:34px;padding:6px 12px;font:inherit;font-size:13px;font-weight:500;line-height:20px;color:var(--text,#26374d);cursor:pointer;white-space:nowrap}.bb-period-segment:last-child{border-right:0}.bb-period-segment:hover{background:#f4f8fd}.bb-period-segment.is-active{background:#eaf3ff;color:#087aff;font-weight:650}.bb-period-segment.is-open{box-shadow:inset 0 -2px #97c4ff}.bb-period-segment:focus-visible{outline:2px solid #087aff;outline-offset:-3px}.bb-period-segment:disabled{opacity:.55;cursor:wait}
.bb-period-help{display:inline-flex;align-items:center}.bb-period-info{display:inline-flex;align-items:center;justify-content:center;width:21px;height:25px;border:0;background:none;color:#899bb5;cursor:pointer;padding:2px}.bb-period-info:hover,.bb-period-info:focus-visible{color:#087aff}.bb-period-info svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}.bb-period-tip{display:none;position:absolute;z-index:50;right:0;top:calc(100% + 8px);width:320px;max-width:calc(100vw - 32px);box-sizing:border-box;background:var(--card,#fff);border:1px solid var(--line,#dce6f5);box-shadow:0 8px 24px #1728461a;border-radius:10px;padding:12px 14px;color:var(--muted,#71809a);font-size:12px;line-height:1.6}.bb-period-tip strong{display:block;font-size:12px;color:var(--text,#17263e);font-weight:500;margin-bottom:5px}.bb-period-tip>span{display:block;margin-top:4px}.bb-period-help:hover .bb-period-tip,.bb-period-help:focus-within .bb-period-tip,.bb-period-help.is-open .bb-period-tip{display:block}
.bb-period-compact .bb-period-dates{display:grid;gap:11px;position:absolute;z-index:45;right:0;top:calc(100% + 8px);width:360px;max-width:calc(100vw - 32px);box-sizing:border-box;padding:15px;background:var(--card,#fff);border:1px solid var(--line,#dce6f5);border-radius:12px;box-shadow:0 10px 28px #17284620}.bb-period-compact .bb-period-dates[hidden]{display:none}.bb-period-dates>strong{font-size:13px;color:var(--text,#17263e)}.bb-period-date-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bb-period-date-fields label{display:grid;gap:6px;white-space:normal}.bb-period-compact .bb-period-date-fields input{width:100%;min-width:0;height:34px;font-size:12px}.bb-period-date-note{font-size:11px;color:var(--muted,#71809a);line-height:1.5}.bb-period-date-actions{display:flex;justify-content:flex-end;gap:8px}.bb-period-date-actions .action-btn{font-size:12px;min-height:31px;padding:5px 12px}.bb-dialog .bb-period-compact{justify-self:end}
@media(max-width:1000px){.bb-toolbar #bbPeriodControls{width:auto;flex:0 1 auto;margin-left:auto}}@media(max-width:560px){.bb-period-main{flex-wrap:wrap;gap:7px}.bb-period-segment{min-width:48px;padding:6px 10px}.bb-toolbar #bbPeriodControls{margin-left:0}.bb-period-compact .bb-period-dates,.bb-period-tip{right:auto;left:0}.bb-dialog .bb-period-compact{justify-self:start}}

.bb-period-range-error{font-size:12px;color:#a94a3c;line-height:1.5}.bb-period-range-error:empty{display:none}
