
/* ThaiOrganicHub Forecast v3.3.0 - isolated plugin-owned design */
#toh-forecast-ui, #toh-forecast-ui *{box-sizing:border-box}
#toh-forecast-ui{position:fixed;inset:0;z-index:2147483000;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(7,38,28,.63);font-family:Sarabun,Arial,sans-serif;color:#162b25}
#toh-forecast-ui.is-open{display:flex}
#toh-forecast-ui .tf-modal{display:flex;flex-direction:column;width:min(1080px,100%);max-height:min(95vh,1020px);overflow:hidden;background:#fff;border-radius:21px;box-shadow:0 24px 90px #071d1770}
#toh-forecast-ui .tf-header{flex:none;display:flex;align-items:center;gap:22px;padding:28px 36px 22px}
#toh-forecast-ui .tf-brand{display:grid;place-items:center;flex:none;width:46px;height:51px;border-radius:8px;background:#078d58;color:#fff;font-size:27px;font-weight:800;box-shadow:0 5px 13px #0a845028}
#toh-forecast-ui h2{font-size:25px;line-height:1.25;font-weight:750;margin:0;color:#0e1e1b}
#toh-forecast-ui .tf-header p{margin:8px 0 0;color:#667a74;font-size:13px}
#toh-forecast-ui button{cursor:pointer;font-family:inherit}
#toh-forecast-ui .tf-close{margin-left:auto;align-self:flex-start;width:38px;height:38px;background:transparent;border:0;border-radius:9px;color:#40544d;font-size:30px;font-weight:300;line-height:1}
#toh-forecast-ui .tf-close:hover{background:#edf4f0}
#toh-forecast-ui .tf-content{overflow:auto;padding:0 22px 10px;overscroll-behavior:contain}
#toh-forecast-ui .tf-section{position:relative;border:1px solid #e2ebe7;border-radius:16px;padding:18px 17px 18px;margin-bottom:10px;background:#f8fbfa}
#toh-forecast-ui .tf-section:nth-child(2){background:#fbfcfd}
#toh-forecast-ui .tf-section:nth-child(3){background:#fbfcfd}
#toh-forecast-ui .tf-section-head{display:flex;gap:16px;align-items:center;margin-bottom:14px}
#toh-forecast-ui .tf-step{display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:50%;background:#07935b;color:#fff;font-size:20px;font-weight:700}
#toh-forecast-ui .tf-section-title{font-weight:750;font-size:18px;line-height:1.25;color:#112b24}
#toh-forecast-ui .tf-section-subtitle{font-size:12px;color:#687c75;margin-top:5px}
#toh-forecast-ui .tf-fields{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:15px 18px;padding-left:52px}
#toh-forecast-ui label{display:block;font-size:13px;font-weight:650;color:#243a33}
#toh-forecast-ui .tf-required{color:#df4545}
#toh-forecast-ui input,#toh-forecast-ui select,#toh-forecast-ui textarea{display:block;width:100%;min-width:0;min-height:47px;margin-top:7px;padding:10px 12px;border:1px solid #d5e2dc;border-radius:9px;background:#fff;color:#18372b;font-size:14px;font-family:inherit;outline:none;box-shadow:none}
#toh-forecast-ui input:focus,#toh-forecast-ui select:focus,#toh-forecast-ui textarea:focus{border-color:#0c9a60;box-shadow:0 0 0 3px #0c9a601a}
#toh-forecast-ui input::placeholder,#toh-forecast-ui textarea::placeholder{color:#a1aea9;opacity:1}
#toh-forecast-ui .tf-hint{font-size:11px;font-weight:400;color:#7a8d85;margin-top:7px}
#toh-forecast-ui .tf-product-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:13px}
#toh-forecast-ui .tf-product-head .tf-section-head{margin:0}
#toh-forecast-ui .tf-add{border:0;background:#07935b;color:#fff;border-radius:9px;padding:12px 19px;font-weight:700;font-size:14px}
#toh-forecast-ui .tf-add:hover,#toh-forecast-ui .tf-submit:hover{background:#006d43}
#toh-forecast-ui .tf-table-scroll{overflow-x:auto}
#toh-forecast-ui .tf-table{border-collapse:separate;border-spacing:0;width:100%;min-width:800px;table-layout:fixed}
#toh-forecast-ui .tf-table th{font-size:12px;color:#2e443c;background:#f2f5f5;padding:11px 9px;text-align:left;white-space:nowrap}
#toh-forecast-ui .tf-table th:first-child{width:54px}#toh-forecast-ui .tf-table th:nth-child(2){width:31%}#toh-forecast-ui .tf-table th:nth-child(3){width:17%}#toh-forecast-ui .tf-table th:nth-child(4){width:19%}#toh-forecast-ui .tf-table th:nth-child(5){width:15%}#toh-forecast-ui .tf-table th:nth-child(6){width:14%}
#toh-forecast-ui .tf-table td{padding:8px 7px;background:#fff;border-bottom:1px solid #edf1ef;vertical-align:middle;font-size:14px}
#toh-forecast-ui .tf-table td:first-child{font-weight:700;text-align:center}
#toh-forecast-ui .tf-table input,#toh-forecast-ui .tf-table select{margin:0;height:44px;min-height:44px;padding:8px;font-size:13px}
#toh-forecast-ui .tf-table .tf-line-total{text-align:right;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
#toh-forecast-ui .tf-row-actions{white-space:nowrap;text-align:center}
#toh-forecast-ui .tf-row-actions button{border:0;background:none;padding:8px;color:#b53d40;font-size:18px}
#toh-forecast-ui .tf-row-actions button:disabled{opacity:.25;cursor:not-allowed}
#toh-forecast-ui .tf-qty-wrap{display:flex;gap:4px;align-items:center}
#toh-forecast-ui .tf-qty-wrap input{width:68%}
#toh-forecast-ui .tf-qty-wrap small{font-size:11px;color:#7b8984}
#toh-forecast-ui .tf-total{display:flex;justify-content:flex-end;gap:18px;align-items:center;margin-top:13px;padding:12px 3px;color:#52685d}
#toh-forecast-ui .tf-total strong{font-size:22px;color:#076e46;font-variant-numeric:tabular-nums}
#toh-forecast-ui textarea{resize:vertical;min-height:72px;max-height:190px}
#toh-forecast-ui .tf-note-field{margin-left:52px}
#toh-forecast-ui .tf-note-counter{text-align:right;color:#89958e;font-size:11px}
#toh-forecast-ui .tf-footer{flex:none;display:flex;justify-content:space-between;gap:12px;align-items:center;padding:16px 23px;background:#fff;border-top:1px solid #e9efec}
#toh-forecast-ui .tf-footer-right{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
#toh-forecast-ui .tf-footer button{border:0;border-radius:9px;padding:13px 17px;font-size:14px;font-weight:700}
#toh-forecast-ui .tf-cancel{background:#edf1f3;color:#485c56}
#toh-forecast-ui .tf-save{background:#e0f3eb;color:#067047}
#toh-forecast-ui .tf-submit{background:#006b46;color:white}
#toh-forecast-ui .tf-footer button:disabled{opacity:.5;cursor:wait}
#toh-forecast-ui .tf-message{display:none;padding:11px 16px;margin:0 23px 8px;border-radius:8px;font-size:13px}
#toh-forecast-ui .tf-message.is-visible{display:block;background:#fff1ef;color:#9c3030}
#toh-forecast-ui .tf-success{background:#eaf8f0!important;color:#0b6a43!important}
@media(max-width:800px){#toh-forecast-ui{padding:8px}#toh-forecast-ui .tf-modal{max-height:98vh;border-radius:14px}#toh-forecast-ui .tf-header{padding:17px}#toh-forecast-ui h2{font-size:20px}#toh-forecast-ui .tf-content{padding:0 10px}#toh-forecast-ui .tf-section{padding:14px 11px}#toh-forecast-ui .tf-fields{grid-template-columns:1fr 1fr;padding-left:0}#toh-forecast-ui .tf-note-field{margin-left:0}#toh-forecast-ui .tf-footer{padding:12px;align-items:stretch}#toh-forecast-ui .tf-footer button{padding:12px 10px}}
@media(max-width:520px){#toh-forecast-ui .tf-fields{grid-template-columns:1fr}#toh-forecast-ui .tf-footer{flex-direction:column}#toh-forecast-ui .tf-footer-right{width:100%}#toh-forecast-ui .tf-footer-right button{flex:1}#toh-forecast-ui .tf-section-title{font-size:16px}}

/* v3.3.1 balanced sizing, existing design preserved */
#toh-forecast-ui .tf-modal{width:min(1020px,100%);border-radius:17px}
#toh-forecast-ui .tf-header{gap:14px;padding:20px 27px 16px}
#toh-forecast-ui .tf-brand{width:37px;height:40px;border-radius:7px;font-size:21px}
#toh-forecast-ui h2{font-size:21px}
#toh-forecast-ui .tf-header p{font-size:12px;margin-top:5px}
#toh-forecast-ui .tf-close{width:32px;height:32px;font-size:23px}
#toh-forecast-ui .tf-content{padding:0 17px 8px}
#toh-forecast-ui .tf-section{padding:14px;margin-bottom:9px;border-radius:13px}
#toh-forecast-ui .tf-section-head{gap:12px;margin-bottom:11px}
#toh-forecast-ui .tf-step{width:29px;height:29px;font-size:15px}
#toh-forecast-ui .tf-section-title{font-size:16px}
#toh-forecast-ui .tf-section-subtitle{font-size:11px;margin-top:3px}
#toh-forecast-ui .tf-fields{gap:12px 14px;padding-left:41px}
#toh-forecast-ui label{font-size:12px}
#toh-forecast-ui input,#toh-forecast-ui select,#toh-forecast-ui textarea{min-height:39px;margin-top:5px;padding:8px 10px;font-size:13px;border-radius:8px}
#toh-forecast-ui .tf-hint{font-size:10px;margin-top:5px}
#toh-forecast-ui .tf-add{padding:9px 13px;font-size:12px;border-radius:8px}
#toh-forecast-ui .tf-table th{font-size:11px;padding:9px 7px}
#toh-forecast-ui .tf-table td{font-size:12px;padding:6px}
#toh-forecast-ui .tf-table input,#toh-forecast-ui .tf-table select{height:37px;min-height:37px;padding:6px;font-size:12px}
#toh-forecast-ui .tf-row-actions button{font-size:15px;padding:6px}
#toh-forecast-ui .tf-total{padding:8px 3px;margin-top:9px}
#toh-forecast-ui .tf-total strong{font-size:18px}
#toh-forecast-ui .tf-note-field{margin-left:41px}
#toh-forecast-ui textarea{min-height:60px}
#toh-forecast-ui .tf-footer{padding:12px 18px}
#toh-forecast-ui .tf-footer button{padding:10px 13px;font-size:12px}
#toh-forecast-ui input[name="created_on"]{background:#f2f5f3;color:#5b6c64;cursor:not-allowed}
#toh-forecast-ui input[name="created_on"]:focus{box-shadow:none;border-color:#d5e2dc}
@media(max-width:800px){#toh-forecast-ui .tf-header{padding:15px}#toh-forecast-ui .tf-content{padding:0 10px}#toh-forecast-ui .tf-fields{padding-left:0}#toh-forecast-ui .tf-note-field{margin-left:0}}

/* v3.3.2: plugin-only compact layout; entire popup scrolls, no sticky header/footer */
#toh-forecast-ui .tf-modal{display:block;overflow-y:auto;overflow-x:hidden;max-height:min(94vh,940px);width:min(990px,100%);scrollbar-gutter:stable}
#toh-forecast-ui .tf-header,#toh-forecast-ui .tf-footer{position:static!important;top:auto!important;bottom:auto!important}
#toh-forecast-ui .tf-content{overflow:visible;display:block;padding:0 14px 6px}
#toh-forecast-ui .tf-header{padding:15px 20px 13px;gap:11px}
#toh-forecast-ui .tf-brand{width:31px;height:33px;font-size:17px}
#toh-forecast-ui h2{font-size:18px}
#toh-forecast-ui .tf-header p{font-size:11px;margin-top:3px}
#toh-forecast-ui .tf-close{width:27px;height:27px;font-size:20px}
#toh-forecast-ui .tf-section{padding:11px;margin-bottom:8px}
#toh-forecast-ui .tf-step{width:25px;height:25px;font-size:13px}
#toh-forecast-ui .tf-section-title{font-size:14px}
#toh-forecast-ui .tf-section-subtitle{font-size:10px}
#toh-forecast-ui .tf-section-head{gap:9px;margin-bottom:8px}
#toh-forecast-ui .tf-fields{padding-left:34px;gap:9px 11px}
#toh-forecast-ui label{font-size:11px}
#toh-forecast-ui input,#toh-forecast-ui select,#toh-forecast-ui textarea{font-size:12px;min-height:34px;padding:7px 9px}
#toh-forecast-ui .tf-table th{font-size:10px;padding:7px 5px}
#toh-forecast-ui .tf-table td{font-size:11px;padding:5px}
#toh-forecast-ui .tf-table input,#toh-forecast-ui .tf-table select{font-size:11px;height:34px;min-height:34px}
#toh-forecast-ui .tf-add{font-size:11px;padding:8px 11px}
#toh-forecast-ui .tf-row-actions button{font-size:13px}
#toh-forecast-ui .tf-total strong{font-size:16px}
#toh-forecast-ui .tf-footer{display:flex;justify-content:flex-end;gap:9px;padding:10px 15px}
#toh-forecast-ui .tf-footer-right{display:flex;gap:9px}
#toh-forecast-ui .tf-footer button{font-size:11px;padding:9px 12px}
#toh-forecast-ui .tf-cancel{order:2}
#toh-forecast-ui .tf-product-picker{position:relative;min-width:0}
#toh-forecast-ui .tf-product-picker input[type=search]{margin:0;height:34px;min-height:34px}
#toh-forecast-ui .tf-product-results{display:none;position:absolute;top:calc(100% + 3px);left:0;width:max(100%,300px);max-width:min(470px,85vw);max-height:235px;overflow:auto;z-index:30;background:#fff;border:1px solid #c7dfd1;border-radius:9px;box-shadow:0 9px 24px #153b2730}
#toh-forecast-ui .tf-product-results.is-visible{display:block}
#toh-forecast-ui .tf-product-option{display:flex;flex-direction:column;align-items:flex-start;width:100%;border:0;border-bottom:1px solid #edf1ef;background:#fff;padding:9px 11px;text-align:left;font-size:12px;color:#173c2d}
#toh-forecast-ui .tf-product-option:hover,#toh-forecast-ui .tf-product-option:focus{background:#eaf8f0}
#toh-forecast-ui .tf-product-option strong{font-weight:650}
#toh-forecast-ui .tf-product-option small{font-size:10px;color:#72877c;margin-top:2px}
#toh-forecast-ui .tf-product-empty{padding:11px;color:#687d73;font-size:11px}
#toh-forecast-ui .tf-table-scroll{overflow-x:auto;overflow-y:visible}
@media(max-width:800px){
 #toh-forecast-ui .tf-fields{padding-left:0}
 #toh-forecast-ui .tf-footer{flex-direction:row;flex-wrap:wrap}
 #toh-forecast-ui .tf-footer-right{width:auto;flex:1;justify-content:flex-end}
 #toh-forecast-ui .tf-footer-right button{flex:0 1 auto}
}

#toh-forecast-ui>.tf-product-results{z-index:100;position:fixed;box-shadow:0 12px 30px #103b2c42}
#toh-forecast-ui .tf-table-scroll{overflow-x:auto}

/* v3.3.3: action buttons +15%, preserve footer order and non-sticky scroll */
#toh-forecast-ui .tf-footer button{font-size:12.65px;padding:10.35px 13.8px;min-height:40px}
#toh-forecast-ui .tf-footer .tf-cancel{order:2;font-size:12.65px;padding:10.35px 13.8px}
#toh-forecast-ui .tf-footer-right{order:1}

/* v3.3.4 — Forecast-only production detail modal */
#toh-forecast-detail,#toh-forecast-detail *{box-sizing:border-box}
#toh-forecast-detail{position:fixed;inset:0;z-index:2147483001;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(9,40,32,.63);font-family:Sarabun,Arial,sans-serif;color:#18362b}
#toh-forecast-detail .tfd-card{width:min(1050px,96vw);max-height:94vh;overflow-y:auto;background:#fff;border-radius:20px;box-shadow:0 22px 85px #081f1952}
#toh-forecast-detail .tfd-header{display:flex;gap:17px;align-items:center;padding:25px 30px 18px;border-bottom:1px solid #e8eeeb}
#toh-forecast-detail .tfd-icon{display:grid;place-items:center;flex:none;background:#078d58;color:#fff;font-size:22px;width:54px;height:54px;border-radius:11px}
#toh-forecast-detail .tfd-heading{min-width:0;flex:1}
#toh-forecast-detail h2{font-size:22px;font-weight:750;line-height:1.35;color:#14251e;margin:0;overflow-wrap:anywhere}
#toh-forecast-detail .tfd-heading p{font-size:13px;color:#60796f;margin:5px 0 0}
#toh-forecast-detail button{font-family:inherit;cursor:pointer}
#toh-forecast-detail .tfd-icon-close{border:0;background:#f1f6f3;border-radius:11px;width:38px;height:38px;font-size:25px;line-height:1;color:#294d3c}
#toh-forecast-detail .tfd-body{padding:20px 30px 0}
#toh-forecast-detail .tfd-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#toh-forecast-detail .tfd-info{display:flex;align-items:center;gap:14px;padding:15px 17px;border-radius:12px;background:#f3f7f5;min-width:0}
#toh-forecast-detail .tfd-info-icon{display:grid;place-items:center;width:37px;height:37px;flex:none;border-radius:50%;background:white;color:#08794e;font-size:19px}
#toh-forecast-detail .tfd-info-label{display:block;color:#637c70;font-size:12px;margin-bottom:4px}
#toh-forecast-detail .tfd-info strong{display:block;font-size:15px;font-weight:700;overflow-wrap:anywhere}
#toh-forecast-detail .tfd-highlight{background:#e9f8ef;border:1px solid #ccead7}
#toh-forecast-detail .tfd-highlight strong{color:#08764c}
#toh-forecast-detail .tfd-meta{display:flex;gap:9px;flex-wrap:wrap;margin:15px 0 20px}
#toh-forecast-detail .tfd-status,#toh-forecast-detail .tfd-confidence{display:inline-flex;align-items:center;padding:6px 11px;background:#eaf5ee;border-radius:99px;color:#13794d;font-size:12px;font-weight:650}
#toh-forecast-detail .tfd-confidence{background:#f2f6f4;color:#536d61}
#toh-forecast-detail h3{font-size:17px;font-weight:750;color:#18392b;margin:0 0 12px}
#toh-forecast-detail .tfd-products{margin-bottom:18px}
#toh-forecast-detail .tfd-table-wrap{overflow-x:auto;border:1px solid #e1eae5;border-radius:11px}
#toh-forecast-detail .tfd-table{border-collapse:collapse;width:100%;min-width:660px;font-size:13px}
#toh-forecast-detail .tfd-table th{background:#f2f6f4;font-weight:700;color:#2b4a3b;text-align:left;padding:13px 12px;border-bottom:1px solid #dfe9e4}
#toh-forecast-detail .tfd-table td{padding:13px 12px;border-bottom:1px solid #edf1ef}
#toh-forecast-detail .tfd-table td:nth-child(n+3),#toh-forecast-detail .tfd-table th:nth-child(n+3){text-align:right}
#toh-forecast-detail .tfd-product{display:flex;flex-direction:column;gap:3px}
#toh-forecast-detail .tfd-product small{color:#6d8277;font-size:11px}
#toh-forecast-detail .tfd-total{display:flex;justify-content:flex-end;align-items:center;gap:22px;background:#eaf7f0;color:#07633e;padding:17px 19px;border-radius:0 0 11px 11px;font-size:15px}
#toh-forecast-detail .tfd-total strong:last-child{font-size:22px}
#toh-forecast-detail .tfd-note{border:1px solid #e1ebe5;border-radius:12px;background:#f7faf8;padding:17px 19px;margin-bottom:23px}
#toh-forecast-detail .tfd-note h3{font-size:15px;margin-bottom:9px}
#toh-forecast-detail .tfd-note p{margin:0;padding:12px 14px;background:#eef4f1;border-radius:9px;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}
#toh-forecast-detail .tfd-footer{display:flex;justify-content:flex-end;gap:11px;padding:0 30px 24px}
#toh-forecast-detail .tfd-footer button{padding:12px 22px;border-radius:9px;font-size:13px;font-weight:650}
#toh-forecast-detail .tfd-print{background:white;border:1px solid #cbdad1;color:#20392e}
#toh-forecast-detail .tfd-close{background:#078d58;color:white;border:1px solid #078d58;min-width:110px}
#toh-forecast-detail .tfd-empty{text-align:center!important;color:#738b7f}
@media(max-width:650px){#toh-forecast-detail{padding:8px}#toh-forecast-detail .tfd-card{max-height:97vh}#toh-forecast-detail .tfd-header{padding:16px;gap:10px}#toh-forecast-detail .tfd-icon{width:40px;height:40px;font-size:17px}#toh-forecast-detail h2{font-size:17px}#toh-forecast-detail .tfd-body{padding:15px}#toh-forecast-detail .tfd-summary{grid-template-columns:1fr}#toh-forecast-detail .tfd-footer{padding:0 15px 16px}}
@media print{body>*:not(#toh-forecast-detail){display:none!important}#toh-forecast-detail{position:static;display:block;padding:0;background:#fff}#toh-forecast-detail .tfd-card{width:100%;max-height:none;box-shadow:none;overflow:visible}#toh-forecast-detail .tfd-icon-close,#toh-forecast-detail .tfd-footer{display:none!important}}

/* v3.3.5: compact detail view only; preserve form and workflow. */
#toh-forecast-detail .tfd-card{width:min(1000px,96vw);border-radius:17px}
#toh-forecast-detail .tfd-header{gap:12px;padding:18px 24px 14px}
#toh-forecast-detail .tfd-icon{width:40px;height:40px;font-size:17px;border-radius:9px}
#toh-forecast-detail h2{font-size:18px;line-height:1.4}
#toh-forecast-detail .tfd-heading p{font-size:11px;margin-top:4px}
#toh-forecast-detail .tfd-icon-close{width:29px;height:29px;min-width:29px;min-height:29px;flex:0 0 29px;padding:0;border:1px solid #d7e7dd;border-radius:50%;background:#f3f8f5;color:#285440;font-family:Arial,sans-serif;font-size:18px;font-weight:400;line-height:26px;display:grid;place-items:center;box-shadow:none}
#toh-forecast-detail .tfd-icon-close:hover{background:#e4f4eb;border-color:#a9d2ba}
#toh-forecast-detail .tfd-icon-close:focus-visible{outline:2px solid #078d58;outline-offset:2px}
#toh-forecast-detail .tfd-body{padding:15px 24px 0}
#toh-forecast-detail .tfd-summary{gap:10px}
#toh-forecast-detail .tfd-info{gap:11px;padding:11px 13px;border-radius:10px}
#toh-forecast-detail .tfd-info-icon{width:29px;height:29px;font-size:15px}
#toh-forecast-detail .tfd-info-label{font-size:11px;margin-bottom:3px}
#toh-forecast-detail .tfd-info strong{font-size:13px}
#toh-forecast-detail .tfd-meta{gap:7px;margin:12px 0 16px}
#toh-forecast-detail .tfd-status,#toh-forecast-detail .tfd-confidence{font-size:11px;padding:5px 9px}
#toh-forecast-detail h3{font-size:15px;margin-bottom:9px}
#toh-forecast-detail .tfd-products{margin-bottom:14px}
#toh-forecast-detail .tfd-table{font-size:12px}
#toh-forecast-detail .tfd-table th,#toh-forecast-detail .tfd-table td{padding:9px 10px}
#toh-forecast-detail .tfd-product small{font-size:10px}
#toh-forecast-detail .tfd-total{gap:15px;padding:12px 15px;font-size:13px}
#toh-forecast-detail .tfd-total strong:last-child{font-size:18px}
#toh-forecast-detail .tfd-note{padding:13px 15px;margin-bottom:16px}
#toh-forecast-detail .tfd-note h3{font-size:13px;margin-bottom:7px}
#toh-forecast-detail .tfd-note p{padding:10px 12px;font-size:12px}
#toh-forecast-detail .tfd-footer{gap:8px;padding:0 24px 18px}
#toh-forecast-detail .tfd-footer button{padding:9px 16px;font-size:12px}
@media(max-width:650px){
 #toh-forecast-detail .tfd-header{padding:13px;gap:9px}
 #toh-forecast-detail .tfd-icon{width:33px;height:33px;font-size:14px}
 #toh-forecast-detail h2{font-size:15px}
 #toh-forecast-detail .tfd-icon-close{width:27px;height:27px;min-width:27px;min-height:27px;flex-basis:27px;font-size:16px}
 #toh-forecast-detail .tfd-body{padding:12px}
 #toh-forecast-detail .tfd-footer{padding:0 12px 14px}
}

/* v3.3.6: production table more compact, only inside Forecast detail. */
#toh-forecast-detail .tfd-table{font-size:11px;min-width:590px}
#toh-forecast-detail .tfd-table th,#toh-forecast-detail .tfd-table td{padding:6px 8px;line-height:1.35}
#toh-forecast-detail .tfd-product{gap:1px}
#toh-forecast-detail .tfd-product strong{font-size:11px;font-weight:600;line-height:1.35}
#toh-forecast-detail .tfd-product small{font-size:9px}
#toh-forecast-detail .tfd-total{padding:9px 12px;font-size:12px}
#toh-forecast-detail .tfd-total strong:last-child{font-size:16px}
/* Admin-only removal action; no impact on other module tables. */
.forecast-page .tf-list-actions{text-align:center;white-space:nowrap}
.forecast-page .tf-list-delete{font:inherit;font-size:12px;padding:6px 11px;border:1px solid #f2c9c9;border-radius:7px;background:#fff8f8;color:#b42318;cursor:pointer}
.forecast-page .tf-list-delete:hover{background:#feeaea}
.forecast-page .tf-list-delete:disabled{opacity:.5;cursor:wait}
.forecast-page table td:first-child{font-weight:600}

/* v3.3.7: admin-only archive button in detail modal, not list */
#toh-forecast-detail .tfd-delete{margin-right:auto;background:#fff5f5;color:#a82424;border:1px solid #efc5c5}
#toh-forecast-detail .tfd-delete:hover{background:#ffe8e8}
#toh-forecast-detail .tfd-delete:disabled{opacity:.55;cursor:wait}
