:root{--navy:#102b3f;--navy2:#173d55;--ink:#1b2c38;--muted:#75818a;--line:#e5e9eb;--paper:#f6f8f8;--white:#fff;--teal:#277a76;--teal-soft:#e7f3f1;--amber:#b7791f;--amber-soft:#fff4df;--blue:#477ca4;--blue-soft:#eaf2f8;--violet:#7664a2;--violet-soft:#f0edf8;--green:#37836f;--shadow:0 4px 18px rgba(28,49,61,.045)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:'DM Sans','Noto Sans TC',sans-serif;font-size:14px}button,input,select{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh}.sidebar{width:248px;background:var(--navy);color:#eef4f5;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;padding:25px 16px 18px;z-index:5}.brand{display:flex;align-items:center;gap:12px;padding:0 11px 28px;text-decoration:none;color:inherit}.brand-mark{width:38px;height:38px;border:1px solid rgba(255,255,255,.35);border-radius:12px;display:grid;place-items:center;font-size:19px;font-weight:700;color:#d7c78d;background:rgba(255,255,255,.06)}.brand strong{display:block;font-size:15px;letter-spacing:.07em}.brand small{display:block;color:#9eb2bd;font-size:11px;margin-top:4px;letter-spacing:.05em}.nav-label{padding:5px 13px 11px;color:#7f9aa8;font-size:10px;letter-spacing:.15em}.nav-list{display:grid;gap:5px}.nav-item{border:0;background:transparent;color:#b9c8ce;width:100%;height:44px;border-radius:8px;text-align:left;padding:0 12px;display:flex;align-items:center;gap:12px;font-size:13px;transition:.15s}.nav-item:hover{background:rgba(255,255,255,.07);color:#fff}.nav-item.active{background:#24485d;color:#fff;box-shadow:inset 3px 0 #d5c485}.nav-icon{width:18px;text-align:center;font-size:18px;line-height:1;color:#9cb6c1}.nav-item.active .nav-icon{color:#e0d193}.nav-item i{margin-left:auto;font-size:9px;font-style:normal;color:#7894a0}.sidebar-foot{margin-top:auto;padding:16px 9px 0;border-top:1px solid rgba(255,255,255,.1)}.connection{display:flex;align-items:center;gap:10px}.connection strong,.connection small{display:block}.connection strong{font-size:11px;font-weight:600}.connection small{font-size:10px;color:#90a7b1;margin-top:4px}.pulse{width:8px;height:8px;border-radius:50%;background:#74b99d;box-shadow:0 0 0 4px rgba(116,185,157,.13)}.side-note{margin:15px 0 0 18px;color:#718b97;font-size:10px}.main-area{margin-left:248px;min-height:100vh}.topbar{height:65px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 40px;position:sticky;top:0;z-index:4}.crumb{font-size:12px;color:#849099;display:flex;gap:10px;align-items:center}.crumb b{font-weight:400;color:#c5cdd1}.crumb strong{font-weight:600;color:#324653}.top-actions{display:flex;align-items:center;gap:11px}.local-badge{font-size:10px;color:#62777e;background:#eff5f2;border:1px solid #dbe9e3;padding:6px 9px;border-radius:20px;display:flex;align-items:center;gap:6px}.local-badge span{width:6px;height:6px;border-radius:50%;background:#68a984}.avatar{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#e9e6d8;color:#625b3c;font-size:11px;font-weight:700}.profile-name{font-size:11px;color:#53636c}.view{display:none;padding:35px 40px 30px;max-width:1480px;margin:0 auto}.view.active{display:block}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:25px;gap:24px}.eyebrow{font-size:9px;letter-spacing:.16em;color:#8b989c;margin:0 0 8px;font-weight:700}.page-heading h1{font-size:28px;letter-spacing:-.04em;margin:0;color:#172f40;font-weight:600}.page-subtitle{font-size:12px;color:#7b8990;margin:8px 0 0}.heading-meta{display:flex;align-items:center;gap:9px}.date-chip,.status-chip{font-size:10px;color:#65757b;background:white;border:1px solid var(--line);padding:8px 11px;border-radius:7px}.status-chip{display:flex;align-items:center;gap:7px;color:#45816b}.status-dot{width:6px;height:6px;border-radius:50%;background:#65ad87}.notice{display:flex;align-items:center;gap:14px;background:#f2f6f5;border:1px solid #dfeae7;border-radius:9px;padding:15px 17px;margin-bottom:22px}.notice-icon{width:21px;height:21px;border-radius:50%;border:1px solid #8daea4;color:#628b7d;display:grid;place-items:center;font-family:serif;font-style:italic;font-size:12px;flex:none}.notice strong{font-size:12px;color:#3d5e55}.notice p{font-size:11px;line-height:1.7;color:#788780;margin:4px 0 0}.text-button{border:0;background:none;color:#3f7774;font-size:11px;margin-left:auto;white-space:nowrap}.text-button span{font-size:16px;padding-left:5px}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:20px}.metric-card,.panel{background:#fff;border:1px solid #e8ecee;border-radius:10px;box-shadow:var(--shadow)}.metric-card{padding:17px 18px 15px}.metric-label{font-size:11px;color:#75828a}.metric-value{font-size:30px;line-height:1.2;margin:11px 0 12px;font-weight:600;letter-spacing:-.04em;color:#193448}.metric-foot{display:flex;align-items:center;gap:8px;border-top:1px solid #f0f2f3;padding-top:10px;font-size:10px;color:#929da2}.metric-mark{width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px}.metric-mark.blue{background:var(--blue-soft);color:var(--blue)}.metric-mark.amber{background:var(--amber-soft);color:var(--amber)}.metric-mark.violet{background:var(--violet-soft);color:var(--violet)}.metric-mark.green{background:var(--teal-soft);color:var(--green)}.content-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,.9fr);gap:17px}.panel{padding:19px}.panel-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px}.panel-heading h2{font-size:14px;margin:0;color:#263b48;font-weight:600}.panel-heading p{font-size:10px;color:#8b969b;margin:5px 0 0}.soft-tag{background:#f2f5f6;color:#70828b;padding:5px 8px;border-radius:5px;font-size:9px}.flow-list{border-top:1px solid #eff1f2}.flow-row{display:flex;align-items:center;gap:13px;padding:14px 0;border-bottom:1px solid #eff1f2}.flow-no{font-size:10px;color:#a6b1b4;font-weight:600}.flow-copy{flex:1}.flow-copy strong,.flow-copy small{display:block}.flow-copy strong{font-size:11px;font-weight:600;color:#40515b}.flow-copy small{font-size:10px;color:#98a1a5;margin-top:4px}.flow-state{font-size:9px;border-radius:20px;padding:5px 8px;white-space:nowrap}.flow-state.pending{background:#f5f5ef;color:#8a855c}.flow-state.later{background:#f2f3f5;color:#899198}.side-panel{padding-bottom:14px}.quick-action{width:100%;display:flex;align-items:center;gap:11px;background:white;border:0;border-bottom:1px solid #eef1f1;padding:12px 1px;text-align:left;color:inherit}.quick-action:hover strong{color:var(--teal)}.quick-icon{width:30px;height:30px;border-radius:8px;background:#eaf2f8;color:#477ca4;display:grid;place-items:center;font-size:18px}.quick-icon.stock{background:#e8f3ef;color:#488671}.quick-icon.order{background:#fff3e2;color:#b17b2b}.quick-action>span:nth-child(2){flex:1}.quick-action strong,.quick-action small{display:block}.quick-action strong{font-size:11px;font-weight:600}.quick-action small{font-size:9px;color:#929da2;margin-top:4px}.quick-action>b{font-weight:400;color:#acb5b8}.target-domain{margin-top:17px;padding:12px;background:#f7f8f7;border-radius:7px}.target-domain small,.target-domain strong,.target-domain span{display:block}.target-domain small{font-size:9px;color:#919b9e}.target-domain strong{font-size:10px;color:#48615f;margin-top:6px}.target-domain span{font-size:9px;color:#a4acae;margin-top:4px}.page-foot{border-top:1px solid #e6eaeb;margin-top:22px;padding-top:13px;color:#a1abad;font-size:9px}.primary-button,.secondary-button{height:36px;border-radius:7px;padding:0 14px;font-size:11px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:7px}.primary-button{background:var(--navy2);border:1px solid var(--navy2);color:white}.primary-button:hover{background:#24516b}.primary-button span{font-size:16px;line-height:1}.secondary-button{border:1px solid #dce2e4;background:#fff;color:#5d6b71}.toolbar{display:flex;justify-content:space-between;align-items:center;margin:0 0 12px}.searchbox{height:36px;min-width:280px;border:1px solid #e1e6e8;background:#fff;border-radius:7px;display:flex;align-items:center;gap:8px;padding:0 11px}.searchbox>span{font-size:18px;color:#94a1a5}.searchbox input{border:0;outline:0;width:100%;font-size:11px;color:#344650}.searchbox input::placeholder{color:#aab3b6}.result-count{font-size:10px;color:#8b979b}.table-panel{padding:0;overflow:hidden}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:670px}th{text-align:left;background:#fafbfb;color:#859196;font-size:9px;font-weight:600;letter-spacing:.04em;padding:12px 16px;border-bottom:1px solid #e9edee;white-space:nowrap}td{padding:13px 16px;border-bottom:1px solid #f0f2f3;font-size:11px;color:#52636b;white-space:nowrap}tbody tr:last-child td{border-bottom:0}.align-right{text-align:right}.empty-cell{text-align:center!important;padding:38px 15px!important;color:#a3adaf!important}.table-footnote{font-size:10px;color:#909b9f;margin:10px 2px}.compact{margin-bottom:17px}.compact p{margin-top:3px}.history-panel{margin-top:17px;padding:17px 0 0}.history-panel .panel-heading{padding:0 19px}.history-panel table{min-width:760px}.history-panel th,.history-panel td{padding-left:13px;padding-right:13px}.modal{border:1px solid #e5e9ea;border-radius:12px;padding:0;width:min(520px,calc(100% - 28px));box-shadow:0 20px 80px rgba(15,35,47,.2);color:var(--ink)}.modal::backdrop{background:rgba(16,36,49,.45);backdrop-filter:blur(2px)}.modal form{padding:24px}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.modal-head h2{font-size:20px;margin:0;font-weight:600;color:#203a4b}.modal-head .eyebrow{margin-bottom:5px}.close-button{border:0;background:#f2f4f4;width:28px;height:28px;border-radius:50%;font-size:20px;color:#728087;line-height:1}.modal label{display:block;color:#5e6f76;font-size:10px;margin-bottom:13px}.modal input,.modal select{display:block;width:100%;height:37px;background:#fff;border:1px solid #dfe5e6;border-radius:6px;padding:0 10px;margin-top:6px;outline:none;font-size:11px;color:#334650}.modal input:focus,.modal select:focus{border-color:#7ea8a2;box-shadow:0 0 0 3px rgba(81,140,130,.1)}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-error{color:#b4473b;font-size:10px;min-height:15px;margin:0 0 5px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.wide-modal{width:min(650px,calc(100% - 28px))}.items-title{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f1;padding-bottom:9px;margin:0 0 10px;font-size:11px;color:#506168}.link-button{background:none;border:0;color:#367a75;font-size:10px}.order-line{display:grid;grid-template-columns:minmax(150px,1fr) 80px 100px 30px;gap:8px;align-items:end}.order-line button{height:34px;border:0;background:#f8eeee;color:#a86a63;border-radius:6px}.toast{position:fixed;right:25px;bottom:25px;background:#183c51;color:white;padding:12px 16px;border-radius:7px;font-size:11px;box-shadow:0 8px 30px #0e273633;opacity:0;transform:translateY(8px);pointer-events:none;transition:.2s;z-index:10}.toast.show{opacity:1;transform:translateY(0)}.state-pill{display:inline-flex;padding:4px 8px;background:#f3f5f5;border-radius:20px;color:#718087;font-size:9px}.positive{color:#37836f!important}.negative{color:#b3564d!important}
@media(max-width:1100px){.sidebar{width:215px}.main-area{margin-left:215px}.topbar{padding:0 26px}.view{padding:30px 26px}.metric-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.sidebar{width:60px;padding:16px 8px}.brand{padding:0 3px 24px}.brand>span:nth-child(2),.nav-label,.nav-item:not(.active),.nav-item.active{font-size:0}.nav-item{justify-content:center;padding:0}.nav-item .nav-icon{font-size:18px}.nav-item i{display:none}.connection{justify-content:center}.connection>span:last-child,.side-note{display:none}.main-area{margin-left:60px}.topbar{height:56px;padding:0 15px}.profile-name{display:none}.view{padding:24px 15px}.page-heading{align-items:flex-start;flex-direction:column;gap:15px}.heading-meta{align-self:flex-start}.page-heading h1{font-size:24px}.metric-grid{gap:9px}.metric-card{padding:13px}.metric-value{font-size:25px}.content-grid{grid-template-columns:1fr}.notice{align-items:flex-start}.text-button{display:none}.searchbox{min-width:0;width:75%}.form-row{grid-template-columns:1fr;gap:0}.order-line{grid-template-columns:1fr 60px 80px 28px}.table-panel{margin:0 -1px}}

.reference-table{padding:0}.reference-table .panel-heading{padding:19px 19px 0}.reference-table table{min-width:900px}.reference-table th,.reference-table td{white-space:normal;vertical-align:top}.reference-table td:first-child{min-width:220px}.reference-table td:nth-child(2){min-width:120px}.reference-table td:nth-child(3){min-width:190px}.reference-table td:nth-child(4){min-width:240px}.reference-purpose{display:block;color:#8b969b;font-size:10px;line-height:1.65;margin-top:5px}.state-missing{background:var(--amber-soft);color:var(--amber)}.document-use-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-top:17px}.document-use-grid .panel{padding:19px}.document-use-grid h2{font-size:14px;margin:12px 0 7px;color:#263b48}.document-use-grid p{font-size:11px;line-height:1.75;color:#718087;margin:0 0 12px}.document-use-grid small{font-size:10px;color:#8b979b}.document-audience{display:inline-flex;border-radius:20px;padding:5px 9px;font-size:9px}.document-audience.customer{background:var(--blue-soft);color:var(--blue)}.document-audience.internal{background:var(--teal-soft);color:var(--teal)}
@media(max-width:760px){.document-use-grid{grid-template-columns:1fr}.reference-table .panel-heading{padding:15px 15px 0}}
.heading-actions{display:flex;align-items:center;gap:8px}.section-table{margin-bottom:15px;padding:0;overflow:hidden}.section-table .panel-heading{padding:17px 18px 0}.section-table table{min-width:760px}.section-table th,.section-table td{vertical-align:middle}.small-button{height:29px;padding:0 9px;font-size:10px;white-space:nowrap}.small-button:disabled{cursor:not-allowed;opacity:.45}.modal textarea{display:block;width:100%;resize:vertical;min-height:55px;background:#fff;border:1px solid #dfe5e6;border-radius:6px;padding:8px 10px;margin-top:6px;outline:none;font:inherit;font-size:11px;color:#334650}.modal textarea:focus{border-color:#7ea8a2;box-shadow:0 0 0 3px rgba(81,140,130,.1)}.mailing-detail-table{min-width:740px}.mailing-detail-table td{white-space:normal}.mailing-detail-table .address-cell{min-width:190px;max-width:250px;line-height:1.6}.mailing-detail-table select,.mailing-detail-table input{height:32px;border:1px solid #dfe5e6;border-radius:6px;padding:0 7px;font-size:10px;background:#fff;color:#334650}.mailing-detail-table select{width:80px}.mailing-detail-table input{width:110px}
@media(max-width:760px){.heading-actions{width:100%}.heading-actions button{flex:1}.section-table .panel-heading{padding:14px 14px 0}}
.reference-search-panel{padding:0;overflow:hidden;margin-top:16px}.reference-search-panel .panel-heading{padding:18px 19px 0}.reference-search-panel .toolbar{padding:0 19px;gap:10px;justify-content:flex-start;flex-wrap:wrap}.reference-search-panel .searchbox{flex:1;min-width:220px}.reference-search-panel select{height:36px;max-width:230px;border:1px solid #e1e6e8;background:#fff;border-radius:7px;padding:0 9px;font-size:10px;color:#52636b}.reference-search-panel .result-count{margin-left:auto}.reference-results{min-width:850px}.reference-results td{white-space:nowrap}.reference-results td.reference-row-content{white-space:normal;min-width:440px;max-width:850px;line-height:1.75;overflow-wrap:anywhere}.reference-search-panel .empty-cell{white-space:normal}
@media(max-width:760px){.reference-search-panel .panel-heading{padding:14px 14px 0}.reference-search-panel .toolbar{padding:0 14px}.reference-search-panel .searchbox{width:100%;flex-basis:100%}.reference-search-panel select{max-width:none;flex:1}.reference-search-panel .result-count{margin-left:0}}
.catalog-layout{display:grid;grid-template-columns:minmax(235px,285px) minmax(0,1fr);gap:14px;align-items:start}.catalog-category-panel{padding:0;position:sticky;top:76px;max-height:calc(100vh - 92px);overflow:auto}.catalog-category-heading{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:15px 16px 12px;background:#fff;border-bottom:1px solid #edf0f1}.catalog-category-heading strong{font-size:12px;color:var(--ink)}.catalog-category-heading span{font-size:9px;color:#87939a}.catalog-all-button{display:flex;width:calc(100% - 20px);margin:10px;padding:9px 10px;border:1px solid #dce8e6;border-radius:6px;background:#f4f8f7;color:#315e5b;justify-content:space-between;font:inherit;font-size:10px;font-weight:600;text-align:left;cursor:pointer}.catalog-all-button.active,.catalog-category-pick.active{background:#e8f2ef;color:#205e58;border-color:#c6ded8}.catalog-all-button span,.catalog-category-pick small{color:#7c8a8d;font-size:9px}.catalog-category-tree{padding:0 10px 12px}.catalog-category-row{display:flex;align-items:center}.catalog-category-row .catalog-category-pick{min-width:0;padding-top:6px;padding-bottom:6px}.catalog-category-meta{display:flex;align-items:center;gap:3px;flex:0 0 auto}.category-expand{display:grid;place-items:center;width:18px;height:20px;margin:0;border:0;border-radius:4px;background:transparent;color:#65726c;font:inherit;font-size:12px;line-height:1;cursor:pointer}.category-expand:hover{background:#edf3f1;color:#263e36}.catalog-category-pick{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;width:100%;padding:7px 8px;border:1px solid transparent;border-radius:5px;background:transparent;color:#53636a;font:inherit;font-size:10px;line-height:1.45;text-align:left;cursor:pointer}.catalog-category-pick:hover{background:#f4f7f6}.catalog-category-pick span{overflow-wrap:anywhere}.catalog-category-pick small{flex:0 0 auto;white-space:nowrap}.catalog-category-children{margin-left:9px;padding-left:6px;border-left:1px solid #e6eceb}.catalog-products-panel{min-width:0;margin:0}.catalog-products-panel .table-wrap{max-height:calc(100vh - 170px);overflow:auto}.catalog-products-panel table{min-width:1100px}.catalog-products-panel thead{position:sticky;top:0;z-index:1}.catalog-products-panel td:nth-child(3){min-width:220px;max-width:340px;white-space:normal;line-height:1.6}.catalog-category-panel .empty-cell{padding:12px;white-space:normal;line-height:1.6}@media(max-width:1050px){.catalog-layout{grid-template-columns:minmax(210px,250px) minmax(0,1fr)}}@media(max-width:760px){.catalog-layout{grid-template-columns:1fr}.catalog-category-panel{position:static;max-height:300px}.catalog-products-panel .table-wrap{max-height:70vh}.catalog-category-heading{padding:12px 14px}}
.product-name-cell{min-width:230px;max-width:300px;white-space:normal!important;line-height:1.55}.product-name-cell a{color:var(--ink);text-decoration:none}.product-name-cell a:hover{text-decoration:underline}.product-thumbnail{width:38px;height:52px;object-fit:contain;float:left;margin:0 10px 4px 0;border:1px solid #e9edee;border-radius:4px;background:#fff}.product-name-cell strong{display:block;padding-top:3px}.product-name-cell::after{content:"";display:block;clear:both}
.product-name-cell .product-source-link{display:inline-block;margin-top:5px;color:#315f89;font-size:10px;font-weight:600;text-decoration:underline}.product-name-cell .product-source-missing{display:block;margin-top:5px;color:#9b5a40;font-size:10px}
.report-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:14px;margin-bottom:14px}.report-filters label{display:grid;gap:5px;min-width:118px;color:#718088;font-size:10px}.report-filters input,.report-filters select{height:36px;border:1px solid #dfe5e6;border-radius:6px;background:#fff;padding:0 9px;color:#334650;font-size:11px}.report-filters button{height:36px}.report-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.report-metric{padding:15px 17px}.report-metric small{display:block;color:#87939a;font-size:10px}.report-metric strong{display:block;margin-top:8px;color:var(--ink);font-size:21px}.report-tables{display:grid;grid-template-columns:1fr;gap:14px}.report-tables table{min-width:760px}.report-tables td{white-space:nowrap}@media(max-width:920px){.report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.report-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.report-filters label{flex:1 1 40%}.report-filters button{flex:1 1 100%}}

/* 商品分類側欄：沿用購書展示版的分層與數量／展開排列 */
.catalog-category-panel{background:#fdfcf8;border-color:#e7e3da;border-radius:4px}
.catalog-category-heading{background:#fdfcf8;border-bottom:0;padding:19px 18px 7px}
.catalog-category-heading strong{font:500 17px Georgia,"Noto Serif TC",serif;color:#283b34}
.catalog-category-heading span{font-size:10px;color:#8c938d}
.catalog-all-button{width:calc(100% - 28px);margin:4px 14px 6px;padding:9px 8px;border:0;border-bottom:1px solid #ece9e2;border-radius:0;background:transparent;color:#46554e;font-size:12px;font-weight:400}
.catalog-all-button.active{background:#f2f0e8;color:#896b39;border-color:#ece9e2}
.catalog-category-tree{padding:0 14px 14px}
.catalog-category-row{display:flex;align-items:center;min-height:36px;border-bottom:1px solid #efede7}
.catalog-category-root>.catalog-category-pick{font-weight:600}
.catalog-category-pick{flex:1;min-width:0;width:auto;padding:9px 6px;border:0;border-radius:0;color:#374a40;font-size:12px;line-height:1.45}
.catalog-category-pick:hover,.catalog-category-pick.active{background:#f5f2ea;color:#886634}
.catalog-category-count{flex:0 0 auto;margin-left:6px;color:#888f89;font-size:10px}
.category-expand{flex:0 0 24px;width:24px;height:30px;margin-left:2px;color:#78837a;font-size:15px}
.catalog-category-children{margin-left:8px;padding-left:12px;border-left:1px solid #e8e3d9}

/* 分類與商品明細面板等高，內容各自捲動 */
.catalog-layout{--catalog-panel-height:clamp(420px,calc(100vh - 170px),720px);align-items:stretch}
.catalog-category-panel,.catalog-products-panel{height:var(--catalog-panel-height);max-height:none;min-height:0;overflow:hidden}
.catalog-category-panel{display:flex;flex-direction:column}
.catalog-category-heading{flex:0 0 auto}
.catalog-all-button{flex:0 0 auto}
.catalog-category-tree{flex:1;min-height:0;overflow:auto}
.catalog-products-panel{display:flex;flex-direction:column}
.catalog-products-panel .table-wrap{flex:1;min-height:0;max-height:none;overflow:auto}
@media(max-width:760px){.catalog-layout{--catalog-panel-height:340px}.catalog-category-panel,.catalog-products-panel{height:var(--catalog-panel-height);max-height:none}.catalog-category-tree{max-height:none}.catalog-products-panel .table-wrap{height:100%;max-height:none}}

/* 庫存頁表格：收緊空白，整列資訊保持在同一個視窗寬度 */
#view-inventory .table-wrap{width:100%;overflow-x:hidden}
#view-inventory table{width:100%;min-width:0;table-layout:fixed}
#view-inventory th,#view-inventory td{padding:9px 7px;white-space:normal;overflow-wrap:anywhere;line-height:1.45;vertical-align:middle}
#view-inventory th{font-size:10px}
#view-inventory td{font-size:11px}
#view-inventory .inventory-compact-table th:nth-child(1){width:13%}
#view-inventory .inventory-compact-table th:nth-child(2){width:27%}
#view-inventory .inventory-compact-table th:nth-child(3){width:13%}
#view-inventory .inventory-compact-table th:nth-child(4){width:11%}
#view-inventory .inventory-compact-table th:nth-child(5){width:11%}
#view-inventory .inventory-compact-table th:nth-child(6){width:7%}
#view-inventory .inventory-compact-table th:nth-child(7){width:18%}
#view-inventory .movement-compact-table th:nth-child(1){width:18%}
#view-inventory .movement-compact-table th:nth-child(2){width:27%}
#view-inventory .movement-compact-table th:nth-child(3){width:10%}
#view-inventory .movement-compact-table th:nth-child(4){width:14%}
#view-inventory .movement-compact-table th:nth-child(5){width:9%}
#view-inventory .movement-compact-table th:nth-child(6){width:22%}
#view-inventory .inventory-compact-table td:nth-child(2) strong,#view-inventory .movement-compact-table td:nth-child(2) strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;max-height:2.9em;line-height:1.45;overflow:hidden;overflow-wrap:anywhere}
#view-inventory .state-pill{max-width:100%;white-space:normal;text-align:center;line-height:1.35}
@media(max-width:760px){#view-inventory th,#view-inventory td{padding:7px 4px;font-size:9px}#view-inventory th{font-size:9px}#view-inventory .state-pill{padding:3px 4px;font-size:9px}}

/* 庫存商品沿用商品主檔的左側分類與右側明細 */
#view-inventory .inventory-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:16px;align-items:stretch}
#view-inventory .inventory-category-panel,#view-inventory .inventory-products-panel{height:clamp(420px,calc(100vh - 170px),720px);min-height:0;overflow:hidden}
#view-inventory .inventory-category-panel{display:flex;flex-direction:column}
#view-inventory .inventory-category-panel .catalog-category-tree{flex:1;min-height:0;overflow:auto}
#view-inventory .inventory-other-button{border-top:1px solid #e7edec}
#view-inventory .inventory-products-panel{display:flex;flex-direction:column}
#view-inventory .inventory-products-panel .table-wrap{flex:1;min-height:0;overflow:auto}
#view-inventory .inventory-places{white-space:normal}
#view-inventory .inventory-source-category{display:block;color:#829095;margin-top:3px;font-size:9px;line-height:1.35}
#view-inventory .inventory-compact-table td:nth-child(3){line-height:1.35}
@media(max-width:900px){#view-inventory .inventory-layout{grid-template-columns:1fr}#view-inventory .inventory-category-panel{height:300px}#view-inventory .inventory-products-panel{height:clamp(420px,calc(100vh - 170px),720px)}}

/* 全站資料表格在區塊內適配寬度，長內容換行，只保留垂直捲動 */
.view,.panel,.table-panel,.section-table,.reference-table,.reference-search-panel,.catalog-layout,.inventory-layout{min-width:0;max-width:100%}
.view .table-wrap{width:100%;max-width:100%;overflow-x:hidden;overflow-y:auto}
.view table,.view .history-panel table,.view .reference-table table,.view .section-table table,.view .mailing-detail-table,.view .reference-results,.view .report-tables table,.view .catalog-products-panel table{width:100%;min-width:0;max-width:100%;table-layout:fixed}
.view th,.view td{min-width:0;max-width:none;white-space:normal;overflow-wrap:anywhere;word-break:normal;vertical-align:top}
.view .product-name-cell{min-width:0;max-width:none}
.view .reference-table td:first-child,.view .reference-table td:nth-child(2),.view .reference-table td:nth-child(3),.view .reference-table td:nth-child(4),.view .reference-results td.reference-row-content,.view .mailing-detail-table .address-cell{min-width:0;max-width:none;overflow-wrap:anywhere}
.view .report-tables td{white-space:normal}
.view .table-footnote{overflow-wrap:anywhere}
.view .table-wrap::-webkit-scrollbar:horizontal{height:0}
@media(max-width:760px){.view .table-wrap{overflow-x:hidden}.view table,.view .history-panel table,.view .reference-table table,.view .section-table table,.view .mailing-detail-table,.view .reference-results,.view .report-tables table,.view .catalog-products-panel table{min-width:0;table-layout:fixed}.view th,.view td{padding-left:6px;padding-right:6px;overflow-wrap:anywhere}}
.view .table-wrap{overflow-x:auto}
.view table{width:max-content;min-width:100%;max-width:none;table-layout:fixed}
.view th{position:relative}
.column-resizer{position:absolute;z-index:3;top:0;right:-3px;width:8px;height:100%;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}
.column-resizer::after{content:"";position:absolute;top:20%;bottom:20%;left:3px;width:2px;border-radius:2px;background:#c6d2d0}
.view th:hover .column-resizer::after,.column-resizer:focus-visible::after{background:#477f78;width:3px}
.order-import-panel{padding:18px;margin:0 0 16px;overflow:hidden}.order-import-panel>.panel-heading{padding:0;margin-bottom:14px}.order-import-panel h2{margin:0}.order-import-panel h3{margin:0 0 5px;font-size:16px;color:#243d4b}.order-import-panel .notice{margin:0 0 14px}.order-import-controls{align-items:end;margin:0}.order-import-controls label{min-width:180px}.order-import-controls input[type=file]{display:block;width:100%;margin-top:6px;font-size:12px}.order-import-controls select{height:36px;width:100%;border:1px solid #dfe5e6;border-radius:7px;background:#fff;padding:0 8px}.import-preview-heading{padding:14px 0 8px;margin:0}.order-import-preview-table{min-width:980px}.order-import-preview-table td small{display:block;margin-top:4px;color:#788790}.order-import-panel[hidden],.order-import-panel [hidden]{display:none}
.column-resizing,.column-resizing *{cursor:col-resize!important;user-select:none!important}
/* 商品主檔欄位標題略放大並可換行 */
#view-products .product-master-table thead th{font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;padding:12px 10px}
#view-inventory .inventory-compact-table thead th{font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere;padding:12px 10px}
/* 全站字級在原有層級基礎上統一增加 5% */
html{font-size:105%}

/* Quotation workflow */
.quotation-line{grid-template-columns:minmax(220px,2fr) minmax(90px,.55fr) minmax(120px,.7fr) minmax(105px,.65fr) 34px}.quotation-line-total{display:grid;gap:4px;padding-bottom:8px;color:#718087;font-size:10px}.quotation-line-total strong{color:#294b5c;font-size:12px}.quotation-draft-total{display:grid;gap:7px;margin:10px 0 14px;padding:12px 14px;background:#f5f8f7;border:1px solid #e1eae6;border-radius:8px}.quotation-draft-total>div{display:flex;justify-content:space-between;gap:12px;color:#617178;font-size:12px}.quotation-draft-total strong{color:#294b5c;font-variant-numeric:tabular-nums}.quotation-draft-grand-total{border-top:1px solid #dbe5e1;padding-top:8px;font-weight:700}.quotation-draft-grand-total strong{font-size:17px;color:#183749}.postal-rate-helper{display:grid;gap:10px;margin:12px 0;padding:13px 14px;background:#f8faf8;border:1px solid #e2e9e4;border-radius:8px}.postal-rate-helper>div:first-child strong{font-size:12px;color:#294b5c}.postal-rate-helper>div:first-child p,.postal-rate-feedback{margin:4px 0 0;color:#738087;font-size:10px;line-height:1.55}.postal-rate-controls{display:grid;grid-template-columns:1.1fr 1.25fr 1fr auto;align-items:end;gap:10px}.postal-rate-controls label{margin:0!important}.postal-rate-controls select{font-size:11px}.postal-rate-controls button{white-space:nowrap}.postal-rate-feedback{padding-top:8px;border-top:1px solid #e5ebe7}.quotation-document{background:#fff;border:1px solid #e4e9e9;border-radius:8px;padding:20px;margin:10px 0 18px}.quotation-company{display:grid;gap:5px;padding-bottom:14px;border-bottom:2px solid #345262;color:#65757a;font-size:12px}.quotation-company strong{font-size:19px;color:#1d3948}.quotation-meta{display:flex;gap:20px;flex-wrap:wrap;margin:16px 0;color:#54666d;font-size:12px}.quotation-document p{line-height:1.65}.quotation-total{display:grid;justify-items:end;gap:5px;margin-top:14px;color:#52646b}.quotation-total strong{font-size:18px;color:#183749}.quotation-actions{align-items:end;border-top:1px solid #e9edef;padding-top:15px;margin-top:12px}.quotation-actions label{min-width:120px}.quotation-footer-actions{flex-wrap:wrap}.quotation-converted{padding:10px;background:#edf5f1;color:#3f755f;border-radius:6px;font-weight:600}
.quotation-picker{display:grid;grid-template-columns:minmax(230px,29%) minmax(0,1fr);gap:14px;margin:8px 0 18px;min-height:280px}.quotation-category-panel{min-width:0;background:#f8faf9;border:1px solid #e8ecee;border-radius:8px;padding:12px}.quotation-picker-results{min-width:0;border:1px solid #e8ecee;border-radius:8px;padding:12px}.quotation-search{width:100%;min-width:0;margin-bottom:8px}.quotation-product-results{display:grid;gap:7px;max-height:320px;overflow:auto}.quotation-product-card{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px;border:1px solid #e8ecee;border-radius:7px;background:#fff}.quotation-product-card>img{width:52px;height:52px;object-fit:contain;background:#f4f5f3;border-radius:5px}.quotation-product-copy{min-width:0;display:grid;gap:3px}.quotation-product-copy strong{overflow-wrap:anywhere}.quotation-product-copy small{color:#7c898e;overflow-wrap:anywhere}.quotation-product-copy span{font-weight:600;color:#294b5c}.quotation-line>label:first-child{display:grid;gap:4px}.quotation-line>label:first-child strong{font-weight:600}.quotation-line>label small{font-size:10px;color:#76858b}.quotation-line .quotation-price-warning{color:#a36221!important}.catalog-all-button.active{background:#e8f0ed;color:#315d50}
@media(max-width:760px){.quotation-picker{grid-template-columns:1fr}.quotation-category-panel{max-height:230px;overflow:auto}.quotation-line{grid-template-columns:1fr 70px 100px 90px 28px}.quotation-line>label:first-child{grid-column:1/-1}.postal-rate-controls{grid-template-columns:1fr 1fr}.postal-rate-controls button{width:100%}.quotation-product-card{grid-template-columns:44px minmax(0,1fr) auto}.quotation-product-card>img{width:42px;height:42px}}
.quotation-picker{min-height:620px;align-items:stretch}.quotation-picker-results{min-height:620px}.quotation-product-results{min-height:520px;max-height:560px}.quotation-empty{margin:10px 0;border:1px dashed #d5dddf;border-radius:7px;padding:18px;text-align:center;color:#75828a}
@media(max-width:760px){.quotation-picker{min-height:0}.quotation-picker-results{min-height:460px}.quotation-product-results{min-height:380px;max-height:420px}}
.modal .quotation-picker-results .quotation-search{display:flex;align-items:center;gap:8px;width:100%;height:42px;min-height:42px;margin:0;padding:0 11px;border:1px solid #d7e0e1;border-radius:7px;background:#fff;box-sizing:border-box}.modal .quotation-picker-results .quotation-search>span{display:block;flex:none;margin:0;color:#829197;font-size:18px;line-height:1}.modal .quotation-picker-results .quotation-search input{display:block;flex:1;min-width:0;width:100%;height:30px;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:12px;line-height:1.4}.modal .quotation-picker-results .quotation-search input:focus{border:0;box-shadow:none}.quotation-hint{display:block;margin:9px 0 10px;padding:6px 0;color:#75848a;font-size:11px;line-height:1.5}.quotation-product-results{border:1px solid #dfe6e7;border-radius:8px;background:#fff;padding:10px;align-content:start}.quotation-product-results>.quotation-empty,.quotation-product-results>.empty-cell{display:flex;align-items:center;justify-content:center;min-height:480px;margin:0;text-align:center;color:#7c898e;line-height:1.6}.quotation-product-results>.quotation-empty{border:1px dashed #d7dfe0;border-radius:6px;background:#fbfcfb}
@media(max-width:760px){.quotation-product-results>.quotation-empty,.quotation-product-results>.empty-cell{min-height:350px}}
.quotation-hint[hidden]{display:none!important}.quotation-product-results>.quotation-empty{border:0;background:transparent}
.quotation-next-step{margin:4px 0 12px;padding:13px 15px;border:1px solid #b8d2c6;border-left:4px solid #3d806a;border-radius:7px;background:#edf6f1;color:#244f42;font-size:13px;font-weight:600;line-height:1.65}.quotation-feedback[hidden]{display:none!important}.quotation-feedback{position:sticky;top:0;z-index:3;margin:0 0 14px;padding:12px 14px;border:1px solid #d9aaa3;border-left:4px solid #b4473b;border-radius:7px;background:#fff2f0;color:#7f2f29;font-size:13px;font-weight:600;line-height:1.6;box-shadow:0 3px 10px rgba(35,50,55,.08)}.quotation-feedback.success{border-color:#a9cdbb;border-left-color:#3d806a;background:#edf6f1;color:#244f42}.quotation-actions{grid-template-columns:repeat(4,minmax(120px,1fr));gap:12px;align-items:end}.quotation-actions label{min-width:0;margin:0}.quotation-actions button{min-height:42px;white-space:normal;line-height:1.4}.quotation-footer-actions{padding-top:12px;border-top:1px solid #e9edef}.quotation-load-error{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 14px;padding:16px;background:#fff2f0;border:1px solid #d9aaa3;border-radius:8px;color:#7f2f29}.quotation-load-error strong{font-size:13px}.quotation-load-error span{grid-column:1;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.quotation-load-error button{grid-column:2;grid-row:1 / span 2}
  .quotation-audit-trail{margin:0 0 14px;padding:13px 16px;border:1px solid #cbd8df;border-left:4px solid #58788a;border-radius:8px;background:#f2f6f8;color:#263f4a;font-size:13px;line-height:1.6}.quotation-audit-trail>strong{display:block;margin-bottom:7px;font-size:14px}.quotation-audit-trail ol{margin:0;padding-left:22px}.quotation-audit-trail li{padding:4px 0}.quotation-audit-trail li strong{margin-right:8px}.quotation-audit-trail li span{overflow-wrap:anywhere}.quotation-audit-trail p{margin:0;color:#60737b}.quotation-field-note{display:block;margin-top:5px;color:#557064;font-size:12px;line-height:1.45}.quotation-actions input[readonly]{background:#eff3f1;color:#40584c;border-color:#b9cec1}.quotation-actions select:disabled{background:#eff3f1;color:#40584c;opacity:1}
  .quotation-list-panel{margin-top:18px}.quotation-archive-filters{display:flex;align-items:flex-end;gap:12px;padding:14px 16px;border-bottom:1px solid #e9edef}.quotation-archive-filters label{min-width:170px;margin:0}.quotation-archive-filters button{min-height:40px}.quotation-archive-filters input{width:100%}
  .quotation-outcome-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.quotation-outcome-grid .quotation-list-panel{min-width:0}.quotation-outcome-grid .table-wrap{max-width:100%}
.module-switch{display:flex;gap:4px;width:max-content;max-width:100%;margin:-10px 0 18px;border-bottom:1px solid #e1e7e8}.module-tab{min-height:38px;padding:0 15px;border:0;border-bottom:2px solid transparent;background:transparent;color:#75838a;font-size:12px}.module-tab:hover{color:#315c67;background:#f5f8f7}.module-tab.active{border-bottom-color:#367a75;color:#244f55;font-weight:600}
@media(max-width:900px){.quotation-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.quotation-actions{grid-template-columns:1fr}.quotation-load-error{grid-template-columns:1fr}.quotation-load-error span,.quotation-load-error button{grid-column:1;grid-row:auto}}
@media(max-width:560px){.quotation-archive-filters{align-items:stretch;flex-direction:column}.quotation-archive-filters label{min-width:0;width:100%}}
@media(max-width:900px){.quotation-outcome-grid{grid-template-columns:1fr}}
.quotation-actions{display:flex;flex-wrap:wrap;align-items:flex-end}.quotation-actions label{flex:1 1 145px}.quotation-actions button{flex:0 1 auto;min-width:130px}
.receipt-line{grid-template-columns:minmax(220px,1fr) 78px 150px 30px}.receipt-line>label{min-width:0}.receipt-product-field{margin-top:6px}.receipt-line .receipt-product-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;height:auto;min-height:38px;padding:7px 10px;border:1px solid #d7e0e1;border-radius:6px;background:#fff;color:#53646b;text-align:left;font-size:11px;line-height:1.45}.receipt-line .receipt-product-trigger:hover,.receipt-line .receipt-product-trigger.has-product{border-color:#9bb8ac;background:#f6faf7;color:#315d50}.receipt-product-name{min-width:0;overflow-wrap:anywhere}.receipt-picker-dialog{width:min(1120px,calc(100% - 28px));max-height:92vh;overflow:auto;padding:22px}.receipt-picker-dialog>.page-subtitle{margin:-10px 0 12px}.receipt-picker{height:clamp(390px,60vh,650px);min-height:0;margin:0 0 10px;grid-template-columns:minmax(230px,29%) minmax(0,1fr)}.receipt-picker .quotation-category-panel{display:flex;flex-direction:column;min-height:0;max-height:none;overflow:hidden;padding:0}.receipt-picker .catalog-category-heading{flex:none}.receipt-picker .catalog-all-button{flex:none}.receipt-picker .catalog-category-tree{flex:1;min-height:0;max-height:none;overflow:auto;padding:0 14px 14px}.receipt-picker .quotation-picker-results{display:flex;flex-direction:column;min-height:0;overflow:hidden}.receipt-picker .quotation-product-results{flex:1;min-height:0;max-height:none;overflow:auto}.receipt-picker .quotation-product-results>.quotation-empty{min-height:100%}.receipt-picker-card{grid-template-columns:minmax(0,1fr) auto}.receipt-picker-card .quotation-product-copy{gap:5px}.receipt-picker-card .secondary-button{min-width:72px;min-height:38px}.receipt-picker-dialog .modal-actions{margin-top:8px}
@media(max-width:760px){.receipt-line{grid-template-columns:minmax(0,1fr) 62px 84px 28px}.receipt-picker-dialog{padding:16px}.receipt-picker{height:auto;min-height:0;grid-template-columns:1fr}.receipt-picker .quotation-category-panel{height:230px}.receipt-picker .quotation-picker-results{height:48vh;min-height:320px}.receipt-picker .quotation-product-results{min-height:0}.receipt-picker-dialog>.page-subtitle{line-height:1.5}}
.auth-gate{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;overflow:auto;padding:24px;background:rgba(12,31,43,.72);backdrop-filter:blur(6px)}.auth-gate[hidden]{display:none!important}.auth-card{width:min(430px,100%);padding:30px;background:#fff;border:1px solid #e4e9e9;border-radius:14px;box-shadow:0 24px 80px rgba(8,24,35,.25)}.auth-brand{display:flex;align-items:center;gap:11px;margin-bottom:25px;color:#233d4b}.auth-brand strong,.auth-brand small{display:block}.auth-brand strong{font-size:14px;letter-spacing:.06em}.auth-brand small{margin-top:3px;color:#879398;font-size:10px}.auth-card h1{margin:0;color:#172f40;font-size:25px}.auth-card .page-subtitle{margin:8px 0 22px;line-height:1.65}.auth-card label{display:block;margin:0 0 13px;color:#53666e;font-size:11px}.auth-card input{display:block;width:100%;height:42px;margin-top:6px;padding:0 11px;border:1px solid #dce3e5;border-radius:7px;background:#fff;color:#243b48;font:inherit}.auth-card input:focus{outline:0;border-color:#7ea8a2;box-shadow:0 0 0 3px rgba(81,140,130,.12)}.auth-card [hidden]{display:none!important}.auth-submit{width:100%;height:42px;margin-top:4px}.auth-footnote{margin:15px 0 0;color:#8b979b;font-size:10px;line-height:1.6}.auth-card .form-error{min-height:0;margin:5px 0 9px}
.admin-users-table-wrap{max-height:220px;margin:14px 0;overflow:auto;border:1px solid #e8ecee;border-radius:8px}.admin-users-table-wrap table{min-width:620px}.admin-account-section{margin-top:18px;padding:16px;border:1px solid #e7ecec;border-radius:9px;background:#fbfcfb}.admin-account-section h3{margin:0 0 12px;color:#304954;font-size:13px}.admin-account-section form{display:grid;gap:8px}.admin-account-section label{display:block;min-width:0;margin:0 0 8px;color:#5e6f76;font-size:11px}.admin-account-section input{display:block;width:100%;height:38px;margin-top:6px;padding:0 10px;border:1px solid #dfe5e6;border-radius:6px;background:#fff;color:#334650;font:inherit}.admin-account-section .auth-footnote{margin:0 0 6px}.admin-account-section .modal-actions{margin-top:2px}
.document-history-list{display:grid;gap:8px;padding:10px 12px;border:1px solid #e5ebea;border-radius:8px;background:#fbfcfb}.document-history-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #e9eeee}.document-history-row:last-child{border-bottom:0}.document-history-row>span{display:grid;gap:4px;min-width:0}.document-history-row small,.field-note{color:#738188;font-size:11px;line-height:1.55;overflow-wrap:anywhere}.document-history-row .secondary-button{flex:none;min-height:34px;padding:0 10px}.document-history-list>p{margin:3px 0}.document-history-row[hidden]{display:none}
.reply-template-tools{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;margin:12px 0 6px;padding:12px;border:1px solid #dfe8e5;border-radius:8px;background:#f8faf9}.reply-template-tools label{margin:0}.reply-template-tools .secondary-button{min-height:40px}.reply-template-tools+.field-note{margin:4px 2px 12px}.reply-template-tools select{width:100%;min-height:40px;margin-top:6px;padding:8px 10px;border:1px solid #d7e0e1;border-radius:6px;background:#fff;color:#344953;font:inherit}@media(max-width:620px){.reply-template-tools{grid-template-columns:1fr}.reply-template-tools .secondary-button{width:100%}}
.message-send-panel{margin-top:14px;padding:14px;border:1px solid #dce7e3;border-radius:8px;background:#f8faf9}.message-send-panel .panel-heading{margin:0 0 8px}.message-send-panel .panel-heading h3{margin:0 0 4px;font-size:14px}.message-send-panel .panel-heading p{margin:0;color:#718087;font-size:11px;line-height:1.55}.message-send-panel .reference-purpose{margin:8px 0;color:#48606a}.message-send-panel .form-row{margin:8px 0}.message-send-panel .secondary-button{min-height:38px}
.message-draft-preview{display:-webkit-box;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.45}
#quotation-form textarea[name="inquiry_text"]{min-height:180px;line-height:1.55}
.purchase-history-panel{margin-bottom:17px}.purchase-history-toolbar{gap:12px;align-items:center}.purchase-history-toolbar .searchbox{flex:1;min-width:240px}.purchase-history-toolbar select{max-width:min(460px,48%);height:36px;border:1px solid #e1e6e8;background:#fff;border-radius:7px;padding:0 10px;color:#344650;font-size:11px}.purchase-history-table{table-layout:fixed;min-width:0}.purchase-history-table th,.purchase-history-table td{padding:9px 10px;white-space:normal;overflow-wrap:anywhere;vertical-align:top}.purchase-history-table th:nth-child(1){width:12%}.purchase-history-table th:nth-child(2){width:9%}.purchase-history-table th:nth-child(3){width:22%}.purchase-history-table th:nth-child(4){width:17%}.purchase-history-table th:nth-child(5){width:8%}.purchase-history-table th:nth-child(6){width:18%}.purchase-history-table th:nth-child(7){width:14%}.purchase-history-sub{display:block;margin-top:4px;color:#8b979b;font-size:10px;line-height:1.45}.purchase-history-pager{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;color:#77868d;font-size:11px}.purchase-history-pager>div{display:flex;gap:8px}.purchase-history-pager .secondary-button{height:32px}@media(max-width:760px){.purchase-history-toolbar{align-items:stretch;flex-direction:column}.purchase-history-toolbar .searchbox,.purchase-history-toolbar select{width:100%;max-width:none}.purchase-history-table th,.purchase-history-table td{padding:7px 5px;font-size:10px}.purchase-history-table th:nth-child(1){width:14%}.purchase-history-table th:nth-child(2){width:12%}.purchase-history-table th:nth-child(3){width:22%}.purchase-history-table th:nth-child(4){width:15%}.purchase-history-table th:nth-child(5){width:9%}.purchase-history-table th:nth-child(6){width:16%}.purchase-history-table th:nth-child(7){width:12%}}
.historical-phone-panel{margin-top:18px}.historical-phone-toolbar{display:flex;align-items:center;gap:14px;padding:12px 16px;border-bottom:1px solid #e8edef}.historical-phone-toolbar .searchbox{flex:1;min-width:260px}.historical-phone-table{table-layout:fixed;min-width:0}.historical-phone-table th,.historical-phone-table td{padding:9px 8px;white-space:normal;overflow-wrap:anywhere;vertical-align:top}.historical-phone-table th:nth-child(1){width:17%}.historical-phone-table th:nth-child(2){width:11%}.historical-phone-table th:nth-child(3){width:11%}.historical-phone-table th:nth-child(4){width:16%}.historical-phone-table th:nth-child(5){width:23%}.historical-phone-table th:nth-child(6){width:14%}.historical-phone-table th:nth-child(7){width:8%}.historical-phone-sub{display:block;margin-top:4px;color:#7c8b90;font-size:10px;line-height:1.45}.historical-phone-content{white-space:pre-wrap!important;line-height:1.5}.historical-phone-pager{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;color:#77868d;font-size:11px}.historical-phone-pager>div{display:flex;gap:8px}.historical-phone-pager .secondary-button{min-height:34px}.historical-phone-detail-body{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:60vh;overflow:auto;padding:12px;border:1px solid #e5ebea;border-radius:8px;background:#fbfcfb}.historical-phone-detail-row{min-width:0;padding:9px 10px;border:1px solid #e8eded;border-radius:6px;background:#fff}.historical-phone-detail-row strong,.historical-phone-detail-row span{display:block;overflow-wrap:anywhere;white-space:pre-wrap;line-height:1.5}.historical-phone-detail-row strong{margin-bottom:4px;color:#52646c;font-size:11px}.historical-phone-detail-row span{color:#263c47;font-size:12px}.historical-phone-detail-dialog{max-width:100%}@media(max-width:760px){.historical-phone-toolbar{align-items:stretch;flex-direction:column}.historical-phone-toolbar .searchbox{width:100%;min-width:0}.historical-phone-table th,.historical-phone-table td{padding:7px 5px;font-size:10px}.historical-phone-table th:nth-child(1){width:16%}.historical-phone-table th:nth-child(2){width:13%}.historical-phone-table th:nth-child(3){width:12%}.historical-phone-table th:nth-child(4){width:17%}.historical-phone-table th:nth-child(5){width:21%}.historical-phone-table th:nth-child(6){width:13%}.historical-phone-table th:nth-child(7){width:8%}.historical-phone-detail-body{grid-template-columns:1fr}}

/* Subscription application and quotation references */
.subscription-quote-reference{display:grid;gap:10px;margin:14px 0;padding:15px;border:1px solid #dce7e3;border-radius:8px;background:#f8faf9}
.subscription-quote-reference>div:first-child strong{color:#294b5c;font-size:13px}
.subscription-quote-reference>div:first-child p{margin:5px 0 0;color:#718087;font-size:11px;line-height:1.6}
.subscription-quote-reference .form-row{margin:0}
.subscription-quote-reference label{margin:0}
.subscription-quote-reference select{width:100%;min-height:38px;margin-top:6px;padding:7px 10px;border:1px solid #d7e0e1;border-radius:6px;background:#fff;color:#344953;font:inherit}
.subscription-fee-preview{display:block;min-height:38px;margin-top:6px;padding:8px 10px;border:1px solid #e0e8e5;border-radius:6px;background:#fff;color:#294b5c;font-weight:700}
.subscription-quote-reference .field-note{margin:0}
.subscription-quote-reference .secondary-button{justify-self:start}
.subscription-address,.subscription-sub{display:block;margin-top:4px;color:#738188;font-size:10px;line-height:1.45;overflow-wrap:anywhere}
.subscription-table{width:100%;min-width:0;table-layout:fixed}
.subscription-table th,.subscription-table td{padding:9px 7px;white-space:normal;vertical-align:top;overflow-wrap:anywhere}
.subscription-table th:nth-child(1){width:11%}.subscription-table th:nth-child(2){width:13%}.subscription-table th:nth-child(3){width:14%}.subscription-table th:nth-child(4){width:10%}.subscription-table th:nth-child(5){width:24%}.subscription-table th:nth-child(6){width:12%}.subscription-table th:nth-child(7){width:7%}.subscription-table th:nth-child(8){width:9%}
@media(max-width:760px){.subscription-quote-reference .form-row{grid-template-columns:1fr}.subscription-table th,.subscription-table td{padding:7px 4px;font-size:10px}.subscription-table th:nth-child(1){width:12%}.subscription-table th:nth-child(2){width:13%}.subscription-table th:nth-child(3){width:14%}.subscription-table th:nth-child(4){width:10%}.subscription-table th:nth-child(5){width:24%}.subscription-table th:nth-child(6){width:11%}.subscription-table th:nth-child(7){width:7%}.subscription-table th:nth-child(8){width:9%}}
.subscription-filter-label{display:grid;gap:5px;min-width:180px;color:#5e6f76;font-size:11px}.subscription-filter-label select{min-width:0}
.subscription-filter-explainer{margin:-6px 0 12px;padding:9px 12px;border-left:3px solid #8daea3;background:#f5f8f6;color:#5d6d71;font-size:11px;line-height:1.6}
.subscription-note{white-space:pre-wrap;overflow-wrap:anywhere;color:#52646c}
.subscription-evidence{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:14px 16px;color:#52646c;font-size:12px;line-height:1.6}
.subscription-evidence span{padding:11px 13px;border:1px solid #e5ece9;border-radius:7px;background:#fbfcfb;overflow-wrap:anywhere}
.subscription-evidence strong{display:block;margin-bottom:4px;color:#294b5c}
.subscription-issues{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:8px}
.subscription-issue-control{display:grid;grid-template-columns:auto minmax(90px,1fr);align-items:center;gap:5px;color:#52646c;font-size:10px}
.subscription-issue-control select{min-width:0;width:100%;height:29px;padding:3px 5px;border:1px solid #d7e0e1;border-radius:5px;background:#fff;color:#344953;font:inherit}
.subscription-issue-control select:focus{outline:2px solid #93afa4;outline-offset:1px}
.subscription-note-analysis{margin-top:6px;padding:6px 7px;border:1px solid #e3eae7;border-radius:6px;background:#fbfcfb;color:#465b63;font-size:10px;line-height:1.5}
.subscription-note-analysis summary{cursor:pointer;color:#34566a;font-weight:700}
.subscription-note-analysis ul{margin:6px 0 0;padding-left:16px}
.subscription-note-analysis li+li{margin-top:3px}
.subscription-issue-control small{grid-column:1/-1;color:#7a8588;overflow-wrap:anywhere}
@media(max-width:1000px){.subscription-evidence{grid-template-columns:1fr}.subscription-issues{grid-template-columns:1fr}}
