/* NanJianBox operational readability. Candidate only, 2026-10-19. */
@media screen {
 :root{--box-primary:#1d4ed8;--box-ink:#1e293b;--box-muted:#52637b;--box-line:#dce3ed;--box-canvas:#f6f8fc;--box-danger:#b42318}
 html{color-scheme:light;scroll-padding-top:80px}
 body:has(>.app-shell){background:var(--box-canvas);color:var(--box-ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:15px;line-height:1.65;font-variant-numeric:tabular-nums}
 .app-shell,.main,.view,.card,.panel,.detail-section,.detail-grid,.fp-order-row,.fp-order-row>*,.deal-list-row>*{min-width:0}
 .main{background:var(--box-canvas);padding:28px 32px 64px}
 .sidebar{background:#fff;border:1px solid var(--box-line);border-radius:12px;box-shadow:0 2px 8px #1e293b05;color:var(--box-ink);padding:20px 12px}
 .sidebar .nav button{border-radius:8px;color:#475569;font-size:14px;font-weight:550;min-height:44px;padding:10px 12px;white-space:normal;line-height:1.5}
 .sidebar .nav button.active,.sidebar .nav button[aria-current=page]{color:#1e40af;background:#eaf0ff;border-color:#cbd9fa;box-shadow:inset 3px 0 0 var(--box-primary)}
 .nav-group-title{font-size:12px;color:#52637b;letter-spacing:.03em;margin:14px 12px 6px}
 .sidebar .brand,.sidebar .brand strong{color:#1e293b}.sidebar .brand small{color:#52637b}
 .topbar{background:transparent;border:0;align-items:flex-start;gap:16px;margin-bottom:24px}
 .topbar h1{font-size:28px;line-height:1.4;letter-spacing:0;text-wrap:balance}.topbar p{font-size:14px;color:var(--box-muted);line-height:1.65}
 button,.btn,a.btn{min-height:44px;border-radius:8px;font-size:14px;line-height:1.45;touch-action:manipulation;transition:background-color 150ms,border-color 150ms,color 150ms,box-shadow 150ms;cursor:pointer}
 button:disabled,.btn:disabled{cursor:not-allowed}
 .btn,.fp-order-actions button,.deal-row-actions button,.fp-detail-actionbar button,.fp-sidecar-toolbar button{padding:10px 14px}
 .btn.primary,button.primary,.fp-order-toolbar>.primary{background:var(--box-primary);color:#fff;border-color:var(--box-primary);box-shadow:none}
 .btn.primary:hover,button.primary:hover{background:#1e40af;border-color:#1e40af}
 .btn.secondary,.btn.ghost{color:#334155;background:#fff;border-color:#cbd5e1;box-shadow:none}
 .btn.secondary:hover,.btn.ghost:hover{background:#eff4fa;border-color:#94a3b8}
 .btn.danger,button.danger{color:var(--box-danger);border-color:#f2c7c4;background:#fff}
 :is(button,a,summary,input,textarea,select):focus-visible{outline:3px solid #1d4ed8;outline-offset:3px;scroll-margin-block:84px}
 :is(input,select,textarea){font:inherit;font-size:16px;line-height:1.55;color:var(--box-ink);background:#fff;border-color:#7d8fa8;border-radius:8px;min-height:44px;max-width:100%;box-sizing:border-box}
 input[type=checkbox],input[type=radio]{min-height:18px;width:18px;height:18px;accent-color:var(--box-primary)}
 label{font-size:14px;line-height:1.6;color:#334155}
 label:has(>input[type=checkbox]),label:has(>input[type=radio]){min-height:44px;display:flex;align-items:center;gap:8px}
 .card,.panel,.home-section-v1,.home-hero-v1,.home-account-panel,.fp-order-row,.deal-list-row,.product-card,.table-row,.stat-card{border-radius:12px;border-color:var(--box-line);box-shadow:0 2px 8px #1e293b05}
 .home-hero-v1{background:#fff;padding:24px;gap:20px}
 .home-hero-v1 h2{font-size:26px;line-height:1.5;letter-spacing:0;max-width:760px}
 .home-hero-v1 span,.home-section-copy,.home-section-head span,.card-meta{color:var(--box-muted);font-size:14px;line-height:1.7}
 .home-kicker{color:#52637b;font-size:12px;letter-spacing:.03em}
 .home-account-panel{background:#f0f5ff;color:#1e293b;border:1px solid #d8e4fc;box-shadow:none}
 .home-account-panel div:not(.home-account-actions){background:#fff}.home-account-panel small{color:#52637b}.home-account-panel strong{color:#1e293b}
 .home-account-panel .btn.ghost{color:#334155;border-color:#cbd5e1;background:#fff}
 .home-action-grid,.home-module-grid{gap:14px}.home-action-grid article,.home-module-card{padding:18px;border-radius:10px;min-width:0;background:#fff}
 .home-module-card{min-height:180px}.home-module-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
 .home-section-head h2{font-size:20px}.home-action-grid span,.home-module-card span{font-size:14px;line-height:1.65;color:#52637b}
 .home-hero-actions,.home-module-actions,.home-account-actions,.toolbar,.filterbar,.table-actions,.fp-order-actions{gap:10px;flex-wrap:wrap}
 .fp-order-toolbar,.fp-order-filterbar{gap:12px}
 .fp-order-stat,.fp-order-stats>div{border-radius:10px;background:#fff;border-color:var(--box-line)}
 .fp-order-stats :is(small,span),.fp-order-row small,.fp-order-row p,.deal-list-row small,.deal-list-row p{font-size:13px;line-height:1.65;color:var(--box-muted)}
 .fp-order-row{padding:20px;gap:20px;background:#fff;align-items:start}
 .fp-order-row h3{font-size:18px;line-height:1.5;margin:8px 0}
 .fp-order-row section>b{font-size:16px;line-height:1.6;color:#1e293b}
 .fp-order-status{font-size:13px;padding:5px 10px;background:#fff7e6;color:#854d0e;line-height:1.5;font-weight:600}
 .fp-order-status.is-production{background:#eff6ff;color:#1e40af}.fp-order-status.is-completed{background:#edf9f0;color:#166534}
 .fp-order-actions button{background:#fff;border:1px solid #cbd5e1;color:#334155;white-space:normal;min-width:76px}
 .fp-order-actions button:first-child{background:#eff6ff;color:#1e40af;border-color:#c8d7fb}
 .fp-order-actions button:hover{background:#eff4fa}
 :is(.main,dialog) :is(p,dd,li,small,span){overflow-wrap:anywhere}
 .product-card .product-title-clamp{font-size:16px;line-height:1.55}.product-card small,.product-extra,.product-quick-row button{font-size:13px}
 .product-library-controls,.product-toolbox-body-v33610{border-radius:10px;box-shadow:none;gap:12px}
 summary{cursor:pointer;min-height:44px;line-height:1.6;padding-block:10px}
 .detail-section{padding:18px;border-radius:10px}.detail-section h3{font-size:18px}.detail-section h4{font-size:16px}
 .detail-section :is(p,small,dd,span),.detail-grid :is(small,dd){font-size:14px;line-height:1.75}
 .detail-grid{gap:16px}.detail-grid dt{font-size:13px;color:#52637b}.detail-grid dd{color:#1e293b}
 dialog.modal{border-radius:12px;border:1px solid var(--box-line);box-shadow:0 20px 80px #0f172a33;max-height:calc(100dvh - 36px);overscroll-behavior:contain}
 dialog::backdrop{background:#0f172a70;backdrop-filter:blur(2px)}
 .modal .dialog{max-height:calc(100dvh - 36px);overscroll-behavior:contain;scroll-padding-block:84px}
 .dialog>header{position:sticky;top:0;z-index:4;background:#fff;border-bottom:1px solid #e2e8f0;padding-bottom:16px;gap:16px}
 .dialog>header h2{font-size:22px;line-height:1.4}.dialog>header :is(p,span){font-size:13px;color:#52637b;line-height:1.65}
 .dialog>footer{position:sticky;bottom:0;z-index:4;background:#fff;border-top:1px solid #e2e8f0;padding-top:14px;gap:10px}
 button.close,.close{min-width:44px;min-height:44px;color:#334155;border:1px solid #dce3ed;border-radius:8px;background:#fff;font-size:24px}
 .table-wrap,.tablewrap,.detail-table,.product-table-wrap,.import-preview-table{max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-color:#94a3b8 #eef2f7}
 :is(.table-wrap,.tablewrap,.detail-table,.product-table-wrap,.import-preview-table) :is(th,td){padding:12px;font-size:14px;line-height:1.6}
 :is(.table-wrap,.tablewrap,.detail-table,.product-table-wrap,.import-preview-table) th{background:#edf3fa;color:#52637b;font-size:13px}
 .toast,#toast{font-size:14px;line-height:1.6;z-index:2147483646}
}
@media screen and (max-width:1100px){.fp-order-row{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:16px}.fp-order-row>.fp-order-actions{grid-column:1/-1;justify-content:flex-start}.main{padding:24px}}
@media screen and (max-width:760px){
 .main{padding:18px 14px 42px}.topbar{flex-wrap:wrap;gap:12px;margin-bottom:18px}.topbar h1{font-size:24px}
 .sidebar{border-radius:0;padding:14px}.sidebar .nav{gap:6px}.sidebar .nav button{min-height:44px}
 .home-hero-v1{padding:18px}.home-hero-v1 h2{font-size:22px}.home-section-v1{padding:16px}
 .fp-order-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;padding:16px}.fp-order-row>section:first-child{grid-column:1/-1}.fp-order-row h3{font-size:17px}.fp-order-row section>b{font-size:15px}
 .fp-order-stats,.fp-order-summary{grid-template-columns:repeat(2,minmax(0,1fr))}
 .fp-order-filterbar{display:grid;grid-template-columns:1fr 1fr}.fp-order-filterbar>input{grid-column:1/-1;min-width:0}
 .fp-order-actions{width:100%;display:flex;justify-content:flex-start;gap:10px}.fp-order-actions button{flex:1 1 110px}
 .form-grid,.form-fields,.fp-order-form-grid{grid-template-columns:minmax(0,1fr)}
 dialog.modal,.modal.wide{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 20px);margin:auto;border-radius:12px}
 .modal .dialog{padding:18px;max-height:calc(100dvh - 20px)}.dialog>header h2{font-size:20px}
 .dialog>footer{flex-direction:row;flex-wrap:wrap;bottom:-1px}.dialog>footer>.btn{flex:1 1 140px;width:auto}
 .detail-grid{grid-template-columns:minmax(0,1fr)}
}
@media screen and (prefers-reduced-motion:reduce){button,.btn,.dialog,.main{transition:none!important;scroll-behavior:auto!important}}

/* Resolve existing compact/premium layers explicitly; retain business visibility rules. */
@media screen {
 body[data-fp-workspace-closure] .app-shell button,body.fp-internal-page-cleanup .app-shell button,body .modal button{min-height:44px;font-size:14px;line-height:1.45}
 body[data-fp-workspace-closure] .app-shell .nav button{min-height:44px;padding:10px 12px;border-radius:8px;font-size:14px;background:#fff;color:#475569;border:1px solid transparent}
 body>.app-shell .sidebar .nav button.active{background:#eaf0ff;color:#1e40af;border-color:#cbd9fa;box-shadow:inset 3px 0 0 #1d4ed8}
 body>.app-shell .sidebar{background:#fff;border-radius:12px;box-shadow:0 2px 8px #1e293b05}
 body[data-fp-workspace-closure] .topbar{border-radius:12px;background:#fff;box-shadow:0 2px 8px #1e293b05;top:0}
 body[data-box-review] .topbar{top:46px}
 body.fp-internal-page-cleanup .topbar h1{font-size:28px;line-height:1.4}
 body[data-fp-workspace-closure] .topbar .btn.primary,body>.app-shell .sidebar .btn.primary{background:#1d4ed8;color:white;border-color:#1d4ed8;box-shadow:none}
 body.fp-internal-page-cleanup :is(.row-actions,.card-actions,.fp-order-actions) button{min-height:44px;padding:10px 14px;font-size:14px;line-height:1.45}
 body.fp-internal-page-cleanup .filter-bar :is(input,select){min-height:44px;font-size:16px}
 body .fp-order-stats-row{grid-template-columns:repeat(8,minmax(0,1fr));align-items:stretch;gap:12px}
 body .fp-order-stats-row>article:nth-child(n+3){grid-column:span 2}
 body .fp-order-stats-row .fp-sidecar-card{gap:7px;padding:16px;align-content:start;border-radius:10px;min-height:130px}
 body .fp-order-stats-row .fp-sidecar-card>strong{font-size:21px;line-height:1.6;align-self:start}
 body .fp-sidecar-hero{padding:18px 20px;border-radius:12px;background:#fff;border-color:#dce3ed;box-shadow:none}
 body .fp-sidecar-hero h2{font-size:20px;line-height:1.5}.fp-sidecar-hero p{font-size:12px;letter-spacing:.03em;color:#52637b}
 body .fp-order-row{grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(140px,1fr));gap:18px;padding:20px}
 body .fp-order-actions{grid-column:1/-1;display:flex;justify-content:flex-start;gap:10px}
 body .fp-order-row :is(small,p){font-size:13px;line-height:1.65}
 body .fp-order-row small[data-erp-status]{margin-top:7px;padding:5px 9px;background:#f1f5f9;border-radius:6px;display:inline-block;color:#52637b}
 .box-secondary-stats{border:1px solid #dce3ed;border-radius:10px;background:#fff;padding:0 16px}
 .box-secondary-stats>summary{color:#334155;font-size:14px;font-weight:600;padding:12px 0;min-height:44px}
 .box-secondary-stats[open]{padding-bottom:14px}.box-secondary-stats>.fp-order-stats-row{grid-template-columns:repeat(5,minmax(0,1fr));margin-top:14px}
 .box-secondary-stats>.fp-order-stats-row>article{grid-column:auto;min-height:110px}
 .box-secondary-stats .fp-order-stats-distribution{margin-top:0;border:0;padding:12px 0}
 .box-skip-link{position:fixed;left:16px;top:-100px;z-index:2147483647;background:white;color:#1d4ed8;border:3px solid #1d4ed8;padding:12px;border-radius:8px}
 .box-skip-link:focus{top:60px}
 body .fp-order-filter{gap:10px}body .fp-order-filter :is(input,select){min-height:44px;font-size:14px}
}
@media screen and (max-width:1100px){body .fp-order-stats-row{grid-template-columns:repeat(3,minmax(0,1fr))}body .fp-order-stats-row>article:nth-child(n+3){grid-column:auto}body .fp-order-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media screen and (max-width:760px){
 body .fp-order-stats-row{grid-template-columns:repeat(2,minmax(0,1fr))}body .fp-order-stats-row>article:nth-child(3){grid-column:1/-1}body .fp-order-stats-row .fp-sidecar-card{min-height:100px;padding:14px}
 body .fp-order-row{grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;gap:14px}body .fp-order-row>section:first-child{grid-column:1/-1}
 body .fp-order-filter{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}body .fp-order-filter>input{grid-column:1/-1;min-width:0}
 .box-secondary-stats>.fp-order-stats-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 body>.app-shell .sidebar{border-radius:0}.box-secondary-stats>.fp-order-stats-row>article:nth-child(3){grid-column:auto}
}

@media screen {
 body .fp-order-stats>.fp-order-stats-row{grid-template-columns:repeat(8,minmax(0,1fr))!important}
 body .fp-order-stats-row .fp-sidecar-card>span,body .fp-order-stats-row .fp-sidecar-card>small{font-size:13px;line-height:1.6;color:#52637b}
 .box-order-guide{border:1px solid #dce3ed;border-radius:10px;background:#fff;padding:0 16px}
 .box-order-guide>summary{font-size:14px;font-weight:600;color:#334155;padding:12px 0}
 .box-order-guide .fp-sidecar-hero{border:0;padding:0 0 16px;margin:0}
}
@media screen and (max-width:1100px){body .fp-order-stats>.fp-order-stats-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media screen and (max-width:760px){body .fp-order-stats>.fp-order-stats-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

@media screen {
 body .modal :is(#fp-order-form,#njb-fulfillment-form,#record-form){display:flex;flex-direction:column;overflow:hidden;height:calc(100dvh - 60px);max-height:calc(100dvh - 60px);padding:20px}
 body .modal :is(#fp-order-form,#njb-fulfillment-form,#record-form)>header,body .modal :is(#fp-order-form,#njb-fulfillment-form,#record-form)>footer{flex:0 0 auto;position:static;background:#fff;margin:0;padding:12px 0}
 .box-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:12px 4px;scroll-padding-block:16px}
 .box-module-menu{display:none}
 body #fp-xm-mobile-nav{z-index:200;background:#fff;border:1px solid #dce3ed;box-shadow:0 4px 20px #0f172a12;padding:6px;border-radius:12px}
 body #fp-xm-mobile-nav button{color:#52637b;border-radius:8px;min-height:44px;font-size:13px;background:#fff}
 body #fp-xm-mobile-nav button.active{background:#eaf0ff;color:#1e40af}
 body .fp-ai-widget{bottom:90px}
}
@media screen and (max-width:760px){
 body>.app-shell .sidebar{position:static!important;display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;padding:12px 16px;gap:8px;border-radius:0;margin:0;min-height:0}
 body>.app-shell .sidebar .brand{padding:0;min-height:44px;margin:0;gap:10px}.sidebar .brand-mark{width:34px;height:34px}.sidebar .brand small{font-size:11px}
 body>.app-shell .sidebar .box-module-menu{display:inline-flex;min-height:44px;align-items:center;padding:8px 12px;background:#fff;color:#334155;border:1px solid #cbd5e1;flex-shrink:0}
 body>.app-shell .sidebar:not(.box-menu-open) :is(.nav,.sidebar-bottom){display:none!important}
 body>.app-shell .sidebar.box-menu-open .nav{display:grid;grid-template-columns:1fr 1fr;width:100%;max-height:55vh;overflow:auto;margin:8px 0;white-space:normal}
 body>.app-shell .sidebar.box-menu-open .nav-group{display:contents}.sidebar.box-menu-open .nav-group-title{grid-column:1/-1}
 body>.app-shell .sidebar.box-menu-open .sidebar-bottom{display:flex;width:100%}
 body[data-fp-workspace-closure] .topbar{position:static!important;margin-top:0;padding:16px;border-radius:10px}
 body .workspace-top-membership{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;min-height:0!important;max-width:100%}
 body .workspace-top-membership :is(strong,b){font-size:13px}
 body .topbar-actions{display:flex!important;flex-direction:row!important;gap:8px;flex-wrap:wrap}body .topbar-actions button{flex:1 1 135px;width:auto!important}
 body .modal :is(#fp-order-form,#njb-fulfillment-form,#record-form){height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);padding:14px}
 body .modal :is(#fp-order-form,#njb-fulfillment-form,#record-form)>header{padding-top:4px;padding-bottom:10px}
 body .modal :is(#fp-order-form,#njb-fulfillment-form,#record-form)>footer{padding-top:10px;padding-bottom:0}
 body .modal :is(#fp-order-form,#njb-fulfillment-form,#record-form)>header h2{font-size:19px}
 body[data-box-review]{padding-top:70px}
 body .fp-xm-journey{margin-top:12px}
 .box-dialog-body .fp-order-form-grid{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:760px){
 body[data-fp-ui-closure] #fp-ai-widget.fp-ai-widget{inset:auto 16px 88px auto!important;transform:none!important}
 body #njb-fulfillment-dialog.modal{height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);padding:0;width:calc(100vw - 20px);max-width:calc(100vw - 20px)}
 body #njb-fulfillment-dialog.modal #njb-fulfillment-form{height:100%;max-height:100%;box-sizing:border-box}
}

@media screen{
 .box-workspace-help{background:#fff;border:1px solid #dce3ed;border-radius:10px;padding:0 16px;margin:0 0 16px}
 .box-workspace-help>summary{color:#52637b;font-weight:550;font-size:14px;padding:12px 0}
 .box-workspace-help .fp-xm-journey,.box-workspace-help .fp30-module-guide{box-shadow:none;border:0;margin:0 0 12px}
}
@media screen and (max-width:760px){
 body.fp-internal-page-cleanup .filter-bar input,body.fp-internal-page-cleanup .filter-bar select{flex:0 0 auto;height:44px;min-height:44px;width:100%}
 body #customers .table-customer .table-row{grid-template-columns:minmax(0,1fr);gap:12px;padding:16px}
 body #customers .table-customer .table-row>div:last-child{text-align:left}
 body #customers .table-customer .row-actions{justify-content:flex-start;flex-wrap:wrap}
 body #customers .table-customer .table-head{display:none}
}
@media screen and (max-width:760px){
 body #customers .table-customer{min-width:0;width:100%}
 body #customers .table-customer .thead{display:none}
 body #customers #customer-list{display:grid;gap:12px}
 body #customers .table-customer .table-row{border:1px solid #dce3ed;border-radius:10px;background:#fff}
 body #customers .table-customer .table-row>div:last-child{text-align:left!important}
 body #customers .table-customer .row-actions{justify-content:flex-start!important}
}
@media screen and (max-width:760px){
 body #customers #customer-list{min-width:0;width:100%;max-width:100%}
 body #customers #customer-list .table-row{min-width:0;width:100%;max-width:100%}
}
@media screen{
 body #detail-modal.modal{height:calc(100dvh - 60px);max-height:calc(100dvh - 60px);padding:0}
 body #detail-content.dialog{display:flex;flex-direction:column;height:100%;max-height:100%;overflow:hidden;padding:20px}
 body #detail-content>header,body #detail-content>footer{position:static;flex:0 0 auto;margin:0;padding:12px 0;background:#fff}
}
@media screen and (max-width:760px){
 body #detail-modal.modal{height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)}
 body #detail-content.dialog{padding:14px}
 body #detail-content>footer{display:flex;flex-wrap:wrap;gap:8px}
 body #detail-content>footer .btn{width:auto;flex:1 1 130px;min-height:44px;font-size:13px;padding:8px 10px}
}
