@import url('./fonts.css');
:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC","Noto Sans JP",sans-serif;color:#203632;background:#f5f7f6;font-size:14px;--green:#17664f;--ink:#203632;--muted:#74847e;--line:#e3e9e5}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:8px;padding:11px 17px;font-weight:600;transition:background .18s,transform .18s}button:disabled{opacity:.5;cursor:wait}button:hover:not(:disabled){filter:brightness(.95)}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #73ac93;outline-offset:3px}a{color:inherit;text-decoration:none}h1,h2,h3,p{margin-top:0}h1{font-size:30px;letter-spacing:-.9px;line-height:1.4;margin-bottom:8px}h2{font-size:18px;letter-spacing:-.3px}p{line-height:1.8}.layout{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:245px;padding:34px 22px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:5}.brand{display:flex;align-items:center;gap:12px;font-size:18px;font-weight:750;letter-spacing:-.5px;margin:0 4px 45px}.brand small{display:block;font-size:11px;font-weight:500;color:var(--muted);letter-spacing:1px;margin-top:4px}.brand-mark{display:grid;place-content:center;background:var(--green);color:white;font-size:29px;width:42px;height:44px;border-radius:10px;position:relative}.brand-mark span{font-size:13px;position:absolute;right:5px;top:3px}.sidebar-label{font-size:11px;color:#8d9891;letter-spacing:1.5px;margin:0 14px 14px}nav{display:grid;gap:6px}nav button{padding:14px 15px;display:flex;text-align:left;align-items:center;background:transparent;color:#6c7b74;font-size:14px;font-weight:500;gap:14px}nav button.selected{color:var(--green);background:#e9f3ec;font-weight:650}.nav-icon{font-size:20px;width:20px;text-align:center}.nav-arrow{margin-left:auto;opacity:.5}.sidebar-bottom{margin-top:auto;font-size:10px;letter-spacing:1.7px;color:#85948c;padding:30px 12px 0}.sidebar-bottom small{display:block;letter-spacing:0;font-size:10px;margin-top:12px}.connection-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#75a089;margin-right:8px}.main{margin-left:245px;flex:1;min-width:0}header{height:78px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid var(--line);padding:0 38px;gap:15px}.breadcrumb{color:#63756c;font-size:12px}.breadcrumb span{margin:0 12px;color:#c1cac5}.header-tools{display:flex;align-items:center;gap:18px}.language{display:flex;align-items:center;gap:7px}.language>span{font-size:21px;color:#678071}.language select{width:112px;border:none;background:transparent;padding:8px 0;font-size:12px}.user-email{font-size:12px;color:#63766b;max-width:190px;overflow:hidden;text-overflow:ellipsis}.primary{color:#fff;background:var(--green);box-shadow:0 3px 8px #17664f12}.secondary{background:white;border:1px solid #d3ded7;color:#315846}.text-button{color:#617e6b;background:transparent}.danger{color:#b65748}.small{padding:7px 10px;font-size:12px}.wide{width:100%}.icon-button{padding:5px 10px;font-size:21px;font-weight:400;color:#829187;background:transparent}.muted{color:var(--muted);font-size:13px}main{max-width:1420px;padding:38px 42px;min-height:calc(100vh - 130px);margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:26px}.page-heading p{color:var(--muted);font-size:13px;margin-bottom:0;max-width:740px}.eyebrow{display:block;font-size:10px;letter-spacing:2px;color:#729383;font-weight:650;margin-bottom:10px}.panel{background:white;border:1px solid var(--line);border-radius:12px;margin-bottom:23px;overflow:hidden;padding:25px}.panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px;gap:12px}.panel-heading h2{margin:0}.narrow{max-width:780px}.welcome-banner{border-radius:14px;padding:30px 35px;background:#e8f0e7;display:flex;align-items:center;justify-content:space-between;border:1px solid #dce6d9;margin-bottom:26px}.welcome-banner h2{font-size:25px;margin-bottom:8px}.welcome-banner p{color:#688574;margin-bottom:0;font-size:13px}.banner-icon{font-size:65px;width:95px;height:95px;text-align:center;background:#dae7d6;color:#367858;border-radius:50%;font-weight:200}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:28px}.stats.four{grid-template-columns:repeat(4,1fr)}.stat{border:1px solid var(--line);background:white;border-radius:12px;padding:24px}.stat>span{font-size:12px;color:#788b7e}.stat strong{display:block;font-size:35px;letter-spacing:-1.3px;font-weight:650;margin-top:12px}.stat small{font-size:11px;color:#a2ada4;font-weight:400;letter-spacing:0;margin-left:12px}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px;text-align:left}th{background:#f7f9f7;color:#8b998f;font-size:11px;font-weight:500;white-space:nowrap}td,th{padding:16px 13px;border-bottom:1px solid #edf0ed;vertical-align:middle}tbody tr:last-child td{border-bottom:0}td strong{font-weight:600}td small{display:block;color:#8b9a8f;font-size:11px;line-height:1.7;margin-top:4px}.number{font-size:17px;font-variant-numeric:tabular-nums;font-weight:600}.notes-cell{max-width:250px;min-width:90px;overflow-wrap:anywhere;font-size:12px;color:#7c8b80;white-space:pre-wrap}.actions{display:flex;gap:6px;white-space:nowrap}.badge{padding:6px 10px;border-radius:5px;display:inline-block;font-size:11px;white-space:nowrap;color:#87948d;background:#f0f3f1}.badge.pending{background:#fff5df;color:#9d812f}.badge.confirmed,.badge.matched,.badge.active{color:#397b57;background:#eaf5eb}.badge.shortage{color:#ac8235;background:#fff2d8}.badge.unmatched{color:#a56859;background:#faece7}.chip{display:inline-block;font-size:11px;margin:3px 4px 3px 0;background:#f1f5f0;padding:5px 8px;border-radius:4px;color:#68836d}.empty{text-align:center;padding:55px 15px;color:#8c9a90}.empty-icon{display:block;font-size:40px;color:#a3baab;margin-bottom:10px}.empty h3{font-weight:500;font-size:15px;margin:8px}.empty p{font-size:12px;margin:0}.field{display:flex;flex-direction:column;gap:8px;min-width:0}.field>span{color:#5d7465;font-size:12px;font-weight:600}input,select,textarea{border:1px solid #dce4dc;border-radius:7px;background:#fff;color:#365441;padding:11px 12px;min-width:0;width:100%;outline:none}input::placeholder{color:#a5afa7;font-size:11px}textarea{resize:vertical}select[multiple]{padding:6px}select[multiple] option{padding:5px 8px;border-radius:4px;margin-bottom:2px}select[multiple] option:checked{background:#ddecdf;color:#205e3c}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:20px}.full{grid-column:1/-1}.draft-row{background:white;border:1px solid var(--line);border-radius:12px;padding:22px 25px;margin-bottom:18px}.row-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px;border-bottom:1px solid #edf1ec;padding-bottom:10px;color:#7b9180;font-size:11px;font-weight:600;letter-spacing:1px}.form-footer{display:flex;justify-content:flex-end;gap:14px;margin-top:22px}.form-footer>.secondary{margin-right:auto}.contact-row{display:flex;gap:15px;align-items:flex-end;margin-bottom:18px}.contact-row .field{flex:1}.contact-row .icon-button{margin-bottom:4px}.notice{border:1px solid #dce8dc;background:#eff6ef;padding:15px 18px;border-radius:8px;font-size:12px;color:#5c7e60;line-height:1.8;margin-bottom:20px;overflow-wrap:anywhere}.notice p{margin:5px 0}.notice.warning{background:#fff8e9;border-color:#f0e5c7;color:#9b803b}.filter-panel{padding:20px 25px}.filter-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.filter-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:15px}.upload-panel{display:grid;grid-template-columns:1.2fr 1fr;gap:30px;background:#f9fbf7;border-style:dashed}.upload-panel h2{margin-bottom:8px}.upload-panel p{color:#7c8d7a;font-size:12px;margin-bottom:10px}.upload-panel small{font-size:11px;color:#82917d;line-height:1.7}.upload-controls{display:flex;flex-direction:column;gap:12px;align-items:flex-start}.upload-controls input{background:white;font-size:11px}.upload-controls img{max-width:160px;max-height:120px;object-fit:contain}.warning-text{color:#a28537!important}.source{font-size:11px;color:#8d997f;margin:14px 0 0}.tabs{display:flex;gap:8px;margin-bottom:17px;flex-wrap:wrap}.tabs button{padding:8px 13px;background:transparent;color:#91a090;font-size:12px}.tabs button.selected{background:#eaf2e8;color:#487350}.modal-backdrop{position:fixed;inset:0;background:#18342775;z-index:20;display:flex;align-items:center;justify-content:center;padding:22px;backdrop-filter:blur(3px)}.modal{background:#fff;border:1px solid #dbe4da;border-radius:14px;max-width:820px;width:100%;max-height:90vh;overflow-y:auto;padding:28px;box-shadow:0 18px 80px #112b3740}.modal-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.modal-heading h2{margin:0}.modal .draft-row{border:0;padding:0}.modal .field{margin-bottom:16px}.modal .form-grid .field{margin-bottom:0}.modal .form-grid{margin-bottom:20px}.modal .notice{margin-top:16px}.checkbox{display:flex;align-items:center;gap:10px;margin-top:20px}.checkbox input{width:auto}.match-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;background:#f5f8f2;border-radius:10px;padding:18px}.match-summary span{display:block;font-size:11px;color:#899881;margin-bottom:9px}.match-summary strong{font-size:14px;font-weight:600}.allocation-total{text-align:right;margin-top:18px;color:#6e896c}.modal pre{max-width:500px;font-size:11px;white-space:pre-wrap;overflow-wrap:anywhere}pre{max-width:500px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:11px}.auth-layout{display:grid;grid-template-columns:1.05fr 1fr;gap:60px;align-items:center;max-width:1000px;margin:50px auto}.auth-intro h1{font-size:38px;max-width:400px;line-height:1.55;margin:20px 0;color:#24452e}.auth-intro p{color:#82917a;max-width:390px;font-size:14px}.auth-card{padding:35px;max-width:420px;box-shadow:0 15px 60px #39573408}.auth-card .field{margin:25px 0}.auth-card h2{font-size:26px;margin-bottom:10px}.auth-card .primary{margin-top:10px}.auth-card .text-button{margin-top:12px;font-size:12px}.network-visual{position:relative;margin:35px 0 0;width:320px;height:245px;border:1px solid #dce5d7;border-radius:50%}.network-visual:before{content:"";position:absolute;inset:35px;border:1px dashed #cfdccc;border-radius:50%}.network-node{position:absolute;left:135px;top:85px;width:52px;height:52px;display:grid;place-content:center;font-size:32px;border-radius:14px;background:#397c53;color:#fff;box-shadow:0 12px 30px #53834b30}.orbit{position:absolute;border-radius:10px;display:grid;place-content:center;background:#f8fbf7;border:1px solid #d9e4d5;width:40px;height:40px;font-size:12px;color:#7d9975}.o1{top:12px;left:95px}.o2{right:-6px;top:108px}.o3{left:22px;bottom:18px}.network-caption{position:absolute;bottom:-25px;font-size:8px;letter-spacing:2px;left:34px;color:#85997a}footer{padding:0 42px 18px;font-size:10px;color:#9aa597}footer span{margin:0 10px}#toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);background:#24583a;color:white;padding:14px 24px;border-radius:9px;box-shadow:0 6px 30px #0002;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:50;font-size:13px;max-width:90vw}#toast.visible{opacity:1;transform:translate(-50%,0)}#toast.error{background:#9f554a}
@media(min-width:1500px){main{padding-top:48px}}@media(max-width:1100px){.sidebar{width:210px;padding:28px 15px}.main{margin-left:210px}header{padding:0 25px}main{padding:30px 25px}.user-email{display:none}.auth-layout{gap:25px}.auth-intro h1{font-size:31px}.stats{gap:12px}.stat{padding:20px}.page-heading{align-items:flex-start}}@media(max-width:760px){.layout{display:block}.sidebar{position:relative;width:100%;padding:18px 18px 10px;border-right:0;border-bottom:1px solid var(--line)}.brand{margin:0 0 16px;font-size:17px}.brand-mark{height:36px;width:35px;font-size:24px}.brand small{font-size:10px}.sidebar-label,.sidebar-bottom,.nav-arrow{display:none}nav{display:flex;gap:5px;overflow:auto}nav button{font-size:11px;gap:6px;padding:10px 11px;white-space:nowrap}.nav-icon{font-size:16px;width:auto}.main{margin-left:0}header{height:57px;padding:0 18px}.breadcrumb{font-size:10px}.breadcrumb span{margin:0 5px}.header-tools{gap:7px}.language select{font-size:11px;width:95px}.header-tools button{padding:7px;font-size:11px}main{padding:23px 18px;min-height:calc(100vh - 230px)}h1{font-size:25px}.page-heading{gap:12px}.page-heading>button{font-size:11px;padding:10px;white-space:nowrap}.page-heading p{font-size:12px}.eyebrow{font-size:8px;letter-spacing:1.5px}.welcome-banner{padding:22px}.welcome-banner h2{font-size:20px}.banner-icon{font-size:40px;width:64px;height:64px;flex-shrink:0;margin-left:15px}.stats{gap:9px}.stat{padding:15px 11px}.stat>span{font-size:10px}.stat strong{font-size:28px}.stat small{display:none}.stats.four{grid-template-columns:repeat(2,1fr)}.panel{padding:18px}.form-grid,.filter-grid{grid-template-columns:1fr 1fr;gap:14px}.draft-row{padding:18px}.field>span{font-size:11px}.upload-panel{display:block}.upload-controls{margin-top:17px}.contact-row{flex-wrap:wrap;gap:9px;position:relative;padding-right:27px}.contact-row .field{flex-basis:100%}.contact-row .icon-button{position:absolute;right:0;bottom:6px}.modal{padding:20px}.modal-backdrop{padding:12px}.match-summary{grid-template-columns:repeat(2,1fr)}.auth-layout{display:block;margin:10px auto}.auth-intro h1{font-size:28px;max-width:none;margin:12px 0}.auth-intro p{font-size:12px}.network-visual{display:none}.auth-card{max-width:none;margin-top:25px;padding:25px}.auth-card h2{font-size:23px}footer{padding:0 18px 18px;line-height:1.7}.form-footer .primary{font-size:12px}.form-footer{gap:8px}.tabs{gap:2px}.tabs button{padding:7px 9px;font-size:11px}td,th{padding:12px 9px}.table-scroll{margin:0 -4px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Keep tablet layouts roomy and confine wide tables to their own scroll area. */
.upload-controls,.upload-panel>div,.panel,.draft-row,.main,main{min-width:0}.filter-explanation{align-self:center;color:var(--muted);font-size:12px;line-height:1.6}.paste-hint{display:block}.table-scroll{max-width:100%;overscroll-behavior-x:contain}td{overflow-wrap:anywhere}.table-scroll table{min-width:620px}.modal input[data-stock-id]{min-width:90px}#imagePreview img{max-width:100%}.form-footer{flex-wrap:wrap}
@media(min-width:761px) and (max-width:1024px){.sidebar{width:180px;padding:24px 10px}.main{margin-left:180px}.brand{font-size:15px;gap:7px}main{padding:24px 18px}header{padding:0 18px}.filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.upload-panel{grid-template-columns:1fr;gap:12px}.stats.four{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.form-grid,.filter-grid{grid-template-columns:1fr}input,select,textarea{font-size:16px}.page-heading{flex-wrap:wrap}.page-heading>div{min-width:0}.stats{grid-template-columns:1fr}.stats.four{grid-template-columns:repeat(2,minmax(0,1fr))}.welcome-banner{padding:18px}.banner-icon{display:none}.breadcrumb{display:none}header{justify-content:flex-end}.modal{max-height:calc(100dvh - 24px)}.form-footer button{min-height:44px}.panel,.draft-row{padding:15px}.language select{min-height:44px}nav button{min-height:44px}.table-scroll{margin:0}.auth-card{padding:20px}}
