
:root{--navy:#082a61;--blue:#0757c9;--green:#138a36;--red:#e01717;--orange:#f26a00;--ink:#0c1f4d;--muted:#65738c;--line:#d9e2ef;--bg:#f5f8fc}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans TC",Arial,sans-serif}button,input{font:inherit}button{touch-action:manipulation}
#app{max-width:1366px;min-height:100vh;margin:auto;background:#fff}.app-header{height:74px;padding:10px 18px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:20}.brand{display:flex;gap:12px;align-items:center}.brand-logo-wrap{width:54px;height:46px;border-radius:10px;background:#fff;display:grid;place-items:center;overflow:hidden;border:1px solid var(--line)}.brand-logo{width:100%;height:100%;object-fit:contain;padding:4px}.brand-title{font-size:20px;font-weight:900}.brand-subtitle{font-size:12px;color:var(--muted)}.header-actions{display:flex;gap:10px;align-items:center}.header-btn{border:1px solid var(--line);background:#fff;padding:10px 15px;border-radius:10px;font-weight:800}.primary-mini{background:var(--blue);color:#fff;border-color:var(--blue)}.clock{font-weight:800;min-width:76px}
main{padding:14px}.view{display:none}.view.active{display:block}.view-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.view-title h1{margin:0}.view-title p{margin:5px 0 0;color:var(--muted)}.admin-layout{display:grid;grid-template-columns:320px 1fr;gap:14px;min-height:720px}.order-list-panel,.editor-panel{border:1px solid var(--line);border-radius:16px;background:#fff;padding:16px}.panel-title{font-size:20px;font-weight:900;margin-bottom:12px}.order-item{border:1px solid var(--line);border-radius:12px;padding:12px;margin-bottom:10px;cursor:pointer}.order-item.active{border:2px solid var(--blue);background:#eef5ff}.order-item.current:after{content:"現場使用中";display:inline-block;margin-top:7px;background:var(--green);color:#fff;padding:3px 8px;border-radius:999px;font-size:12px}.order-item strong{display:block}.order-item span{color:var(--muted);font-size:13px}.list-actions{display:grid;gap:8px;margin-top:16px}
.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.form-grid label,.tail-row{display:flex;flex-direction:column;gap:6px;font-weight:800}.form-grid input,.production-editor input{border:1px solid var(--line);border-radius:9px;padding:12px}.highlight-field input{font-size:24px;font-weight:900;color:#123897}.production-editor{border-top:1px solid var(--line);margin-top:18px;padding-top:16px}.sub-title{font-weight:900;font-size:18px;margin-bottom:10px}.plan-row{display:flex;align-items:center;gap:9px;margin-bottom:9px}.plan-row input{width:90px}.remove-plan{border:0;background:#fff0f0;color:var(--red);padding:9px;border-radius:8px}.tail-row{flex-direction:row;align-items:center;margin-top:14px}.tail-row input{width:90px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.primary-btn,.secondary-btn,.success-btn,.danger-btn,.warning-btn{border-radius:10px;padding:14px 20px;font-weight:900}.primary-btn{border:0;background:linear-gradient(90deg,var(--blue),#0648b9);color:#fff;font-size:20px}.primary-btn.small{font-size:16px;padding:12px 16px}.secondary-btn{border:1px solid var(--line);background:#fff;color:var(--ink)}.success-btn{border:1px solid #bfe2c8;background:#f3fbf5;color:var(--green)}.danger-btn{border:1px solid #ffc7c7;background:#fff5f5;color:var(--red)}
.empty-state{text-align:center;padding:100px}.hidden{display:none!important}.screen{display:none;min-height:700px;border:1px solid var(--line);border-radius:18px;padding:18px;position:relative;background:linear-gradient(#fff,#fbfdff)}.screen.active{display:block}.screen-title-row{display:flex;align-items:center;gap:12px}.screen-title-row h1{margin:0;font-size:24px}.step-badge{width:36px;height:36px;background:var(--navy);color:#fff;border-radius:8px;display:grid;place-items:center;font-weight:900;font-size:20px}.back-btn{border:0;background:transparent;color:var(--navy);font-size:30px}.order-number{margin-left:auto}.order-layout{display:grid;grid-template-columns:1fr 1fr 1.3fr 2fr;gap:14px;margin-top:28px}.info-card{border:1px solid var(--line);border-radius:14px;overflow:hidden;min-height:300px;background:#fff}.card-label{background:#edf3fa;text-align:center;padding:10px;font-weight:800;font-size:13px}.customer-card{display:flex;flex-direction:column}.customer-name{font-size:54px;font-weight:900;display:grid;place-items:center;flex:1}.big-value{font-size:34px;font-weight:900;padding:26px 16px 14px}.kv{display:flex;justify-content:space-between;padding:16px;border-top:1px solid #edf1f7;font-size:17px}.production-card{display:grid;grid-template-columns:1.35fr 1fr;grid-template-rows:auto 1fr}.production-card .card-label{grid-column:1/-1}.cut-length-label{text-align:center;font-size:20px;font-weight:800;padding-top:25px}.cut-length{text-align:center;font-size:72px;font-weight:900;color:#123897;line-height:1.1}.cut-length small{font-size:26px;margin-left:7px}.plan-list{border-left:1px solid var(--line);padding:20px;display:flex;flex-direction:column;justify-content:center;gap:18px;font-size:24px;font-weight:800}.bottom-action{position:absolute;left:18px;right:18px;bottom:18px;width:calc(100% - 36px)}
.speed-panel{text-align:center;margin-top:45px}.speed-choices{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:25px}.speed-choice{width:52px;height:52px;border-radius:50%;border:2px solid #8bb2ed;background:#fff;font-size:21px}.speed-choice.selected{background:var(--green);color:#fff;border-color:var(--green)}.current-speed-card{width:300px;margin:35px auto;border:1px solid var(--line);border-radius:14px;padding:20px}.current-speed-card span{display:block;font-size:22px;font-weight:800}.current-speed-card strong{display:block;font-size:84px;color:var(--green)}
.machine-caption{text-align:center;color:var(--muted);font-weight:800;margin:18px}.machine-line,.mini-machine{display:flex;align-items:flex-end;justify-content:center}.connected-group{display:flex;gap:44px;position:relative}.connected-group:after{content:"";position:absolute;left:18px;right:18px;top:43px;height:6px;background:#2d3137;border-radius:3px}.machine-unit{width:78px;height:105px;position:relative;z-index:1;display:flex;align-items:center;justify-content:flex-end;flex-direction:column}.machine-unit:before{content:"";width:54px;height:72px;border:3px solid #23272c;border-radius:8px;background:linear-gradient(#e8e8e8,#bfc3c8);position:absolute;bottom:22px}.machine-unit:after{content:"";width:72px;height:5px;background:#282c31;position:absolute;bottom:18px}.ram{position:absolute;width:12px;height:54px;background:#58616a;border:2px solid #1c2228;bottom:30px;z-index:2}.machine-unit b{position:relative;z-index:3}.gap-line{width:70px;height:6px;background:#2d3137;margin-bottom:57px}.coil{width:82px;height:82px;border:4px solid #262a2f;border-radius:50%;background:radial-gradient(circle,#23272c 0 7px,#ececec 8px 28px,#9ca0a4 29px 36px,#d9d9d9 37px);margin-bottom:24px;position:relative}.coil:after{content:"";position:absolute;left:-10px;right:-10px;height:6px;background:#262a2f;bottom:-12px}.hydraulic-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:24px 0 90px}.hyd-card{border:1px solid var(--line);border-radius:14px;padding:12px;text-align:center}.value-display,.unit1-value{border:1px solid #cbd7e8;border-radius:9px;padding:10px;font-size:26px;font-weight:900}.keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:8px}.keypad button{border:0;border-radius:7px;background:#132537;color:#fff;padding:12px 6px;font-size:20px;font-weight:800}.keypad .enter{background:var(--blue)}
.rollback-pill{margin-left:auto}.operation-top{display:flex;justify-content:space-between;align-items:center}.mini-machine{transform:scale(.8);transform-origin:left center}.connected-group.compact{gap:24px}.current-speed-inline{border:1px solid var(--line);border-radius:10px;padding:10px 15px}.current-speed-inline strong{color:var(--green);font-size:30px}.operation-grid{display:grid;grid-template-columns:1fr 280px;gap:22px}.controls-432{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.control-card{text-align:center}.control-stack{height:260px;border-radius:14px;overflow:hidden;border:1px solid var(--line);display:grid;grid-template-rows:1fr .78fr 1fr}.control-stack button{border:0;font-size:40px;font-weight:900}.plus{background:var(--green);color:#fff}.neutral{background:#f4f6f8}.minus{background:var(--red);color:#fff}.press-count{display:inline-block;background:var(--green);color:#fff;border-radius:999px;padding:4px 9px}.unit1-set{border:1px solid var(--line);border-radius:14px;padding:16px;text-align:center}.operation-actions{display:grid;grid-template-columns:1fr 1.4fr 1fr;gap:14px;margin-top:18px}.warning-btn{border:1px solid #ffd5ad;background:#fff8f0;color:var(--orange)}.completed{text-align:center;padding-top:45px}.check{width:86px;height:86px;border-radius:50%;background:var(--green);color:#fff;display:grid;place-items:center;font-size:58px;margin:auto}.completed h2{font-size:44px;color:var(--green)}.summary-grid{display:grid;grid-template-columns:repeat(2,280px);gap:28px;justify-content:center}.summary-card{border:1px solid var(--line);border-radius:14px;padding:26px}.summary-card strong{display:block;font-size:40px;margin-top:16px}.done-btn{width:420px;margin-top:40px}
.modal{position:fixed;inset:0;background:rgba(8,25,54,.48);display:grid;place-items:center;z-index:50}.modal-card{width:min(720px,92vw);background:#fff;border-radius:18px;padding:18px}.modal-header{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line)}.modal-header h2{flex:1}.issue-row{display:grid;grid-template-columns:54px 1fr auto auto;gap:14px;align-items:center;padding:20px 8px;border-bottom:1px solid var(--line)}.issue-icon{width:48px;height:48px;border-radius:12px;color:#fff;display:grid;place-items:center;font-size:24px;font-weight:900}.danger{background:var(--red)}.machine{background:var(--orange)}.other{background:var(--blue)}.issue-copy span{display:block;color:var(--muted)}.photo-btn{width:48px;height:48px;background:var(--blue);color:#fff;border-radius:10px;display:grid;place-items:center}.switch input{display:none}.switch span{display:block;width:58px;height:32px;border-radius:20px;background:#cfd5dc;position:relative}.switch span:after{content:"";width:26px;height:26px;background:#fff;border-radius:50%;position:absolute;left:3px;top:3px}.switch input:checked+span{background:var(--green)}.switch input:checked+span:after{left:29px}.text-input{border:1px solid var(--line);padding:12px;border-radius:8px}.modal-actions{display:flex;justify-content:space-between;margin-top:16px}.danger-link{border:0;background:transparent;color:var(--red);font-weight:900}
@media(max-width:900px){.admin-layout{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr}.order-layout{grid-template-columns:1fr 1fr}.production-card{grid-column:1/-1}.operation-grid{grid-template-columns:1fr}}
