/* 工厂管理 workspace pages (MEIJIAMEI factory edition). Same tokens as the
   attendance board so the factory pages read as part of the app. */
.factory-board{--fx-ink:#17253d;--fx-muted:#64748b;--fx-line:#e3e8f0;--fx-accent:#255dbe;--fx-red:#b42318;--fx-red-bg:#fdecea;--fx-ok:#16744d;--fx-ok-bg:#eaf7f0;display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;font-size:14px;color:var(--fx-ink)}
.factory-board *{box-sizing:border-box}
.factory-board [hidden]{display:none!important}
.factory-board .fx-card{background:#fff;border:1px solid var(--fx-line);border-radius:10px;padding:14px 16px;min-width:0}
.factory-board .fx-card h2{margin:0 0 12px;font-size:16px}
.factory-board .fx-card h3{margin:16px 0 8px;font-size:14px;color:#334155}
.factory-board .fx-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}
.factory-board .fx-stat{background:#fff;border:1px solid var(--fx-line);border-radius:10px;padding:12px 14px}
.factory-board .fx-stat span{display:block;color:var(--fx-muted);font-size:12px}
.factory-board .fx-stat strong{font-size:22px;font-variant-numeric:tabular-nums}
.factory-board .fx-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px 12px;align-items:end}
.factory-board .fx-form label{display:grid;gap:4px;font-size:12px;color:var(--fx-muted)}
.factory-board .fx-form .fx-wide{grid-column:1/-1}
.factory-board .fx-form label.fx-check{display:flex;align-items:center;gap:8px;color:var(--fx-ink);font-size:13px}
.factory-board .fx-form label.fx-check input{width:auto;min-height:0}
.factory-board input,.factory-board select,.factory-board textarea{font:inherit;min-height:40px;padding:0 10px;border:1px solid #cdd6e3;border-radius:8px;background:#fff;color:var(--fx-ink);width:100%;min-width:0}
.factory-board input[type=file]{padding:8px 10px}
.factory-board button.fx-btn{font:inherit;width:auto;min-height:40px;padding:0 16px;border-radius:8px;border:1px solid var(--fx-accent);background:var(--fx-accent);color:#fff;cursor:pointer;justify-self:start}
.factory-board button.fx-btn.fx-ghost{background:#fff;color:var(--fx-accent);border-color:#cdd6e3}
.factory-board button.fx-btn.fx-small{min-height:30px;padding:0 10px;font-size:12px}
.factory-board button.fx-btn:disabled{opacity:.55;cursor:wait}
.factory-board .fx-table-wrap{overflow-x:auto;border:1px solid var(--fx-line);border-radius:10px;-webkit-overflow-scrolling:touch}
.factory-board table{border-collapse:collapse;width:100%;font-size:13px}
.factory-board th,.factory-board td{text-align:left;padding:10px 12px;border-bottom:1px solid #eef1f6;vertical-align:top;white-space:nowrap}
.factory-board tr:first-child th{background:#f5f7fb;color:#536174;font-size:12px;font-weight:600}
.factory-board tr:last-child td{border-bottom:0}
.factory-board td.fx-num,.factory-board th.fx-num{text-align:right;font-variant-numeric:tabular-nums}
.factory-board tr.fx-void td{color:#9aa1ad;text-decoration:line-through}
.factory-board .fx-bad{color:var(--fx-red);font-weight:600}
.factory-board section.fx-bad{background:var(--fx-red-bg);border-color:#f5c2bd}
.factory-board .fx-pill{display:inline-block;padding:2px 8px;border-radius:6px;font-size:12px;font-weight:600;background:#f1f4f8;color:#475569}
.factory-board .fx-pill.fx-warn{background:var(--fx-red-bg);color:var(--fx-red)}
.factory-board .fx-muted{color:var(--fx-muted);font-size:12px}
.factory-board .fx-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.factory-board .fx-spacer{flex:1}
.factory-board .fx-lines{display:grid;gap:8px}
.factory-board .fx-line{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:8px;align-items:center}
.fx-toast{white-space:pre-line;position:fixed;left:50%;bottom:20px;transform:translateX(-50%);background:#17253d;color:#fff;padding:10px 16px;border-radius:8px;max-width:calc(100% - 32px);z-index:10000;font-size:14px}
.fx-toast.fx-error{background:#b42318}
.fx-toast[hidden]{display:none}
@media (max-width:640px){
  .factory-board .fx-line{grid-template-columns:1fr 1fr}
  .factory-board .fx-line select{grid-column:1/-1}
  .factory-board .fx-line button{grid-column:1/-1;justify-self:end}
  .factory-board .fx-stats{grid-template-columns:1fr 1fr}
}
.factory-board a.fx-link{color:var(--fx-accent);text-decoration:none;font-weight:600}
.factory-board a.fx-link:hover{text-decoration:underline}
.sales-balance-owed{color:#b42318}
/* MEIJIAMEI brand (factory instance only; added by app.js applyFactoryBrandAssets) */
.factory-login-logo{display:block;width:min(260px,70%);height:auto;margin:4px auto 18px}
.factory-header-logo{display:block;height:30px;width:auto;margin-bottom:2px}
/* MEIJIAMEI on a phone (and in the Android app): the same YXSYSTEM shell, but
   the header and page menu shrink to one row each so the page starts on the
   first screen. Factory instance only (body.factory-edition). */
@media (max-width:640px){
  body.factory-edition .workspace-top-hint,
  body.factory-edition #appSessionMeta,
  body.factory-edition .workspace-page-bar,
  body.factory-edition .workspace-page-section-head{display:none!important}
  body.factory-edition .workspace-top-panel{padding:10px 12px}
  body.factory-edition .workspace-top-brand strong{display:none}
  body.factory-edition .factory-header-logo{height:24px}
  body.factory-edition .workspace-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  body.factory-edition .workspace-tabs .workspace-tab{flex:0 0 auto}
  body.factory-edition .workspace-side-panel{padding:8px;position:sticky;top:0;z-index:20}
  body.factory-edition .workspace-page-nav{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:6px;-webkit-overflow-scrolling:touch;scrollbar-width:none}
  body.factory-edition .workspace-page-section{display:contents}
  body.factory-edition .workspace-page-section-links,
  body.factory-edition .workspace-page-section-links.collapsed{display:flex!important;flex-wrap:nowrap;gap:6px;max-height:none!important;overflow:visible!important}
  body.factory-edition .workspace-page-link{flex:0 0 auto;white-space:nowrap;width:auto;margin:0;padding:8px 12px}
}
/* ------------------------------------------------------------------ phone
   MEIJIAMEI phone shell (factory instance, width <= 640px, also inside the
   Android app): own top bar and bottom tabs, card lists instead of wide
   tables, one-column forms with big touch targets. factory-flow.js adds
   body.fx-phone once signed in, and body.fx-phone-page while a factory page
   is open. */
body.fx-phone{--m-bg:#f4f3ef;--m-card:#fff;--m-ink:#1b1b1f;--m-sub:#6b6b73;--m-line:#e7e5df;--m-dark:#1b1b1f;--m-red:#c0352b;--m-red-bg:#fbeceb;--m-ok:#1d7a4f;--m-tab-h:64px;--m-top-h:56px;background:var(--m-bg)!important}
body.fx-phone .fxm-top{position:fixed;top:0;left:0;right:0;height:calc(var(--m-top-h) + env(safe-area-inset-top));padding:env(safe-area-inset-top) 12px 0 16px;display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--m-line);z-index:900}
body.fx-phone .fxm-logo{height:26px;width:auto;flex:0 0 auto}
body.fx-phone .fxm-title{flex:1;font-size:17px;font-weight:700;color:var(--m-ink);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:26px}
body.fx-phone .fxm-chip{flex:1;justify-self:center;font:inherit;font-size:14px;font-weight:600;border:1px solid var(--m-line);background:#fff;border-radius:999px;padding:7px 12px;color:var(--m-ink)}
body.fx-phone .fxm-me{flex:0 0 auto;width:36px;height:36px;border-radius:50%;border:0;background:var(--m-dark);color:#fff;font:600 15px/36px system-ui,sans-serif;text-align:center;padding:0}
body.fx-phone .fxm-me.big{width:48px;height:48px;font-size:20px;line-height:48px;display:inline-block}
body.fx-phone .fxm-tabs{position:fixed;left:0;right:0;bottom:0;height:calc(var(--m-tab-h) + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);display:flex;background:#fff;border-top:1px solid var(--m-line);z-index:900}
body.fx-phone .fxm-tabs button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:none;font:inherit;font-size:12px;color:#8a8a92;padding:0;min-width:0}
body.fx-phone .fxm-tabs svg,body.fx-phone .fxm-actions svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body.fx-phone .fxm-tabs svg circle{fill:currentColor;stroke:none}
body.fx-phone .fxm-tabs button.is-on{color:var(--m-ink);font-weight:700}
/* the YXSYSTEM header, page menu and panel titles give way to the shell */
body.fx-phone-page .workspace-top-panel,body.fx-phone-page .workspace-side-panel,body.fx-phone-page .factory-panel>.panel-head{display:none!important}
body.fx-phone{padding-top:calc(var(--m-top-h) + env(safe-area-inset-top))!important;padding-bottom:calc(var(--m-tab-h) + env(safe-area-inset-bottom) + 12px)!important}
body.fx-phone-page .workspace-shell,body.fx-phone-page .workspace-main,body.fx-phone-page main{padding:0!important;margin:0!important;gap:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
body.fx-phone-page .factory-panel{padding:12px 12px 0!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:0!important}
body.fx-phone .factory-board{gap:14px;font-size:15px;color:var(--m-ink)}
/* hero numbers */
body.fx-phone .fxm-hero{background:var(--m-dark);color:#fff;border-radius:16px;padding:16px}
body.fx-phone .fxm-hero>span{font-size:13px;opacity:.7}
body.fx-phone .fxm-hero>b{display:block;font-size:30px;margin-top:4px;font-variant-numeric:tabular-nums}
body.fx-phone .fxm-hero-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 12px;margin-top:12px}
body.fx-phone .fxm-hero-grid b{display:block;font-size:24px;font-variant-numeric:tabular-nums}
body.fx-phone .fxm-hero-grid span{font-size:12px;opacity:.7}
body.fx-phone .fxm-hero-red{background:var(--m-red)}
body.fx-phone .fxm-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
body.fx-phone .fxm-actions button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:56px;border-radius:14px;border:1px solid var(--m-line);background:#fff;font:inherit;font-size:16px;font-weight:600;color:var(--m-ink)}
body.fx-phone .fxm-alert{background:var(--m-red-bg);color:var(--m-red);border-radius:12px;padding:12px 14px;font-size:14px}
/* sections and card lists */
body.fx-phone .fxm-section h3,body.fx-phone .fxm-card h3{margin:4px 4px 8px;font-size:13px;font-weight:600;color:var(--m-sub);letter-spacing:.02em}
body.fx-phone .fxm-section-head{display:flex;align-items:center;justify-content:space-between}
body.fx-phone .fxm-link{border:0;background:none;font:inherit;font-size:14px;font-weight:700;color:var(--m-red);padding:4px}
body.fx-phone .fxm-list{background:#fff;border-radius:14px;overflow:hidden}
body.fx-phone .fxm-item{display:flex;align-items:center;gap:12px;padding:13px 14px;border-bottom:1px solid #f0eee9}
body.fx-phone .fxm-item:last-child{border-bottom:0}
body.fx-phone .fxm-item-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
body.fx-phone .fxm-item-main strong{font-size:16px;font-weight:600;line-height:1.3}
body.fx-phone .fxm-item-main span{font-size:13px;color:var(--m-sub);overflow:hidden;text-overflow:ellipsis}
body.fx-phone .fxm-item-main .fxm-meta{font-size:12px;color:#94949b}
body.fx-phone .fxm-item-side{flex:0 0 auto;display:flex;flex-direction:column;align-items:flex-end;gap:3px;text-align:right}
body.fx-phone .fxm-item-side>strong{font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.2}
body.fx-phone .fxm-item-side small{font-size:12px;font-weight:500;color:var(--m-sub)}
body.fx-phone .fxm-item-side>span{font-size:12px;color:var(--m-sub)}
body.fx-phone .fxm-item.fx-void{opacity:.5}
body.fx-phone .fxm-item.fx-void strong{text-decoration:line-through}
body.fx-phone .fxm-ok{color:var(--m-ok);font-weight:600}
body.fx-phone .fxm-empty{background:#fff;border-radius:14px;padding:16px;color:var(--m-sub);font-size:14px;text-align:center}
body.fx-phone .fxm-void,body.fx-phone .fxm-pay{font:inherit;font-size:12px;border:1px solid var(--m-line);background:#fff;border-radius:8px;padding:4px 10px;color:var(--m-sub)}
body.fx-phone .fxm-pay{background:var(--m-dark);border-color:var(--m-dark);color:#fff;font-size:13px;padding:6px 14px;font-weight:600}
/* forms */
body.fx-phone .fxm-card{background:#fff;border-radius:16px;padding:14px;display:grid;gap:12px}
body.fx-phone .fxm-form{display:grid;gap:12px}
body.fx-phone .fxm-field{display:grid;gap:6px}
body.fx-phone .fxm-field>span,body.fx-phone .fxm-qty>span,body.fx-phone .fxm-price>span{font-size:13px;color:var(--m-sub);font-weight:500}
body.fx-phone .factory-board input,body.fx-phone .factory-board select{min-height:50px;font-size:16px;border-radius:12px;border:1px solid #dcd9d2;background:#fbfaf8;padding:0 14px}
body.fx-phone .factory-board select{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b6b73' stroke-width='1.6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 14px center;padding-right:36px}
body.fx-phone .fxm-qty{display:grid;gap:6px}
body.fx-phone .fxm-qty>div{display:grid;grid-template-columns:50px 1fr 50px;gap:8px}
body.fx-phone .fxm-qty input{text-align:center;font-size:20px!important;font-weight:700;font-variant-numeric:tabular-nums}
body.fx-phone .fxm-qty button{min-height:50px;border-radius:12px;border:1px solid #dcd9d2;background:#fff;font-size:22px;color:var(--m-ink);padding:0}
body.fx-phone .fxm-seg{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:#e9e7e1;border-radius:12px;padding:4px;gap:4px}
body.fx-phone .fxm-seg button,body.fx-phone .fxm-seg label span{display:block;text-align:center;font:inherit;font-size:15px;font-weight:600;border:0;background:none;border-radius:9px;padding:10px 6px;color:var(--m-sub)}
body.fx-phone .fxm-seg button.is-on,body.fx-phone .fxm-seg input:checked+span{background:#fff;color:var(--m-ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
body.fx-phone .fxm-seg-radio input{position:absolute;opacity:0;pointer-events:none}
body.fx-phone .fxm-more summary{font-size:14px;color:var(--m-sub);padding:6px 2px;cursor:pointer}
body.fx-phone .fxm-more[open]{display:grid;gap:12px}
body.fx-phone .fxm-check{display:flex;gap:10px;align-items:flex-start;font-size:14px;color:var(--m-ink)}
body.fx-phone .fxm-check input{width:20px!important;min-height:20px!important;height:20px;margin-top:1px}
body.fx-phone .fxm-lines{display:grid;gap:10px}
body.fx-phone .fxm-line{display:grid!important;grid-template-columns:1fr!important;gap:10px;padding:12px;border:1px solid var(--m-line);border-radius:14px;background:#fbfaf8}
body.fx-phone .fxm-line-row{display:grid;grid-template-columns:1.5fr 1fr 32px;gap:8px;align-items:end}
body.fx-phone .fxm-line-row .fxm-qty>div{grid-template-columns:40px 1fr 40px;gap:4px}
body.fx-phone .fxm-line-row .fxm-qty button{min-height:50px}
body.fx-phone .fxm-price{display:grid;gap:6px}
body.fx-phone .fxm-remove{border:0;background:none;font-size:22px;color:#a3a3aa;min-height:50px;padding:0}
body.fx-phone .fxm-add{font:inherit;font-size:15px;font-weight:600;border:1.5px dashed #cfccc4;border-radius:12px;background:none;min-height:48px;color:var(--m-ink)}
body.fx-phone .fxm-submitbar{position:sticky;bottom:calc(var(--m-tab-h) + env(safe-area-inset-bottom) + 8px);z-index:5}
body.fx-phone .fxm-submitbar .fx-btn{width:100%;min-height:54px;border-radius:14px;border:0;background:var(--m-dark);font-size:17px;font-weight:700;justify-self:stretch}
body.fx-phone .fxm-totalbar{display:flex;align-items:center;gap:12px;background:var(--m-dark);color:#fff;border-radius:16px;padding:8px 8px 8px 16px;box-shadow:0 6px 20px rgba(0,0,0,.18)}
body.fx-phone .fxm-totalbar>div{flex:1;display:flex;flex-direction:column}
body.fx-phone .fxm-totalbar>div span{font-size:12px;opacity:.7}
body.fx-phone .fxm-totalbar strong{font-size:20px;font-variant-numeric:tabular-nums}
body.fx-phone .fxm-totalbar .fx-btn{width:auto;min-width:120px;background:#fff;color:var(--m-dark)}
/* bottom sheets */
.fxm-sheet{position:fixed;inset:0;z-index:2000}
.fxm-sheet-back{position:absolute;inset:0;background:rgba(0,0,0,.35)}
.fxm-sheet-card{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:20px 20px 0 0;padding:8px 16px calc(20px + env(safe-area-inset-bottom));display:grid;gap:2px;font-size:16px;color:#1b1b1f}
.fxm-sheet-grip{width:40px;height:4px;border-radius:2px;background:#d8d6d0;margin:4px auto 10px}
.fxm-sheet-row{display:flex;justify-content:space-between;align-items:center;font:inherit;font-size:16px;text-align:left;border:0;border-bottom:1px solid #f0eee9;background:none;padding:16px 4px;color:inherit}
.fxm-sheet-row span{color:#a3a3aa;font-size:20px}
.fxm-sheet-row.fxm-danger{color:#c0352b;justify-content:center;border-bottom:0;font-weight:600}
.fxm-me-card{display:flex;align-items:center;gap:12px;padding:6px 4px 14px;border-bottom:1px solid #f0eee9}
.fxm-me-card div{display:flex;flex-direction:column}
.fxm-me-card div span{font-size:13px;color:#6b6b73}
.fxm-me-card .fxm-me{width:48px;height:48px;border-radius:50%;background:#1b1b1f;color:#fff;font:600 20px/48px system-ui,sans-serif;text-align:center}
body.fx-phone .fx-toast{bottom:calc(var(--m-tab-h) + 80px)}
/* sign-in on a phone: logo, two boxes, one button */
@media (max-width:640px){
  body.factory-edition #authShell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px 20px;background:#f4f3ef}
  body.factory-edition #authShell .auth-card{width:100%;max-width:420px;background:#fff;border:0;border-radius:24px;box-shadow:0 10px 40px rgba(0,0,0,.06);padding:32px 22px 26px}
  body.factory-edition #authShell .auth-card .panel-head,body.factory-edition #authResultSummary,body.factory-edition #authShell .field-help,body.factory-edition #authShell [class*="field-hint"],body.factory-edition #authShell .auth-form label>small,body.factory-edition #authShell .field-label{display:none!important}
  body.factory-edition #loginForm .field-group{display:block;margin:0}
  body.factory-edition #authShell .factory-login-logo{width:72%;margin:6px auto 6px}
  body.factory-edition #authShell .fxm-login-sub{text-align:center;color:#6b6b73;font-size:14px;margin:0 0 26px;letter-spacing:.08em}
  body.factory-edition #loginForm{display:grid!important;gap:12px!important;grid-template-columns:1fr!important}
  body.factory-edition #loginForm input{min-height:54px;font-size:17px;border-radius:14px;border:1px solid #dcd9d2;background:#fbfaf8;padding:0 16px;width:100%}
  body.factory-edition #loginSubmitButton{min-height:56px;border-radius:14px;border:0;background:#1b1b1f;color:#fff;font-size:17px;font-weight:700;margin-top:8px;width:100%}
}
body.fx-phone .factory-board .fxm-line select,body.fx-phone .factory-board .fxm-line button{grid-column:auto;justify-self:stretch}
body.fx-phone .factory-board,body.fx-phone .factory-panel{max-width:100vw;overflow-x:hidden}
body.fx-phone .fxm-seg-radio label{position:relative;overflow:hidden}
body.fx-phone .fxm-seg-radio input{left:0;top:0;width:1px!important;height:1px!important;min-height:0!important;margin:0;padding:0}
body.fx-phone .fxm-section-head h3{white-space:nowrap}
.fxm-sheet .fxm-sheet-row,.fxm-sheet .fxm-sheet-row:hover,.fxm-sheet .fxm-sheet-row:focus,.fxm-sheet .fxm-sheet-row:active{background:none!important;color:#1b1b1f!important;box-shadow:none!important;border-radius:0!important;width:100%;min-height:0}
.fxm-sheet .fxm-sheet-row.fxm-danger{color:#c0352b!important}
body.fx-phone .fxm-section-head .fxm-link{width:auto;margin-left:auto;min-height:0;background:none!important}
/* ------------------------------------------------------------ field (reps)
   The sales reps' field app (sales-field-flow.js) on the factory instance:
   same MEIJIAMEI look as the factory phone pages. */
body.factory-edition .sales-field-phone-shell{--r-bg:#f4f3ef;--r-ink:#1b1b1f;--r-sub:#6b6b73;--r-line:#e7e5df;--r-dark:#1b1b1f;--r-red:#c0352b;color:var(--r-ink)}
body.factory-edition .sales-field-phone-shell,body.factory-edition .sales-field-phone-screen,body.factory-edition .sales-field-phone-body{background:var(--r-bg)!important}
body.factory-edition .sales-field-mobile-title.fxr-top{display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 12px 8px 16px;background:#fff;border-bottom:1px solid var(--r-line);box-shadow:none}
body.factory-edition .fxr-logo{height:26px;width:auto;flex:0 0 auto}
body.factory-edition .fxr-title{flex:1;text-align:center;font-size:17px!important;font-weight:700;color:var(--r-ink)!important;margin-right:4px}
body.factory-edition .fxr-me{flex:0 0 auto;width:36px;height:36px;border-radius:50%;border:0;background:var(--r-dark);color:#fff;font:600 15px/36px system-ui,sans-serif;text-align:center;padding:0;min-height:0}
body.factory-edition .sales-field-phone-shell .sales-field-hero{background:var(--r-dark)!important;color:#fff;border-radius:16px;box-shadow:none;border:0}
body.factory-edition .sales-field-phone-shell .sales-field-hero span,body.factory-edition .sales-field-phone-shell .sales-field-hero p{color:rgba(255,255,255,.72)}
body.factory-edition .sales-field-phone-shell .sales-hero-icon{background:rgba(255,255,255,.12)!important;color:#fff!important}
body.factory-edition .sales-field-phone-shell .sales-field-card,body.factory-edition .sales-field-phone-shell .sales-home-actions button,body.factory-edition .sales-field-phone-shell .sales-customer-hub button,body.factory-edition .sales-field-phone-shell .sales-visit-mode-switch button,body.factory-edition .sales-field-phone-shell .sales-compact-actions button{background:#fff!important;border:1px solid var(--r-line)!important;border-radius:16px!important;box-shadow:none!important;color:var(--r-ink)}
body.factory-edition .sales-field-phone-shell .sales-icon-box,body.factory-edition .sales-field-phone-shell .sales-home-actions button>span,body.factory-edition .sales-field-phone-shell .sales-customer-hub button>span{background:#efede8!important;color:var(--r-ink)!important}
body.factory-edition .sales-field-phone-shell .sales-field-metric{background:#fbfaf8!important;border:1px solid var(--r-line)!important;border-radius:12px}
body.factory-edition .sales-field-phone-shell .sales-field-metric strong{color:var(--r-ink)!important}
body.factory-edition .sales-field-phone-shell .sales-field-metric.is-good strong{color:#1d7a4f!important}
body.factory-edition .sales-field-phone-shell .sales-field-metric.is-warning strong{color:var(--r-red)!important}
body.factory-edition .sales-field-phone-shell .sales-primary-action,body.factory-edition .sales-field-phone-shell .sales-mobile-form button[type=submit],body.factory-edition .sales-field-phone-shell .sales-report-actions button:not(.ghost-button){background:var(--r-dark)!important;border-color:var(--r-dark)!important;color:#fff!important;border-radius:14px;min-height:52px;font-weight:700}
body.factory-edition .sales-field-phone-shell .ghost-button{background:#fff!important;color:var(--r-ink)!important;border:1px solid var(--r-line)!important;border-radius:10px}
body.factory-edition .sales-field-phone-shell input,body.factory-edition .sales-field-phone-shell select,body.factory-edition .sales-field-phone-shell textarea{border-radius:12px;border:1px solid #dcd9d2;background:#fbfaf8;min-height:48px;font-size:16px}
body.factory-edition .sales-field-phone-shell textarea{min-height:80px}
body.factory-edition .sales-field-phone-shell .sales-stage-badge,body.factory-edition .sales-field-phone-shell .sales-field-live-badge{background:#efede8!important;color:var(--r-ink)!important;border:0!important}
body.factory-edition .sales-field-phone-shell .sales-customer-card{background:#fff;border:1px solid var(--r-line);border-radius:14px}
body.factory-edition .sales-field-phone-shell .sales-inline-actions button:not(.ghost-button){background:var(--r-dark)!important;color:#fff!important;border-color:var(--r-dark)!important;border-radius:10px}
body.factory-edition .sales-field-phone-shell .sales-empty{background:#fff!important;border:0!important;border-radius:14px;color:var(--r-sub)!important}
body.factory-edition .sales-field-phone-shell .sales-field-mobile-nav{background:#fff!important;border-top:1px solid var(--r-line)!important;box-shadow:none!important}
body.factory-edition .sales-field-phone-shell .sales-field-mobile-nav button{color:#8a8a92!important}
body.factory-edition .sales-field-phone-shell .sales-field-mobile-nav button.is-active{color:var(--r-ink)!important}
body.factory-edition .sales-field-phone-shell .sales-field-mobile-nav button.is-active small{font-weight:800}
body.factory-edition .fxr-owed{display:flex;align-items:baseline;justify-content:space-between;margin:8px 0 4px;padding:8px 12px;border-radius:10px;background:#fbeceb;color:#c0352b}
body.factory-edition .fxr-owed span{font-size:13px}
body.factory-edition .fxr-owed strong{font-size:18px;font-variant-numeric:tabular-nums}
body.factory-edition .fxr-owed-card{display:block;width:100%;text-align:left;border:0;border-radius:16px;padding:14px 16px;background:#c0352b!important;color:#fff!important;font:inherit;min-height:0}
body.factory-edition .fxr-owed-card span,body.factory-edition .fxr-owed-card small{font-size:13px;opacity:.8}
body.factory-edition .fxr-owed-card strong{font-size:26px;font-variant-numeric:tabular-nums}
body.factory-edition .fxr-owed-card{cursor:pointer;box-sizing:border-box}
body.factory-edition .sales-field-phone-shell .sales-report-prompts button{background:#fff!important;border:1px solid var(--r-line)!important;border-radius:16px!important;box-shadow:none!important}
body.factory-edition .sales-field-phone-shell .sales-report-prompts span{background:#efede8!important;color:var(--r-ink)!important}
body.factory-edition .sales-field-phone-shell .sales-report-status{background:#efede8!important;color:var(--r-ink)!important}
body.factory-edition .sales-field-phone-shell .sales-travel-no-evidence button,body.factory-edition .sales-field-phone-shell .sales-empty button{background:var(--r-dark)!important;border-color:var(--r-dark)!important;color:#fff!important;border-radius:12px}
body.factory-edition .fxr-owed-card{min-height:max-content!important}
body.factory-edition .fxr-owed-card>span,body.factory-edition .fxr-owed-card>strong,body.factory-edition .fxr-owed-card>small{display:block}
body.factory-edition .fxr-owed-card>strong{margin:2px 0}
body.factory-edition .sales-field-phone-shell .sales-field-phone-body{grid-auto-rows:max-content}
body.factory-edition .sales-field-phone-shell .sales-location-capture{background:#fbfaf8!important;border-color:#dcd9d2!important}
body.factory-edition .sales-field-phone-shell .sales-photo-picker{border-color:#cfccc4!important;background:#fbfaf8!important;color:var(--r-ink)!important}
body.factory-edition .sales-field-phone-shell .sales-photo-picker strong,body.factory-edition .sales-field-phone-shell .sales-photo-picker svg{color:var(--r-ink)!important}
body.factory-edition .sales-field-phone-shell .sales-customer-drawer{border-color:var(--r-line)!important;box-shadow:none!important}
body.factory-edition .sales-field-phone-shell .sales-customer-drawer-close{background:#efede8!important;color:var(--r-ink)!important}
body.factory-edition .sales-field-phone-shell .sales-form-more summary{color:var(--r-ink)!important}
body.fx-phone .fxm-seg label span{white-space:nowrap}body.factory-edition .sales-field-phone-shell .sales-search-row button{white-space:nowrap;min-width:64px}
/* Exchange rate card and raw material cost currency (factory instance). */
.factory-board .fx-rates .fx-rate-row{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.factory-board .fx-rates .fx-rate-row div{background:#f5f7fb;border-radius:8px;padding:10px 12px}
.factory-board .fx-rates .fx-rate-row span{display:block;color:var(--fx-muted);font-size:12px}
.factory-board .fx-rates .fx-rate-row strong{font-size:18px;font-variant-numeric:tabular-nums}
.factory-board .fx-convert{display:grid;grid-template-columns:1fr 92px;gap:8px;align-items:center}
.factory-board .fx-convert output{grid-column:1/-1;font-size:13px}
.factory-board .fx-rates p{margin:8px 0 0}
.factory-board .fx-cost{display:grid;grid-template-columns:1fr 84px;gap:6px}
.factory-board .fx-cost-preview{grid-column:1/-1;margin:0}
.factory-board .fx-cost-preview:empty{display:none}
/* 成品仓 / 原材料仓 */
.factory-board tr.fx-click{cursor:pointer}
.factory-board tr.fx-click:hover td{background:#f7f9fc}
.factory-board td.fx-in{color:var(--fx-ok)}
.factory-board [data-find][hidden]{display:none!important}
body.fx-phone .fxm-row-btn{display:block;width:100%;padding:0;border:0;background:none;font:inherit;text-align:left;color:inherit;border-bottom:1px solid #f0eee9}
body.fx-phone .fxm-row-btn:last-child{border-bottom:0}
body.fx-phone .fxm-row-btn .fxm-item{border-bottom:0}
body.fx-phone .fxm-search input{width:100%;min-height:44px;border:1px solid #e3e0d8;border-radius:12px;padding:0 14px;font:inherit;font-size:15px;background:#fff}
body.fx-phone .fxm-ledger-head{display:flex}
/* sign-in page, every screen size: MEIJIAMEI look (phone keeps the rules above) */
.factory-version{margin:18px 0 0;text-align:center;color:#9a978f;font-size:12px;letter-spacing:.04em}
@media (min-width:641px){
  body.factory-edition #authShell{min-height:100vh;display:flex;align-items:center;justify-content:center;width:100%;max-width:none;margin:0;padding:40px 32px;background:none}
  body.factory-edition #authShell .auth-card{width:100%;max-width:420px}

  body.factory-edition #authShell .auth-brand{background:#1b1b1f;color:#f4f3ef;border:0;border-radius:24px;padding:48px 44px;box-shadow:none}
  body.factory-edition #authShell .auth-brand .eyebrow{color:#c9c4b8;letter-spacing:.24em;font-size:13px;margin:0 0 18px}
  body.factory-edition #authShell .auth-brand h1{color:#fff;font-size:40px;margin:0 0 14px}
  body.factory-edition #authShell .auth-brand .subtle{color:#c9c4b8;font-size:15px;margin:0 0 28px}
  body.factory-edition #authShell .auth-brand-points{display:grid;gap:12px}
  body.factory-edition #authShell .auth-brand-points article{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);border-radius:16px;padding:16px 18px;box-shadow:none}
  body.factory-edition #authShell .auth-brand-points strong{display:block;color:#fff;font-size:17px;margin-bottom:6px}
  body.factory-edition #authShell .auth-brand-points span{color:#c9c4b8;font-size:14px;line-height:1.6}
  body.factory-edition #authShell .auth-card{background:#fff;border:0;border-radius:24px;box-shadow:0 10px 40px rgba(0,0,0,.06);padding:40px 32px 28px}
  body.factory-edition #authShell .auth-card .panel-head,body.factory-edition #authResultSummary,body.factory-edition #authShell .field-help,body.factory-edition #authShell [class*="field-hint"],body.factory-edition #authShell .auth-form label>small,body.factory-edition #authShell .field-label{display:none!important}
  body.factory-edition #loginForm .field-group{display:block;margin:0}
  body.factory-edition #authShell .factory-login-logo{width:78%;margin:0 auto 8px}
  body.factory-edition #authShell .fxm-login-sub{text-align:center;color:#6b6b73;font-size:14px;margin:0 0 28px;letter-spacing:.08em}
  body.factory-edition #loginForm{display:grid!important;gap:12px!important;grid-template-columns:1fr!important}
  body.factory-edition #loginForm input{min-height:50px;font-size:16px;border-radius:12px;border:1px solid #dcd9d2;background:#fbfaf8;padding:0 16px;width:100%}
  body.factory-edition #loginSubmitButton{min-height:52px;border-radius:12px;border:0;background:#1b1b1f;color:#fff;font-size:16px;font-weight:700;margin-top:8px;width:100%}
}
body.factory-edition #authShell .auth-brand{display:none!important}
body.factory-edition{background:#f4f3ef}
/* top bar on a computer: one clean row, readable text, MEIJIAMEI black instead of blue */
@media (min-width:641px){
  body.factory-edition .workspace-top-panel{padding:12px 18px;min-height:0;border:0;box-shadow:0 2px 14px rgba(0,0,0,.05);border-radius:16px}
  body.factory-edition .workspace-top-row{flex-wrap:nowrap;gap:20px}
  body.factory-edition .workspace-top-brand{display:flex;align-items:center;gap:12px;min-width:0;flex:0 0 auto}
  body.factory-edition .workspace-top-brand .eyebrow{margin:0;line-height:0}
  body.factory-edition .factory-header-logo{height:32px;margin:0}
  body.factory-edition .workspace-top-brand strong{font-size:16px;color:#1b1b1f;white-space:nowrap;padding-left:12px;border-left:1px solid #e4e1da}
  body.factory-edition .workspace-top-hint,body.factory-edition #appSessionMeta{display:none!important}
  body.factory-edition .workspace-tabs{flex:1 1 auto;flex-wrap:wrap;gap:6px}
  body.factory-edition .workspace-tabs .workspace-tab{background:transparent;border:0;color:#3a3a40;font-size:15px;font-weight:600;padding:8px 14px;border-radius:10px;box-shadow:none}
  body.factory-edition .workspace-tabs .workspace-tab:hover{background:#f1efea}
  body.factory-edition .workspace-tabs .workspace-tab.active{background:#1b1b1f;color:#fff}
  body.factory-edition .workspace-session-strip{flex:0 0 auto;gap:10px;flex-wrap:nowrap}
  body.factory-edition #sessionSummary{background:#f4f3ef;color:#1b1b1f;font-size:14px;font-weight:600;padding:7px 12px;border-radius:999px;white-space:nowrap}
  body.factory-edition .global-language-toggle{background:#f4f3ef;border:0}
  body.factory-edition .global-language-button{color:#3a3a40}
  body.factory-edition .global-language-button.is-active{background:#1b1b1f;color:#fff}
  body.factory-edition #logoutButton{color:#3a3a40;border:1px solid #dcd9d2;background:#fff}
}
@media (min-width:641px) and (max-width:1250px){
  body.factory-edition .workspace-top-brand strong{display:none}
  body.factory-edition .workspace-tabs .workspace-tab{padding:8px 10px}
}
/* photos, warehouse chips and cards, dialogs (warehouses, stocktake, editing) */
.factory-board .fx-thumb{display:inline-block;width:40px;height:40px;border-radius:8px;object-fit:cover;background:#f1f4f8;vertical-align:middle;border:1px solid var(--fx-line)}
.factory-board .fx-thumb-sm{width:34px;height:34px;margin-right:8px;float:left}
.factory-board .fx-thumb-lg{width:56px;height:56px}
.factory-board .fx-thumb-empty{background:repeating-linear-gradient(45deg,#f4f6fa,#f4f6fa 6px,#eef1f6 6px,#eef1f6 12px)}
.factory-board img.fx-thumb:not(.is-loaded),.factory-board img.fx-photo:not(.is-loaded){visibility:hidden}
.factory-board .fx-in{color:var(--fx-ok);font-weight:600}
.factory-board tr.fx-off td{color:#9aa1ad}
.factory-board tr.fx-click{cursor:pointer}
.factory-board tr.fx-click:hover td{background:#f8fafd}
.factory-board td.fx-actions{display:flex;gap:6px}
.factory-board .fx-chips{display:flex;flex-wrap:wrap;gap:8px}
.factory-board .fx-chips button{font:inherit;display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:4px 14px 4px 6px;border-radius:999px;border:1px solid var(--fx-line);background:#fff;color:var(--fx-ink);cursor:pointer;width:auto;flex:0 0 auto;margin:0}
.factory-board .fx-chips button:first-child{padding-left:14px}
.factory-board .fx-chips button.is-on{background:#1b1b1f;border-color:#1b1b1f;color:#fff}
.factory-board .fx-chip-img{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#eef1f6}
.factory-board .fx-stat strong small{font-size:13px;color:var(--fx-muted);font-weight:500}
.factory-board .fx-wh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px;margin-top:12px}
.factory-board .fx-wh-card{display:grid;grid-template-columns:110px minmax(0,1fr);gap:12px;border:1px solid var(--fx-line);border-radius:12px;padding:10px;background:#fff}
.factory-board .fx-wh-card.is-off{opacity:.6}
.factory-board .fx-wh-photo{width:110px;height:110px;border-radius:10px;overflow:hidden;background:#f1f4f8;display:grid;place-items:center;color:#94a3b8;font-size:22px;font-weight:700}
.factory-board .fx-wh-photo img{width:100%;height:100%;object-fit:cover}
.factory-board .fx-wh-body{display:grid;gap:6px;align-content:start;min-width:0}
.factory-board .fx-wh-nums{display:flex;gap:14px;font-size:12px;color:var(--fx-muted)}
.factory-board .fx-wh-nums b{display:block;font-size:17px;color:var(--fx-ink);font-variant-numeric:tabular-nums}
.factory-board input.fx-count{max-width:110px;text-align:right}
.factory-board .fx-bom-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px}
.factory-board .fx-bom-grid label{display:grid;gap:4px;font-size:12px;color:var(--fx-muted)}
.factory-board textarea{padding:8px 10px;min-height:60px}
.factory-board .fx-photo-field{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.factory-board .fx-photo{width:96px;height:96px;border-radius:12px;object-fit:cover;display:block;border:1px solid var(--fx-line)}
.factory-board label.fx-file{display:inline-flex;align-items:center;cursor:pointer;color:var(--fx-accent);border:1px solid #cdd6e3;border-radius:8px;min-height:30px;padding:0 10px;font-size:12px}
.fx-modal{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;padding:16px}
.fx-modal .fx-modal-back{position:absolute;inset:0;background:rgba(15,23,42,.45)}
.fx-modal .fx-modal-card{position:relative;background:#fff;border-radius:16px;width:min(760px,100%);max-height:calc(100vh - 32px);overflow:auto;padding:18px 20px;box-shadow:0 20px 60px rgba(0,0,0,.25)}
.fx-modal .fx-modal-head{margin-bottom:12px}
.fx-modal .fx-modal-head h2{margin:0;font-size:17px}
@media (max-width:640px){
  .fx-modal{place-items:end center;padding:0}
  .fx-modal .fx-modal-card{border-radius:16px 16px 0 0;max-height:92vh}
  .factory-board .fx-wh-card{grid-template-columns:84px minmax(0,1fr)}
  .factory-board .fx-wh-photo{width:84px;height:84px}
}

/* Boards (factory-boards.js) on top of garment-boards.css */
.fxb .gb-metric.is-warn{background:#fff8ec;border-color:#efdcb5}
.fxb .gb-metric strong{font-size:24px}
.fxb .fxb-chg{font-weight:600}
.fxb .fxb-chg.is-up{color:#1c7c4a}
.fxb .fxb-chg.is-down{color:#b42335}
.fxb .gb-bar{cursor:default}
.fxb .fxb-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.fxb .fxb-scroll .fx-table-wrap{max-height:420px;overflow:auto}
.fxb .fxb-two>.gb-chart,.fxb .fxb-two>div>.gb-chart{margin:0 0 16px}
.fxb .fxb-split{margin-top:8px}
.fxb .fxb-m3{grid-template-columns:repeat(3,minmax(0,1fr))}
.fxb .fxb-head{display:flex;align-items:center;gap:12px;margin:22px 0 0}
.fxb .fxb-head h3{font-size:17px}
.fxb .fxb-link{min-height:30px;padding:4px 10px;font-size:13px}
.fxb .fxb-range{margin-bottom:6px}
.fxb .fxb-range button[aria-pressed=true]{color:#fff;background:#1b1b1f;border-color:#1b1b1f}
.fxb .fxb-range label{display:flex;align-items:center;gap:6px}
.fxb .fxb-range input{width:auto}
.fxb .fxb-legend{display:flex;gap:14px;font-size:12px;color:#53677f;margin-bottom:8px}
.fxb .fxb-legend i{display:inline-block;width:10px;height:10px;border-radius:2px;margin-right:5px;vertical-align:-1px}
.fxb table{width:100%;border-collapse:collapse;font-size:13px}
.fxb th,.fxb td{padding:8px 6px;border-bottom:1px solid #edf1f7;text-align:left}
.fxb th{color:#62738b;font-weight:500;font-size:12px}
.fxb .fx-num{text-align:right;font-variant-numeric:tabular-nums}
.fxb .fx-bad{color:#b42335}
.fx-demo-btn.is-on{background:#fff4dd;border-color:#e9c77d;color:#7a5410}
@media(max-width:900px){.fxb .fxb-two{grid-template-columns:1fr}}
@media(max-width:600px){.fxb .fxb-m3{grid-template-columns:repeat(3,minmax(0,1fr))}.fxb .fxb-chart{height:170px}.fxb .gb-metric strong{font-size:20px}}

.fxb-plan .gb-notice{margin-bottom:16px}
.fxb-plan .fxb-plan-svg{width:100%;height:auto;display:block}
.fxb-plan .fxb-plan-chart{max-width:560px}
.fxb-plan .fxb-plan-card ul{margin:0;padding-left:18px;display:grid;gap:8px;font-size:14px;line-height:1.55;color:#253855}
.fxb-plan .fxb-plan-no{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#2563eb;color:#fff;font-size:13px;margin-right:8px}
.fxb-plan .fxb-plan-tag{font-size:12px;padding:3px 10px;border-radius:999px;background:#eef4ff;color:#2858a0}
.fxb-plan .gb-chart{margin:0 0 16px}
.fxb .fxb-m5{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1200px){.fxb .fxb-m5{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:600px){.fxb .fxb-m5{grid-template-columns:repeat(2,minmax(0,1fr))}}

.factory-board .fx-sh-line{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto;gap:8px;margin-bottom:8px}
.factory-board .fx-kv{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;margin-top:14px}
.factory-board .fx-kv>div{display:grid;gap:4px}
.factory-board .fx-kv span{font-size:12px;color:var(--fx-muted,#62738b)}
.factory-board .fx-kv strong{font-size:15px;font-weight:600}
.factory-board .fx-wide-stat{grid-column:span 2}
@media(max-width:640px){.factory-board .fx-sh-line{grid-template-columns:1fr 1fr}.factory-board .fx-wide-stat{grid-column:auto}}
.fxb-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 14px}
.fxb-tabs button{border:1px solid #d9dde5;background:#fff;color:#1b1b1f;border-radius:999px;padding:8px 16px;font-weight:600;cursor:pointer;width:auto;flex:0 0 auto;margin:0}
.fxb-tabs button[aria-selected=true]{background:#1b1b1f;border-color:#1b1b1f;color:#fff}
/* Left menu (desktop): an icon on every section, one-page sections are plain
   links, the open section's pages hang under it. */
@media (min-width:641px){
  body.factory-edition .workspace-page-nav{display:grid;gap:4px}
  body.factory-edition .workspace-page-section{gap:2px}
  body.factory-edition .workspace-page-section-head{padding:0}
  body.factory-edition .workspace-page-section-toggle,
  body.factory-edition .workspace-page-direct{width:100%;appearance:none;display:flex;align-items:center;gap:12px;min-height:42px;padding:9px 12px;border:0;border-radius:10px;background:transparent;box-shadow:none;color:rgba(226,232,240,.86);font:inherit;text-align:left;cursor:pointer}
  body.factory-edition .workspace-page-section-toggle strong,
  body.factory-edition .workspace-page-direct strong{font-size:14px;font-weight:600;color:inherit}
  body.factory-edition .workspace-page-section-icon{width:20px;height:20px;flex:0 0 20px;color:rgba(226,232,240,.7)}
  body.factory-edition .workspace-page-section-icon svg{width:20px;height:20px}
  body.factory-edition .workspace-page-section-toggle:hover,
  body.factory-edition .workspace-page-direct:hover{background:rgba(226,232,240,.08)}
  body.factory-edition .workspace-page-direct.active{background:#2563eb;color:#fff}
  body.factory-edition .workspace-page-direct.active .workspace-page-section-icon{color:#fff}
  body.factory-edition .workspace-page-section-toggle:not(.collapsed){color:#fff}
  body.factory-edition .workspace-page-section-toggle:not(.collapsed) .workspace-page-section-icon{color:#fff}
  body.factory-edition .workspace-page-section-links{margin:2px 0 6px 21px;padding-left:12px;border-left:1px solid rgba(226,232,240,.14);gap:2px}
  body.factory-edition .workspace-page-link{min-height:34px;padding:7px 10px;border-radius:8px;font-size:13px}
  body.factory-edition .workspace-page-link.active{background:rgba(37,99,235,.9);color:#fff}
  body.factory-edition .workspace-page-section-chevron{width:7px;height:7px}
}
/* Daily column chart (factory-boards.js columns). */
.fxb .fxb-sum{display:flex;flex-wrap:wrap;gap:6px 18px;font-size:12px;color:#53677f;margin:-4px 0 10px}
.fxb .fxb-sum b{color:#1b2433;font-size:14px;margin-left:2px}
.fxb .fxb-chart{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px;height:236px;padding-top:16px}
.fxb .fxb-y{position:relative;min-width:34px;font-size:10px;color:#8a99ad;line-height:1}
.fxb .fxb-y span{position:absolute;right:0;transform:translateY(50%);white-space:nowrap}
.fxb .fxb-plot{position:relative;min-width:0}
.fxb .fxb-grid{position:absolute;inset:0 0 22px 0;display:flex;flex-direction:column;justify-content:space-between;pointer-events:none}
.fxb .fxb-grid i{display:block;border-top:1px dashed #e6ebf2}
.fxb .fxb-grid i:last-child{border-top:1px solid #cfd8e4}
.fxb .fxb-cols{position:relative;display:flex;align-items:stretch;gap:6px;height:100%}
.fxb .fxb-col{flex:1 1 0;min-width:0;display:flex;flex-direction:column}
.fxb .fxb-stack{flex:1;display:flex;align-items:flex-end;justify-content:center;gap:2px}
.fxb .fxb-stack i{position:relative;display:block;flex:0 1 28px;max-width:28px;min-height:0;border-radius:4px 4px 0 0}
.fxb .fxb-stack i em{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);margin-bottom:3px;font-style:normal;font-size:11px;font-weight:600;color:#1b2433;white-space:nowrap}
.fxb .fxb-col>span{height:22px;padding-top:6px;font-size:10px;color:#7688a0;line-height:1;text-align:center;white-space:nowrap}
.fxb .fxb-col>span small{display:block;font-size:9px;color:#de6977;margin-top:1px}
.fxb .fxb-col.is-today>span{color:#2563eb;font-weight:700}
.fxb .fxb-col:hover .fxb-stack i{filter:brightness(1.1)}
.fxb .fxb-chart.is-dense .fxb-cols{gap:2px}
.fxb .fxb-chart.is-dense .fxb-col>span{font-size:9px}
.fxb .fxb-chart.is-dense .fxb-col:not(:nth-child(3n+1)):not(.is-today)>span{color:transparent}
.fxb .fxb-chart.is-dense .fxb-col>span small{display:none}
/* Shared pages, factory edition: hide what only applies to Direct Loop's shops. */
body.factory-edition .panel[data-workspace-panel="salesField"] .panel-head .eyebrow{display:none}
body.factory-edition .am-tabs{display:none}
body.factory-edition label:has(> input[name="store_code"]),
body.factory-edition label:has(> input[name="area_code"]),
body.factory-edition label:has(> input[name="managed_store_codes"]),
body.factory-edition label:has(> input[name="grant_finance_pettyCash"]),
body.factory-edition label:has(> input[name="grant_finance_mpesaStatement"]),
body.factory-edition label:has(> input[name="grant_finance_staff"]){display:none!important}
/* 组织归属 (store / warehouse / area) means nothing at the factory (Eric 11-08). */
body.factory-edition h4.am-form-section:has(> span[data-account-zh="组织归属"]),
body.factory-edition label:has(> input[name="warehouse_code"]){display:none!important}
body.factory-edition .am-table th:nth-child(3),
body.factory-edition .am-table td:nth-child(3){display:none}
/* 外勤管理 · 销售总览 toolbar: keep 日期 / 查询 / 今天 on one line, the phone button at the right. */
.factory-edition .sales-management-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.factory-edition .sales-management-toolbar form { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.factory-edition .sales-management-toolbar label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.factory-edition .sales-management-toolbar .ghost-button { white-space: nowrap; min-width: 64px; padding: 8px 14px; background: #fff; color: #1d4ed8; border: 1px solid #cbd5e1; }
.factory-edition .sales-management-toolbar .sales-primary-action { flex: 0 0 auto; width: auto; margin-left: auto; padding: 10px 18px; }
/* 综合看板 · 操作日志 */
.fxb .gb-toolbar label { white-space: nowrap; }
.fxl-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.fxl-kinds button { border: 1px solid #d6dde8; background: #fff; color: #334155; border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; }
.fxl-kinds button b { margin-left: 4px; color: #64748b; font-weight: 600; }
.fxl-kinds button[aria-pressed="true"] { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.fxl-kinds button[aria-pressed="true"] b { color: #dbeafe; }
.fxl-day { margin-bottom: 18px; }
.fxl-day h4 { margin: 0 0 6px; font-size: 13px; color: #64748b; font-weight: 600; }
.fxl-day > ul { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; }
.fxl-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; padding: 12px 16px; border-top: 1px solid #eef1f5; align-items: start; }
.fxl-row:first-child { border-top: 0; }
.fxl-row time { color: #64748b; font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.fxl-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fxl-line strong { font-size: 14px; color: #0f172a; }
.fxl-line code { font-size: 12px; color: #475569; background: #f1f5f9; padding: 1px 6px; border-radius: 4px; }
.fxl-amt { font-size: 13px; color: #334155; font-variant-numeric: tabular-nums; }
.fxl-tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #e2e8f0; color: #334155; }
.fxl-row.is-void .fxl-tag { background: #fde2e2; color: #b42318; }
.fxl-row.is-edit .fxl-tag { background: #e0eaff; color: #1d4ed8; }
.fxl-row.is-stocktake .fxl-tag { background: #fef0c7; color: #93370d; }
.fxl-row.is-transfer .fxl-tag { background: #dcfae6; color: #067647; }
.fxl-body p { margin: 4px 0 0; font-size: 13px; color: #475569; }
.fxl-body .fxl-reason { color: #b42318; }
.fxl-changes { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; color: #334155; }
.fxl-changes li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 2px 0; }
.fxl-changes li > span { color: #64748b; min-width: 72px; }
.fxl-changes del { color: #94a3b8; }
.fxl-changes ins { text-decoration: none; color: #0f172a; font-weight: 600; }
.fxl-who { font-size: 13px; color: #0f172a; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .fxl-row { grid-template-columns: 44px 1fr; }
  .fxl-who { grid-column: 2; }
}
