#pcbPanel{font-family:"Microsoft YaHei UI","PingFang SC",sans-serif;color:#20344c;background:#f3f6f8;font-size:14px;--muted:#65768a;--line:#e3e9ee;--blue:#245b91;--amber:#956115;--green:#25715a}
#pcbPanel *{box-sizing:border-box}
#pcbPanel{margin:0}
#pcbPanel button,#pcbPanel input{font:inherit}
#pcbPanel button,#pcbPanel a,#pcbPanel input{outline-offset:4px}
#pcbPanel button:focus-visible,#pcbPanel a:focus-visible,#pcbPanel input:focus-visible{outline:3px solid #438dc3}
#pcbPanel a{color:inherit;text-decoration:none}
#pcbPanel button{cursor:pointer;border:1px solid #cdd8e2;border-radius:7px;padding:10px 17px;background:white;color:#20344c}
#pcbPanel button:disabled{cursor:wait;opacity:.55}
#pcbPanel .topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100% - 1240px)/2));gap:16px}
#pcbPanel .brand{font-size:18px;font-weight:700;display:flex;align-items:center;gap:12px}
#pcbPanel .chip{background:#e7eff5;color:var(--blue);font-size:28px;width:36px;height:36px;display:grid;place-items:center;border-radius:8px}
#pcbPanel #viewer{color:var(--muted);font-size:12px}
#pcbPanel{max-width:1240px;margin:auto;padding:0 24px 28px}
#pcbPanel nav{display:flex;gap:32px;border-bottom:1px solid var(--line);margin-bottom:34px}
#pcbPanel nav a{padding:22px 0 17px;color:var(--muted)}
#pcbPanel nav a[aria-current]{border-bottom:3px solid var(--blue);color:var(--blue);font-weight:700}
#pcbPanel .heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
#pcbPanel h1{font-size:30px;letter-spacing:-.7px;margin:0 0 10px}
#pcbPanel p{line-height:1.7;margin:0;color:var(--muted)}
#pcbPanel #refresh{background:var(--blue);border-color:var(--blue);color:white}
#pcbPanel .scope{display:flex;justify-content:space-between;gap:14px;color:var(--muted);font-size:12px;margin-top:26px}
#pcbPanel .dot{padding:0 8px;color:#9aabb9}
#pcbPanel #message{font-size:12px;margin:10px 0 18px}
#pcbPanel #message.error{color:#a54230}
#pcbPanel .brief{padding:23px 26px;background:#eaf0f5;border-left:4px solid #416986;border-radius:0 10px 10px 0}
#pcbPanel .brief-title{display:flex;align-items:center;gap:10px}
#pcbPanel .signal{width:9px;height:9px;background:var(--blue);border-radius:50%}
#pcbPanel h2{font-size:17px;margin:0}
#pcbPanel .brief>p{color:#284764;font-size:19px;margin-top:11px;max-width:75ch}
#pcbPanel .brief-note{color:#637b8e;font-size:12px;line-height:1.8;margin-top:10px}
#pcbPanel .filters{display:grid;grid-template-columns:repeat(5,1fr);margin:26px 0;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:9px;overflow:hidden}
#pcbPanel .filter{border:0;border-radius:0;text-align:left;padding:17px 18px;background:#fff;position:relative}
#pcbPanel .filter[aria-pressed=true]{background:#e9f0f7;box-shadow:inset 0 -3px var(--blue)}
#pcbPanel .filter span{display:block;color:var(--muted);font-size:12px}
#pcbPanel .filter strong{display:block;margin-top:8px;font-size:26px;font-weight:600}
#pcbPanel .filter.shipping strong{color:var(--amber)}
#pcbPanel .filter.shipped strong{color:var(--green)}
#pcbPanel .workspace{background:#fff;border:1px solid var(--line);border-radius:10px;overflow:hidden}
#pcbPanel .toolbar{display:flex;align-items:center;justify-content:space-between;padding:24px;gap:20px;border-bottom:1px solid var(--line)}
#pcbPanel .toolbar p{font-size:12px;margin-top:6px}
#pcbPanel #count{font-weight:400;font-size:12px;color:var(--muted);margin-left:7px}
#pcbPanel .search span{position:absolute;width:1px;height:1px;overflow:hidden}
#pcbPanel .search input{width:255px;padding:11px 14px;border:1px solid #d4dfe7;border-radius:7px;background:#f8fafc;color:#20344c}
#pcbPanel .order{display:grid;grid-template-columns:minmax(220px,1.3fr) minmax(230px,1fr) 145px 96px 85px;align-items:center;gap:24px;padding:25px 24px;border-bottom:1px solid var(--line)}
#pcbPanel .order:last-child{border-bottom:0}
/* 打样次数列：1 次是静态灰字，2 次以上做成可点按钮，点开在本行下方展开历次日期。 */
#pcbPanel .freq{font-size:12px}
#pcbPanel .freq-once{color:#9aab9f}
#pcbPanel .freq-button{display:inline-flex;align-items:center;gap:6px;border:1px solid #cfe3d3;border-radius:20px;background:#edf6ee;color:var(--blue);font-weight:700;font-size:13px;padding:7px 12px;white-space:nowrap}
#pcbPanel .freq-button[data-heat=warm]{background:#fdf3e3;border-color:#f0dcb4;color:#8a5511}
#pcbPanel .freq-button[data-heat=hot]{background:#fbeceb;border-color:#f0cdc9;color:#b8352a}
#pcbPanel .freq-button:hover{filter:brightness(.96)}
#pcbPanel .freq-button .arrow{font-size:9px;transition:transform .15s}
#pcbPanel .freq-button[aria-expanded=true] .arrow{transform:rotate(180deg)}
#pcbPanel .freq-history{grid-column:1/-1;margin:16px 0 0;padding:6px 20px;background:#fafcf9;border:1px solid var(--line);border-radius:10px}
#pcbPanel .freq-history[hidden]{display:none}
#pcbPanel .freq-history ol{list-style:none;margin:0;padding:0;font-size:13px;line-height:1.6}
/* 三段都靠左挨着排：日期、板名、片数/状态/发货日期。
   谁都不撑开剩余宽度，否则后面的信息会被顶到行尾，中间留一大片空白。 */
#pcbPanel .freq-history li{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;padding:8px 0;border-bottom:1px solid #edf2ee}
#pcbPanel .freq-history li:last-child{border-bottom:0}
#pcbPanel .freq-history .d{flex:none;font-weight:600;font-variant-numeric:tabular-nums}
#pcbPanel .freq-history .hname{flex:0 1 auto;min-width:0;color:#243c2c;overflow-wrap:anywhere}
#pcbPanel .freq-history .sub{flex:none;color:var(--muted);font-size:12px}
#pcbPanel .board{display:flex;gap:14px;align-items:flex-start;min-width:0}
#pcbPanel .board-symbol{flex-shrink:0;width:42px;height:46px;border:1px solid #bbcec7;border-radius:5px;background:#eef5f1;color:#467561;display:grid;place-items:center;font-size:25px}
#pcbPanel .board h3{font-size:16px;margin:0 0 7px;overflow-wrap:anywhere}
#pcbPanel .meta{font-size:12px;color:var(--muted);line-height:1.7;overflow-wrap:anywhere}
#pcbPanel .badge{display:inline-block;border-radius:4px;font-size:12px;padding:4px 9px;background:#edf2f7;color:#426685;font-weight:600}
#pcbPanel .shipping .badge{background:#fbefd9;color:#8b5b10}
#pcbPanel .shipped .badge{background:#e6f2eb;color:#21684b}
#pcbPanel .canceled .badge,#pcbPanel .unknown .badge{background:#f0f1f3;color:#606a77}
#pcbPanel .stage p{font-size:12px;margin-top:7px}
#pcbPanel .date{font-size:13px}
#pcbPanel .date small{display:block;color:var(--muted);font-size:11px;margin-bottom:8px}
#pcbPanel .details-button{font-size:12px;padding:8px 12px;white-space:nowrap}
/* 已发货没有工序可看，按钮置灰。cursor 用 default 而不是继承 button:disabled 的 wait。 */
#pcbPanel .details-button:disabled{cursor:default;opacity:1;background:#f4f6f4;border-color:#e4eae5;color:#9aab9f}
#pcbPanel .empty{text-align:center;padding:65px 24px;color:var(--muted);line-height:1.8}
/* 第二阶段提示条：列表已经出来了，工序在后台分批补。这里报的是真实份数，
   所以用确定型进度条；全部到位后变成一行完成态提示。 */
#pcbPanel #progressBar:empty{display:none}
#pcbPanel .progress-note{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding:12px 26px;font-size:12px;color:#4a6553;background:#f6faf7;border-bottom:1px solid var(--line)}
#pcbPanel .progress-note b{font-variant-numeric:tabular-nums;color:#243c2c}
#pcbPanel .progress-note.done{color:#3d6b48}
#pcbPanel .progress-note.warn{background:#fdf7ea;color:#8a5511}
#pcbPanel .progress-note .pip{flex:none;width:9px;height:9px;border-radius:50%;background:var(--blue)}
#pcbPanel .progress-note.warn .pip{background:#c58a1d}
#pcbPanel .progress-note .pip.spin{border-radius:50%;width:13px;height:13px;background:none;border:2px solid #d7e5da;border-top-color:var(--blue);animation:pcb-spin .8s linear infinite}
#pcbPanel .progress-note .pbar{flex:1;min-width:120px;max-width:260px;height:4px;background:#e4ece6;border-radius:3px;overflow:hidden}
#pcbPanel .progress-note .pbar i{display:block;height:100%;background:var(--blue);border-radius:3px;transition:width .3s ease}
/* 该行的工序/单号还没到位 */
#pcbPanel .pending{color:#9aab9f;font-style:normal}
/* 加载态：环节清单 + 不确定型进度条（不谎报百分比，只表示仍在进行）+ 骨架卡片。
   取色走 var(--blue)，navigation.css 已把它覆盖成主题绿 #2e7d32。 */
#pcbPanel #message.quiet{margin:0}
#pcbPanel .loading-card{padding:26px 26px 24px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#f6faf7,#fff)}
#pcbPanel .loading-head{display:flex;align-items:center;gap:16px}
#pcbPanel .loading-spinner{flex:none;width:30px;height:30px;border-radius:50%;border:3px solid #dde8e0;border-top-color:var(--blue);animation:pcb-spin .85s linear infinite}
#pcbPanel .loading-title{font-size:17px;font-weight:600;color:#1d3326;margin:0;line-height:1.4}
#pcbPanel .loading-sub{font-size:14px;color:#4a6553;margin:5px 0 0;line-height:1.5}
#pcbPanel .loading-sub::after{content:"";display:inline-block;width:1.6em;text-align:left;animation:pcb-dots 1.6s steps(1,end) infinite}
#pcbPanel .loading-bar{height:4px;background:#e4ece6;border-radius:3px;overflow:hidden;margin:20px 0 0}
#pcbPanel .loading-bar::after{content:"";display:block;width:38%;height:100%;background:var(--blue);border-radius:3px;animation:pcb-slide 1.4s ease-in-out infinite}
#pcbPanel .loading-steps{list-style:none;padding:0;margin:18px 0 0;display:flex;flex-wrap:wrap;gap:10px 26px;font-size:13px;color:#8aa093;line-height:1.6}
#pcbPanel .loading-steps li{display:flex;align-items:center;gap:9px}
#pcbPanel .loading-steps .tick{flex:none;width:17px;height:17px;border-radius:50%;border:2px solid #d3e0d7;background:#fff}
#pcbPanel .loading-steps [data-state=active]{color:#1d3326;font-weight:600}
#pcbPanel .loading-steps [data-state=active] .tick{border-color:var(--blue);box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 9px var(--blue)}
#pcbPanel .loading-steps [data-state=done]{color:#4a6553}
#pcbPanel .loading-steps [data-state=done] .tick{border-color:var(--blue);background:var(--blue);position:relative}
#pcbPanel .loading-steps [data-state=done] .tick::after{content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(42deg)}
@keyframes pcb-slide{0%{transform:translateX(-100%)}100%{transform:translateX(360%)}}
@keyframes pcb-spin{to{transform:rotate(360deg)}}
@keyframes pcb-dots{0%{content:"·"}33%{content:"··"}66%{content:"···"}}
#pcbPanel .skeleton{padding:23px 26px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:130px minmax(220px,1.3fr) minmax(230px,1fr) 85px;align-items:center;gap:24px}
#pcbPanel .skeleton:last-child{border-bottom:0}
#pcbPanel .sk{background:linear-gradient(90deg,#eef3ef 25%,#e2eae4 37%,#eef3ef 63%);background-size:400% 100%;border-radius:5px;height:13px;animation:pcb-shimmer 1.5s ease-in-out infinite}
#pcbPanel .sk.tall{height:46px;width:42px}
#pcbPanel .sk.w70{width:70%}
#pcbPanel .sk.w45{width:45%}
#pcbPanel .sk.w85{width:85%}
#pcbPanel .sk-board{display:flex;gap:14px;align-items:flex-start}
#pcbPanel .sk-lines{flex:1;display:grid;gap:9px;min-width:0}
@keyframes pcb-shimmer{0%{background-position:100% 0}100%{background-position:0 0}}
@media(max-width:850px){#pcbPanel .skeleton{grid-template-columns:110px minmax(0,1fr)}
#pcbPanel .skeleton>:nth-child(3),#pcbPanel .skeleton>:nth-child(4){display:none}
}
@media(max-width:540px){#pcbPanel .skeleton{grid-template-columns:88px minmax(0,1fr);gap:14px;padding:20px}
#pcbPanel .sk.tall{display:none}
}
@media(max-width:540px){#pcbPanel .loading-card{padding:22px 20px}
#pcbPanel .loading-steps{flex-direction:column;gap:9px}
}
@media(prefers-reduced-motion:reduce){#pcbPanel .loading-bar::after,#pcbPanel .sk,#pcbPanel .loading-spinner,#pcbPanel .loading-sub::after,#pcbPanel .progress-note .pip.spin{animation:none}
#pcbPanel .loading-bar::after{width:100%;opacity:.5}
#pcbPanel .progress-note .pbar i{transition:none}
}
#pcbPanel footer{font-size:12px;color:var(--muted);margin-top:20px;line-height:1.7}
#pcbPanel dialog{border:1px solid var(--line);border-radius:12px;width:min(640px,calc(100% - 32px));max-height:85vh;padding:26px;color:#20344c}
#pcbPanel dialog::backdrop{background:rgba(22,40,59,.32)}
#pcbPanel .dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}
#pcbPanel .dialog-head h2{overflow-wrap:anywhere}
#pcbPanel dl{display:grid;grid-template-columns:100px 1fr;gap:13px;font-size:13px;line-height:1.65}
#pcbPanel dt{color:var(--muted)}
#pcbPanel dd{margin:0;overflow-wrap:anywhere}
#pcbPanel ol{padding-left:24px;color:var(--muted);line-height:2;font-size:13px}
@media(max-width:850px){#pcbPanel .order{grid-template-columns:1fr 1fr;gap:18px}
#pcbPanel .filters{grid-template-columns:repeat(3,1fr)}
#pcbPanel .freq-history{padding:6px 16px}
#pcbPanel .details-button{justify-self:end}
#pcbPanel .toolbar{align-items:flex-start}
#pcbPanel .scope{flex-wrap:wrap}
}
@media(max-width:540px){#pcbPanel{padding:0 16px 24px}
#pcbPanel .topbar{padding:0 16px}
#pcbPanel nav{gap:22px}
#pcbPanel nav a{font-size:12px}
#pcbPanel h1{font-size:25px}
#pcbPanel .heading{align-items:flex-start}
#pcbPanel .heading p{font-size:12px}
#pcbPanel #refresh{padding:9px 12px;white-space:nowrap}
#pcbPanel .brief{padding:20px}
#pcbPanel .brief>p{font-size:17px}
#pcbPanel .brief-note{font-size:11px}
#pcbPanel .toolbar{flex-direction:column;padding:20px}
#pcbPanel .search,#pcbPanel .search input{width:100%}
#pcbPanel .order{padding:20px;gap:18px}
#pcbPanel .board{grid-column:1/-1}
#pcbPanel .stage{grid-column:1/-1}
#pcbPanel .date{font-size:12px}
#pcbPanel .filter{padding:14px}
#pcbPanel .filter strong{font-size:23px}
#pcbPanel .scope{line-height:1.7}
#pcbPanel .dialog-head h2{font-size:16px}
}
@media(prefers-reduced-motion:reduce){#pcbPanel *{scroll-behavior:auto}
}
