/*
 * 全站可读性基线
 *
 * 页面内容只允许使用三档正文：14px 主体、13px 次要说明、12px 标签/元数据。
 * 新业务模块通过 dashboard-shell.css 自动加载本文件，避免再次出现 7–10px 小字。
 */
:root{
  --portal-font-body:14px;
  --portal-font-secondary:13px;
  --portal-font-meta:12px;
  --portal-font-control:14px;
}

html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.portal-workbench,
body.portal-login,
body.portal-account,
body.portal-admin,
body[class*="portal-dashboard-"]{
  font-size:var(--portal-font-body);
  line-height:1.55;
  text-rendering:optimizeLegibility;
}

/* 公共业务页：表格、筛选、提示和状态信息。 */
body[class*="portal-dashboard-"] :is(button,input,select,textarea){
  font-size:var(--portal-font-control)!important;
}
body[class*="portal-dashboard-"] :is(table,.data-table,.table){
  font-size:var(--portal-font-secondary)!important;
}
body[class*="portal-dashboard-"] :is(th,.table-header,.table-head){
  font-size:var(--portal-font-meta)!important;
  line-height:1.45!important;
}
body[class*="portal-dashboard-"] :is(td,.table-cell){
  font-size:var(--portal-font-secondary)!important;
  line-height:1.5!important;
}
body[class*="portal-dashboard-"] :is(
  .subtitle,.description,.muted,.hint,.help,.helper,.note,.panel-note,
  .card-description,.kpi-foot,.metric-foot,.filter-summary,.empty,.loading
){
  font-size:var(--portal-font-secondary)!important;
  line-height:1.6!important;
}
body[class*="portal-dashboard-"] :is(
  small,.eyebrow,.section-kicker,.label,.tag,.badge,.status,.meta,
  .nav-label,.nav-index,.filter-block-label,.filter-group label,
  .portal-metric-note
){
  font-size:var(--portal-font-meta)!important;
  line-height:1.45!important;
}
body[class*="portal-dashboard-"] :is(.sidebar,.nav-list,.nav-item,.topbar,.toolbar){
  font-size:var(--portal-font-body);
}
body[class*="portal-dashboard-"] :is(.nav-item,.tab,.tabs button,.secondary,.primary,.btn-primary,.btn-secondary){
  font-size:var(--portal-font-secondary)!important;
}

/* 公共顶部导航。 */
#portal-dashboard-shell{font-size:var(--portal-font-body)}
#portal-dashboard-shell .portal-shell-title{font-size:15px}
#portal-dashboard-shell .portal-shell-current,
#portal-dashboard-shell .portal-context-switcher,
#portal-dashboard-shell .portal-context-switcher select,
#portal-dashboard-shell .portal-shell-nav a,
#portal-dashboard-shell .portal-shell-logout,
#portal-dashboard-shell .portal-shell-menu{font-size:var(--portal-font-secondary)}
#portal-dashboard-shell .portal-shell-user{font-size:var(--portal-font-meta)}

/* 库存与销售经营：侧栏、指标卡、分析切换和数据表。 */
body.portal-dashboard-inventory :is(
  .brand-title,.page-title,.panel-title,.kpi-label,.health-kpi label,
  .analysis-tab,.inventory-analysis-tabs button
){font-size:var(--portal-font-body)!important}
body.portal-dashboard-inventory :is(
  .brand-subtitle,.nav-label,.nav-index,.scope-banner,.panel-note,
  .kpi-foot,.health-kpi small,.inventory-window-switch small
){font-size:var(--portal-font-meta)!important;line-height:1.5!important}
body.portal-dashboard-inventory :is(
  .nav-item,.topbar button,.analysis-toolbar button,.inventory-window-switch strong,
  .sales-channel-toggle,.sku-toggle,.style-toggle
){font-size:var(--portal-font-secondary)!important}
body.portal-dashboard-inventory :is(.kpi-value,.health-kpi strong){line-height:1.18!important}

/* 项目损益：旧页面也使用同一可读性下限。 */
body.portal-dashboard-profit .app-header .subtitle{font-size:var(--portal-font-body)!important}
body.portal-dashboard-profit .nav-tabs a,
body.portal-dashboard-profit .filter-block-label,
body.portal-dashboard-profit .filter-group label,
body.portal-dashboard-profit .kpi-label,
body.portal-dashboard-profit .kpi-group-heading strong{font-size:var(--portal-font-secondary)!important}
body.portal-dashboard-profit table{font-size:var(--portal-font-secondary)!important}

/* 门店、年度预算和发票等独立模块。 */
body.portal-dashboard-module :is(.page-subtitle,.section-description,.card-subtitle,.metric-label),
body.portal-dashboard-invoice :is(.page-subtitle,.section-description,.card-subtitle,.metric-label){
  font-size:var(--portal-font-secondary)!important;
}
body.portal-dashboard-module :is(.filter-label,.field-label,.table-note,.updated-at),
body.portal-dashboard-invoice :is(.filter-label,.field-label,.table-note,.updated-at){
  font-size:var(--portal-font-meta)!important;
}

/* 工作台。 */
body.portal-workbench .nav-label{font-size:12px}
body.portal-workbench .nav-link{font-size:14px}
body.portal-workbench .nav-index{font-size:12px}
body.portal-workbench .nav-loading,
body.portal-workbench .sidebar-status{font-size:13px}
body.portal-workbench .sidebar-foot p{font-size:12px;line-height:1.65}
body.portal-workbench .sidebar-foot small{font-size:12px}
body.portal-workbench .breadcrumb,
body.portal-workbench .global-search input,
body.portal-workbench .admin-shortcut,
body.portal-workbench .account-shortcut{font-size:13px}
body.portal-workbench .global-search kbd{font-size:12px}
body.portal-workbench .user-copy strong{font-size:13px}
body.portal-workbench .user-copy span,
body.portal-workbench .logout{font-size:12px}
body.portal-workbench .notice{font-size:13px;line-height:1.6}
body.portal-workbench .eyebrow,
body.portal-workbench .section-kicker{font-size:12px}
body.portal-workbench .hero-copy>p{font-size:15px;line-height:1.8}
body.portal-workbench .hero-meta,
body.portal-workbench .summary-main>span,
body.portal-workbench .summary-main p{font-size:12px}
body.portal-workbench .summary-details span{font-size:12px}
body.portal-workbench .section-heading p{font-size:13px;line-height:1.65}
body.portal-workbench .legend{font-size:12px}
body.portal-workbench .flow-number,
body.portal-workbench .flow-status,
body.portal-workbench .flow-placeholder{font-size:12px}
body.portal-workbench .flow-step h3{font-size:16px}
body.portal-workbench .flow-step p,
body.portal-workbench .flow-action button{font-size:13px}
body.portal-workbench .result-count{font-size:12px}
body.portal-workbench .dashboard-row{min-height:306px}
body.portal-workbench .domain-label,
body.portal-workbench .module-status,
body.portal-workbench .coverage span,
body.portal-workbench .dashboard-meta>span{font-size:12px}
body.portal-workbench .dashboard-copy h3{font-size:17px}
body.portal-workbench .dashboard-copy p,
body.portal-workbench .dashboard-meta>strong,
body.portal-workbench .dashboard-action{font-size:13px}
body.portal-workbench .empty span,
body.portal-workbench .empty button{font-size:13px}
body.portal-workbench .identity span,
body.portal-workbench .context-list dt{font-size:12px}
body.portal-workbench .context-list dd,
body.portal-workbench .context-action,
body.portal-workbench .context-note{font-size:13px;line-height:1.6}

/* 登录与账户。 */
body.portal-login,
body.portal-account{font-size:15px}
body.portal-login :is(button,input),
body.portal-account :is(button,input){font-size:15px}
body.portal-login .footnote,
body.portal-account .footnote{font-size:13px;line-height:1.65}

/* 组织权限。 */
body.portal-admin :is(button,input,textarea,select){font-size:14px}
body.portal-admin :is(.muted,.module-meta,.module-state,.module-count,.quiet-note){font-size:13px}
body.portal-admin :is(.system-nav a,.tabs button,.nav-caption,.nav-note){font-size:13px}
body.portal-admin :is(.people-table,.audit){font-size:13px}
body.portal-admin :is(.people-table th,.audit th){font-size:12px}
body.portal-admin :is(.person-name span,.tag,.scheme-section label,.scheme-empty){font-size:12px}

@media(max-width:1180px){
  :root{--portal-font-body:15px;--portal-font-secondary:14px;--portal-font-meta:12px;--portal-font-control:14px}
  #portal-dashboard-shell .portal-shell-nav a,
  #portal-dashboard-shell .portal-shell-logout{font-size:14px}
  body.portal-workbench .dashboard-row{min-height:0}
}

@media(max-width:680px){
  body.portal-workbench .hero-copy>p{font-size:14px}
  body[class*="portal-dashboard-"] :is(table,.data-table,.table){font-size:13px!important}
}

@media print{
  body.portal-workbench,
  body.portal-login,
  body.portal-account,
  body.portal-admin,
  body[class*="portal-dashboard-"]{font-size:11pt}
}
