/* SKU ERP B03 unified visual system
   UI-only overrides for desktop, tablet and mobile. */
:root{
  --ui3-brand:#2563eb;
  --ui3-brand-strong:#1d4ed8;
  --ui3-brand-soft:#eff6ff;
  --ui3-teal:#0f8a7d;
  --ui3-teal-soft:#ecfdf8;
  --ui3-canvas:#f3f6fb;
  --ui3-panel:#ffffff;
  --ui3-panel-soft:#f8fafc;
  --ui3-line:#dce5ef;
  --ui3-line-strong:#cbd7e5;
  --ui3-text:#17243a;
  --ui3-muted:#65758b;
  --ui3-danger:#b45309;
  --ui3-radius:16px;
  --ui3-radius-sm:11px;
  --ui3-shadow:0 9px 30px rgba(21,42,76,.065);
  --ui3-shadow-hover:0 16px 40px rgba(21,42,76,.11);
  --ui3-focus:0 0 0 4px rgba(37,99,235,.12);
  --erp-bg:var(--ui3-canvas);
  --erp-text:var(--ui3-text);
  --erp-muted:var(--ui3-muted);
  --erp-border:var(--ui3-line);
  --erp-blue:var(--ui3-brand);
  --erp-green:#0f8a65;
  --erp-radius:var(--ui3-radius);
  --erp-shadow:var(--ui3-shadow);
}
html{scroll-behavior:smooth;background:var(--ui3-canvas)}
body.erp-mode{background:linear-gradient(180deg,#f7f9fc 0,#f2f5fa 260px,#f3f6fb 100%);color:var(--ui3-text);font-family:"Microsoft YaHei","PingFang SC","Segoe UI",system-ui,sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body.erp-mode ::selection{background:#dbeafe;color:#173b76}
body.erp-mode :focus-visible{outline:2px solid rgba(37,99,235,.58);outline-offset:2px}

/* Application shell */
.erp-sidebar{width:var(--erp-sidebar);background:linear-gradient(180deg,#10233f 0%,#142b4c 52%,#10213b 100%)!important;border-right:1px solid rgba(255,255,255,.07)!important;box-shadow:12px 0 36px rgba(15,29,52,.15)!important}
.erp-sidebar-aurora{opacity:.82;background:radial-gradient(circle at 18% 0%,rgba(59,130,246,.27),transparent 38%),radial-gradient(circle at 95% 58%,rgba(20,184,166,.15),transparent 34%)!important}
.erp-brand{height:78px;padding:0 19px;border-bottom-color:rgba(255,255,255,.075)}
.erp-brand-mark{width:40px;height:40px;border-radius:13px;background:linear-gradient(145deg,#3b82f6,#06b6d4);box-shadow:0 10px 26px rgba(37,99,235,.28)}
.erp-brand-text strong{font-size:16px;letter-spacing:.02em}.erp-brand-text span{font-size:9px;letter-spacing:.13em;color:#8ea7c7}
.erp-nav{padding:14px 11px 18px;scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.28) transparent}
.erp-nav-group{margin:13px 10px 6px;color:#7189aa;font-size:9px;font-weight:800;letter-spacing:.15em}
.erp-nav button{min-height:48px;margin:3px 0;padding:8px 10px;border:1px solid transparent;border-radius:12px;color:#c0cee0;gap:10px}
.erp-nav button:hover{background:rgba(255,255,255,.065);border-color:rgba(148,197,255,.1)}
.erp-nav button.active{background:linear-gradient(90deg,rgba(59,130,246,.27),rgba(14,165,233,.08))!important;border-color:rgba(96,165,250,.24)!important;box-shadow:inset 3px 0 0 #60a5fa,0 8px 20px rgba(5,18,38,.13)}
.erp-nav-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.045);flex:0 0 auto}
.erp-nav-copy b{font-size:12px;letter-spacing:.01em}.erp-nav-copy small{font-size:9px;color:#7890b0}
.erp-sidebar-bottom{background:rgba(3,13,29,.12)}
.erp-sidebar-collapse{min-height:41px;border-radius:11px}
.erp-topbar{height:72px;padding:0 clamp(18px,2vw,32px)!important;background:rgba(250,252,255,.9)!important;border-bottom:1px solid rgba(207,218,232,.86)!important;backdrop-filter:blur(18px) saturate(145%);box-shadow:0 5px 24px rgba(23,43,75,.04)!important}
.erp-page-icon{width:40px;height:40px;border-radius:13px;background:linear-gradient(145deg,#edf5ff,#eefcf9)!important;border:1px solid #d9e8f8!important;box-shadow:0 6px 16px rgba(37,99,235,.07)}
.erp-breadcrumb strong{font-size:18px;font-weight:760;letter-spacing:-.015em}.erp-breadcrumb small{color:#77869a;font-size:10px}
.erp-date-chip,.erp-status-pill,.erp-user-chip{border-color:#dfe7f1;background:rgba(255,255,255,.82);box-shadow:0 3px 12px rgba(27,50,83,.035)}
.erp-user-chip{border-radius:14px}.erp-avatar{background:linear-gradient(145deg,#183c69,#0f766e)}
.erp-content{padding:clamp(20px,2vw,32px) clamp(16px,2.25vw,36px) 60px!important;max-width:2000px;margin:0 auto}

/* Headings, panels and cards */
.erp-page-heading{margin:0 0 18px!important;padding:2px 0 2px 15px!important;align-items:center}
.erp-page-heading:before{top:2px;bottom:2px;width:4px;background:linear-gradient(180deg,#2563eb,#14b8a6)}
.erp-page-heading h1{font-size:clamp(22px,1.6vw,27px)!important;font-weight:780;letter-spacing:-.035em}.erp-page-heading p{font-size:12px;line-height:1.65;color:var(--ui3-muted)!important}
body.erp-mode .card,.erp-panel,.erp-module-card,.intel-card,.ai-center-card,.smart-clean-card,.smart-external-card,.smart-result,.smart-analysis-panel,.smart-preview-panel,.smart-business-panel,.peer-analytics-panel,.peer-management-slot,.valuation-card,.maint-box{
  border-color:rgba(207,218,232,.92)!important;border-radius:var(--ui3-radius)!important;background:rgba(255,255,255,.96)!important;box-shadow:var(--ui3-shadow)!important
}
body.erp-mode .card{padding:clamp(16px,1.35vw,23px)!important;margin-bottom:16px!important}
.erp-panel,.erp-module-card{padding:18px}
.erp-module-card,.erp-kpi-card,.kpi,.file-item,.receipt-source-card{transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.erp-module-card:hover,.erp-kpi-card:hover{transform:translateY(-2px);border-color:#c4d6ea!important;box-shadow:var(--ui3-shadow-hover)!important}
.erp-module-grid{grid-template-columns:repeat(3,minmax(230px,1fr));gap:15px}
.erp-module-card .erp-module-icon{width:44px;height:44px;border-radius:13px;background:linear-gradient(145deg,#edf5ff,#f3fbfa);border:1px solid #d9e8f7;color:var(--ui3-brand)}
.erp-module-card h3,.erp-panel-head h3{color:#1b2b43;font-weight:760}.erp-module-card p{color:var(--ui3-muted);line-height:1.7}
.step-title{gap:12px;margin-bottom:16px}.step-title>b{flex:0 0 36px;width:36px;height:36px;background:linear-gradient(145deg,#2563eb,#0f9f92)!important;border:3px solid #e9f3ff;box-shadow:0 7px 18px rgba(37,99,235,.19)}
.step-title h2,.result-head h2,.box-head h2,.box-head h3{color:#1b2b43;letter-spacing:-.02em}.step-title p,.result-head p,.box-head p{line-height:1.6}
.box-head,.result-head,.chart-head{gap:14px}

/* Dashboard */
.erp-dashboard-hero{min-height:190px;padding:30px 32px;border-radius:22px;background:linear-gradient(120deg,#071a35 0%,#123f77 52%,#0c6874 132%);border:1px solid rgba(147,197,253,.17);box-shadow:0 20px 52px rgba(10,35,72,.21)}
.erp-dashboard-hero h2{font-size:28px!important}.erp-dashboard-hero p{font-size:13px;line-height:1.75}.erp-hero-tags{gap:7px;flex-wrap:wrap}.erp-hero-tags span{padding:5px 10px;font-size:9px}
.erp-dashboard-hero .hero-actions{display:flex;gap:9px;flex-wrap:wrap}.erp-dashboard-hero button{min-height:42px;border-radius:11px;padding:9px 16px}
.erp-kpi-grid,.intel-kpis{grid-template-columns:repeat(6,minmax(130px,1fr));gap:13px}
.erp-kpi-card,.intel-kpi,.kpi{border:1px solid var(--ui3-line);border-radius:14px;background:linear-gradient(145deg,#fff,#fafcff);box-shadow:0 5px 17px rgba(20,43,78,.04)}
.erp-kpi-card{padding:17px;min-height:116px}.erp-kpi-value,.kpi b{font-variant-numeric:tabular-nums;letter-spacing:-.04em}
.erp-dashboard-grid{grid-template-columns:minmax(0,1.45fr) minmax(320px,.72fr);gap:16px}.erp-flow{gap:9px}.erp-flow-step{min-height:104px;border-color:#dee7f1;border-radius:12px;background:linear-gradient(145deg,#fbfdff,#f7f9fc)}

/* Controls and forms */
body.erp-mode input,body.erp-mode select,body.erp-mode textarea{border:1px solid #cbd7e5;border-radius:10px;background:#fff;color:#20304a;min-width:0}
body.erp-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),body.erp-mode select{min-height:40px;padding:7px 10px}
body.erp-mode textarea{padding:10px 11px;line-height:1.55}
body.erp-mode input:focus,body.erp-mode select:focus,body.erp-mode textarea:focus{outline:0;border-color:#79a8ef!important;box-shadow:var(--ui3-focus)!important}
body.erp-mode label{line-height:1.45}
.toolbar,.dim-controls,.sales-filter-panel,.receipt-filter-panel,.peer-trend-toolbar,.yd-filters,.yd-settings,.control-filter-group,.control-filter-advanced{border-color:var(--ui3-line)!important;background:linear-gradient(180deg,#fff,#f8fafc)!important;border-radius:14px!important}
.actions{gap:8px}body.erp-mode button,body.erp-mode .small-upload{border-radius:10px;font-weight:700}
body.erp-mode .primary{background:linear-gradient(135deg,#2563eb,#1684df)!important;box-shadow:0 6px 17px rgba(37,99,235,.17)}
body.erp-mode .success{background:linear-gradient(135deg,#0f8a65,#0d9488)!important;box-shadow:0 6px 17px rgba(15,138,101,.15)}
body.erp-mode .ghost{background:#f1f5f9;color:#40516a;border:1px solid #dfe7f0}
body.erp-mode .ghost:hover{background:#eaf1f8;border-color:#c8d7e7;color:#234263}
body.erp-mode button:disabled{filter:saturate(.55);opacity:.5;box-shadow:none!important}
.dropzone,.v83-drop,.peer-maintenance-drop,.peer-maintenance-paste,.peer-maintenance-select{border-radius:15px!important;border-color:#a9bdd5!important;background:linear-gradient(145deg,#fbfdff,#f2f7fc)!important}
.dropzone:hover,.dropzone.drag,.v83-drop.drag{border-color:#4f8be8!important;background:linear-gradient(145deg,#eff6ff,#ecfeff)!important;box-shadow:0 12px 30px rgba(37,99,235,.09)}

/* Tables */
.table-wrap,.table-editor,.intel-table-wrap,.ai-center-table,.ai-similar-list{max-width:100%;border:1px solid var(--ui3-line)!important;border-radius:14px!important;background:#fff;box-shadow:0 4px 16px rgba(20,43,78,.025);scrollbar-width:thin;scrollbar-color:#b9c7d8 #edf2f7;-webkit-overflow-scrolling:touch}
.table-wrap::-webkit-scrollbar,.table-editor::-webkit-scrollbar{width:9px;height:9px}.table-wrap::-webkit-scrollbar-track,.table-editor::-webkit-scrollbar-track{background:#edf2f7}.table-wrap::-webkit-scrollbar-thumb,.table-editor::-webkit-scrollbar-thumb{background:#b9c7d8;border-radius:999px;border:2px solid #edf2f7}
body.erp-mode table{font-size:12px}body.erp-mode th{height:43px!important;padding:8px 10px!important;background:linear-gradient(180deg,#f6f8fb,#edf2f7)!important;color:#34465e!important;border-bottom:1px solid #ced9e6!important;font-weight:760;white-space:nowrap}
body.erp-mode td{padding:8px 10px!important;border-bottom-color:#edf1f5!important;color:#34445a}body.erp-mode tbody tr:nth-child(even){background:#fafbfd!important}body.erp-mode tbody tr:hover{background:#eef5ff!important}
.batch-status,.yd-badge,.receipt-status-chip,.ai-status-pill{border-radius:999px;font-weight:750}

/* Tabs, details and records */
.tabs,.maintenance-tabs-grouped{border:1px solid #dbe4ef;background:#edf2f7;border-radius:13px;padding:5px;gap:5px}
.tabs button,.maintenance-tabs-grouped button{border-radius:9px;min-height:38px}.tabs button.active,.maintenance-tabs-grouped button.active{background:#fff;color:var(--ui3-brand);box-shadow:0 4px 14px rgba(20,43,78,.08)}
details>summary{outline:none}.record-fold-content,.tab-panel.active{animation:ui3Reveal .2s ease-out}
.tip,.counter,.muted{line-height:1.65}

/* Modals and authentication */
body.erp-mode .modal,.intel-modal,.v83-exception-modal{background:rgba(7,17,35,.64);backdrop-filter:blur(7px)}
body.erp-mode .modal-panel,.intel-modal-panel,.v83-exception-dialog{border:1px solid rgba(255,255,255,.55);border-radius:20px;background:#f5f8fc;box-shadow:0 32px 100px rgba(3,13,30,.32)}
.modal-head,.modal-footer{border-radius:14px;background:rgba(255,255,255,.96)}
.icon-button{flex:0 0 auto}
.lan-login-card{border-radius:24px!important}.lan-login-card input{min-height:47px}.lan-login-card button{min-height:48px}

/* Module-specific consistency */
.sales-import-grid,.receipt-import-grid,.receipt-analysis-layout,.sales-layout,.smart-center-grid,.smart-analysis-grid{gap:16px}
.sales-settings,.receipt-import-side,.receipt-trend-box,.receipt-model-box,.receipt-daily-box,.receipt-detail-box,.yd-bridge-panel,.yd-model-section{border-color:var(--ui3-line)!important;border-radius:15px!important;box-shadow:0 6px 20px rgba(20,43,78,.035)}
.sales-toolbar,.receipt-toolbar,.peer-trend-toolbar,.yd-filters{gap:10px}
.yd-bridge-head,.yd-model-head{background:linear-gradient(120deg,#f3f9ff,#f1fbf8)}
.yd-stats>div,.yd-pool-kpis>div,.yd-sync-times>div{border-color:#dbe6ee;border-radius:12px;background:linear-gradient(145deg,#fff,#f7fafc)}
.peer-management-flow,.peer-analysis-feature-grid,.peer-management-overview{gap:11px}.peer-management-flow>button,.peer-analysis-feature-grid>article{border-radius:13px;border-color:#dce6ef;background:linear-gradient(145deg,#fff,#f7fafc)}
.peer-analytics-hero,.smart-center-hero,.valuation-hero{border-radius:20px!important}
.maintenance-workspace,.maintenance-overview-grid{gap:14px}.maintenance-content>.tab-panel{border-radius:14px}
.ai-smart-bar,.ai-task-center,.ai-dashboard-brief,.ai-center-hero,.knowledge-center,.pricing-table-center{border-radius:18px!important}
.message{line-height:1.55}.message.error{color:#a34114}.message.ok{color:#08785b}

/* Mobile navigation enhancements */
.erp-mobile-nav-backdrop{display:none;position:fixed;inset:0;z-index:119;border:0!important;border-radius:0!important;background:rgba(5,15,31,.48)!important;backdrop-filter:blur(2px);box-shadow:none!important}
.erp-mobile-dock{display:none;position:fixed;left:10px;right:10px;bottom:max(9px,env(safe-area-inset-bottom));z-index:105;height:62px;padding:6px;border:1px solid rgba(203,215,230,.9);border-radius:18px;background:rgba(255,255,255,.94);backdrop-filter:blur(18px) saturate(145%);box-shadow:0 14px 42px rgba(15,35,66,.2)}
.erp-mobile-dock button{flex:1;min-width:0;border:0;background:transparent;color:#718096;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px 2px;font-size:9px;font-weight:750}
.erp-mobile-dock button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9}.erp-mobile-dock button.active{background:linear-gradient(145deg,#edf5ff,#eefcf9);color:var(--ui3-brand)}

@keyframes ui3Reveal{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:none}}

/* Tablet */
@media(max-width:1280px){
  .erp-kpi-grid,.intel-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .erp-dashboard-grid,.receipt-analysis-layout,.smart-center-grid{grid-template-columns:minmax(0,1fr)}
  .erp-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .erp-dashboard-hero{min-height:170px}.erp-hero-visual{display:none}
}
@media(max-width:1024px){
  :root{--erp-sidebar:220px}
  .erp-content{padding:20px 18px 50px!important}
  .erp-nav-copy small{display:none}
  .sales-import-grid,.receipt-import-grid,.sales-layout,.smart-analysis-grid,.intel-grid-main,.intel-grid-three,.intel-grid-qa{grid-template-columns:minmax(0,1fr)!important}
  .sales-kpis,.receipt-kpis,.peer-trend-kpis,.knowledge-kpis,.valuation-score-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .erp-dashboard-hero .hero-actions{margin-right:0}
}

/* Mobile */
@media(max-width:820px){
  :root{--erp-sidebar:min(84vw,310px);--erp-topbar:64px}
  body.erp-mode{background:#f3f6fb}
  body.erp-sidebar-collapsed{--erp-sidebar:min(84vw,310px)}
  .erp-sidebar,body.erp-sidebar-collapsed .erp-sidebar{z-index:130;transform:translateX(-105%);width:var(--erp-sidebar)!important;box-shadow:18px 0 52px rgba(3,15,33,.28)!important}
  .erp-sidebar.mobile-open{transform:translateX(0)}
  body.erp-sidebar-collapsed .erp-brand{padding:0 19px;justify-content:flex-start}
  body.erp-sidebar-collapsed .erp-brand-text,body.erp-sidebar-collapsed .erp-nav-group,body.erp-sidebar-collapsed .erp-nav-copy,body.erp-sidebar-collapsed .erp-nav-badge,body.erp-sidebar-collapsed .erp-sidebar-foot{display:flex}
  body.erp-sidebar-collapsed .erp-brand-text{display:block}body.erp-sidebar-collapsed .erp-nav-group{display:block}body.erp-sidebar-collapsed .erp-nav-copy{display:flex}body.erp-sidebar-collapsed .erp-nav-badge{display:grid}
  body.erp-sidebar-collapsed .erp-nav{padding:14px 11px 18px}body.erp-sidebar-collapsed .erp-nav button{justify-content:flex-start;padding:8px 10px}body.erp-sidebar-collapsed .erp-nav-icon{width:34px;height:34px}
  .erp-sidebar-collapse{display:none!important}.erp-app{margin-left:0!important}.erp-menu-toggle{display:grid!important}
  body.ui3-mobile-nav-open{overflow:hidden}body.ui3-mobile-nav-open .erp-mobile-nav-backdrop{display:block}
  .erp-mobile-dock{display:flex}
  .erp-topbar{padding:0 11px!important;gap:8px}.erp-topbar-left{gap:8px;min-width:0}.erp-page-icon,.erp-date-chip,.erp-status-pill,#erpFullscreenBtn{display:none!important}
  .erp-menu-toggle,.erp-top-icon{width:40px;height:40px;flex:0 0 auto}.erp-breadcrumb{min-width:0}.erp-breadcrumb strong{display:block;max-width:48vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px}.erp-breadcrumb small{max-width:48vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .erp-topbar-right{gap:5px}.erp-user-chip{min-width:0!important;width:41px;height:41px;padding:4px!important;border-radius:12px}.erp-user-chip>div:nth-child(2),.erp-user-chevron{display:none!important}.erp-avatar{width:31px;height:31px}
  .erp-content{padding:15px 11px calc(94px + env(safe-area-inset-bottom))!important}
  .erp-page-heading{align-items:flex-start;flex-direction:column;gap:10px;margin-bottom:14px!important;padding-left:12px!important}.erp-page-heading h1{font-size:21px!important}.erp-page-heading p{font-size:11px;line-height:1.55}
  .erp-page-heading>.actions{width:100%;display:flex;overflow-x:auto;flex-wrap:nowrap;padding:1px 1px 5px;scrollbar-width:none}.erp-page-heading>.actions::-webkit-scrollbar{display:none}.erp-page-heading>.actions button{flex:0 0 auto;min-height:42px}
  body.erp-mode .card{padding:14px!important;border-radius:14px!important;margin-bottom:12px!important}
  .erp-panel,.erp-module-card,.intel-card,.smart-clean-card,.smart-external-card,.smart-result,.smart-analysis-panel,.smart-preview-panel,.smart-business-panel{padding:14px!important;border-radius:14px!important}
  .erp-module-grid,.erp-dashboard-grid,.erp-dashboard-grid>div,.smart-analysis-grid,.ai-center-grid,.knowledge-grid,.valuation-settings-grid,.maintenance-grid.two{grid-template-columns:minmax(0,1fr)!important}
  .erp-kpi-grid,.intel-kpis,.sales-kpis,.receipt-kpis,.peer-trend-kpis,.peer-analytics-kpi-grid,.smart-kpi-grid,.knowledge-kpis,.valuation-score-grid,.yd-stats,.yd-pool-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .erp-kpi-card,.intel-kpi,.kpi{min-height:96px;padding:12px!important}.erp-kpi-value,.kpi b{font-size:21px}
  .erp-dashboard-hero{min-height:0;padding:21px 18px;border-radius:17px;align-items:flex-start;flex-direction:column}.erp-dashboard-hero h2{font-size:23px!important}.erp-dashboard-hero p{font-size:11px}.erp-dashboard-hero .hero-actions{align-self:stretch}.erp-dashboard-hero .hero-actions button{flex:1}
  .erp-flow{grid-template-columns:minmax(0,1fr)}.erp-flow-step{min-height:0;text-align:left;padding:12px 12px 12px 50px}.erp-flow-step b{position:absolute;left:12px;top:12px;text-align:center}.erp-flow-step:not(:last-child):after{display:none}
  .box-head,.result-head,.chart-head,.smart-result-head,.maintenance-hero-strip{align-items:flex-start;flex-direction:column}.box-head>.actions,.result-head>.actions{width:100%}
  .tabs,.maintenance-tabs-grouped{overflow-x:auto;flex-wrap:nowrap;white-space:nowrap;scrollbar-width:none}.tabs::-webkit-scrollbar,.maintenance-tabs-grouped::-webkit-scrollbar{display:none}.tabs button,.maintenance-tabs-grouped button{flex:0 0 auto}
  .modal{padding:0!important}.modal-panel,.intel-modal-panel,.v83-exception-dialog,.ai-workflow-modal-panel{width:100vw!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding:12px!important}.modal-head{top:0;padding:13px 14px}.modal-footer{position:sticky;bottom:0;padding:10px 12px}
  .table-wrap,.table-editor,.intel-table-wrap{border-radius:11px!important;overscroll-behavior:contain;touch-action:pan-x pan-y}.table-wrap table,.table-editor table{min-width:780px}.compact-table table{min-width:680px}
  .lan-sync-banner{top:8px;max-width:calc(100% - 16px);align-items:flex-start;padding:10px 11px;font-size:11px}.lan-sync-banner button{flex:0 0 auto}
  .yd-bridge-head,.yd-toolbar,.yd-source-row,.yd-status-footer{align-items:flex-start;flex-direction:column}.yd-head-actions,.yd-toolbar .actions,.yd-session-actions{width:100%}.yd-head-actions button,.yd-toolbar .actions button{flex:1}
  .peer-management-flow{grid-template-columns:minmax(0,1fr)}.peer-management-flow>i{transform:rotate(90deg)}
  .control-display-wrap,.sales-table-wrap,.receipt-detail-table,.receipt-daily-table{max-height:62dvh}
}

@media(max-width:560px){
  .erp-content{padding-left:9px!important;padding-right:9px!important}.erp-breadcrumb strong,.erp-breadcrumb small{max-width:44vw}
  .erp-page-heading>.actions button{font-size:12px;padding:8px 11px}
  body.erp-mode input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),body.erp-mode select,body.erp-mode textarea{min-height:44px;font-size:16px}
  .toolbar,.sales-toolbar,.receipt-toolbar,.peer-trend-toolbar,.dim-controls,.yd-filters,.yd-settings,.kdocs-settings-grid,.history-retention-grid,.taobao-settings-grid,.taobao-link-grid,.smart-clean-settings,.smart-external-url,.ai-center-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important}
  .toolbar label,.sales-toolbar label,.receipt-toolbar label,.peer-trend-toolbar label,.yd-filters label,.yd-settings label{width:100%!important;min-width:0!important}
  .card>.actions,.modal-footer>.actions,.record-fold-actions{display:grid;grid-template-columns:minmax(0,1fr);width:100%}.card>.actions button,.modal-footer>.actions button,.record-fold-actions button{width:100%;min-height:44px}
  .erp-kpi-grid,.intel-kpis,.sales-kpis,.receipt-kpis,.peer-trend-kpis,.peer-analytics-kpi-grid,.smart-kpi-grid,.knowledge-kpis,.valuation-score-grid,.yd-stats,.yd-pool-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .sales-import-grid,.receipt-import-grid,.receipt-analysis-layout,.sales-layout,.peer-import-layout,.peer-analytics-main-grid,.smart-center-grid,.smart-analysis-grid,.valuation-hero,.valuation-anchor-list{grid-template-columns:minmax(0,1fr)!important}
  .dropzone{min-height:120px;padding:16px;text-align:center}.dropzone strong{font-size:13px}.dropzone small{font-size:10px;line-height:1.55}
  .step-title{gap:9px}.step-title>b{width:31px;height:31px;flex-basis:31px}.step-title h2{font-size:18px}.step-title p{font-size:11px}
  .modal-head h2{font-size:18px}.modal-head p{font-size:11px}.modal-footer{gap:8px}
  .lan-login-overlay{padding:12px}.lan-login-card{padding:24px 20px!important;border-radius:20px!important}.lan-login-card h1{font-size:25px}
  .erp-mobile-dock{left:7px;right:7px;bottom:max(7px,env(safe-area-inset-bottom));height:60px;border-radius:17px}
}

@media(max-width:390px){
  .erp-kpi-grid,.intel-kpis,.sales-kpis,.receipt-kpis,.peer-trend-kpis,.peer-analytics-kpi-grid,.smart-kpi-grid,.knowledge-kpis,.valuation-score-grid,.yd-stats,.yd-pool-kpis{grid-template-columns:minmax(0,1fr)!important}
  .erp-mobile-dock button{font-size:8px}.erp-mobile-dock button svg{width:18px;height:18px}
}

@media(hover:none),(pointer:coarse){
  .erp-module-card:hover,.erp-kpi-card:hover,body.erp-mode button:hover,.dropzone:hover{transform:none!important}
  body.erp-mode button,.erp-nav button{touch-action:manipulation}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.record-fold-content,.tab-panel.active{animation:none}}
