/* 1.47.0 手机界面。所有规则挂在 html.is-mobile 下：由 assets/mobile.js 按设备判定加类，
 * 电脑访问不加类，样式完全不受影响。断点不再决定布局，只做手机内的细分。 */

html.is-mobile { -webkit-text-size-adjust: 100%; }
html.is-mobile body { padding-top: 56px; padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); background: var(--canvas); }
html.is-mobile body.drawer-open { overflow: hidden; }
html.is-mobile #authGate ~ * { padding-top: 0; }
html.is-mobile #appShell[hidden] ~ * { padding: 0; }

/* 登录页 */
html.is-mobile .auth-gate { min-height: 100dvh; padding: 18px 14px; }
html.is-mobile .auth-card { padding: 34px 22px 28px; border-radius: 18px; }
html.is-mobile .auth-card h1 { font-size: 22px; }
html.is-mobile .feishu-login { width: 100%; height: 46px; font-size: 15px; }
html.is-mobile #pendingLogoutButton { width: 100%; margin-top: 10px; }

/* ---------- 外壳：顶栏 / 抽屉 / 底栏（电脑版全部不显示） ---------- */
.mobile-appbar, .mobile-nav-backdrop, .mobile-tabbar, .mobile-nav-close, #layoutSwitchButton, #tableModeButton { display: none; }
html.is-mobile .mobile-appbar {
  position: fixed; z-index: 45; top: 0; left: 0; right: 0; height: 56px;
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 40px; align-items: center; gap: 8px;
  padding: 0 10px 0 6px; color: #eef8f4; background: linear-gradient(100deg, #17413d, var(--deep) 70%);
  box-shadow: 0 6px 20px rgba(9, 34, 30, .22);
}
html.is-mobile .mobile-appbar-button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; color: inherit; background: transparent; }
html.is-mobile .mobile-appbar-button:active { background: rgba(255,255,255,.1); }
html.is-mobile .mobile-menu-icon { position: relative; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
html.is-mobile .mobile-menu-icon::before, html.is-mobile .mobile-menu-icon::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }
html.is-mobile .mobile-menu-icon::before { top: -6px; }
html.is-mobile .mobile-menu-icon::after { top: 6px; }
html.is-mobile .mobile-appbar-title { min-width: 0; display: grid; gap: 1px; }
html.is-mobile .mobile-appbar-title small { overflow: hidden; color: #9dc4b8; font-size: 10px; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
html.is-mobile .mobile-appbar-title strong { overflow: hidden; font-size: 16px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
html.is-mobile .mobile-month-button { height: 32px; max-width: 120px; overflow: hidden; padding: 0 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: #dff5e9; background: rgba(255,255,255,.08); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
html.is-mobile .mobile-account-button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: transparent; }
html.is-mobile .mobile-account-button img, html.is-mobile .mobile-account-button span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: #133c31; background: #84d0a8; object-fit: cover; font-size: 12px; font-weight: 800; }

html.is-mobile .app-shell { display: block; min-height: auto; }
html.is-mobile .sidebar {
  position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(84vw, 330px); height: 100dvh;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-104%); transition: transform .22s ease; box-shadow: none;
}
html.is-mobile .app-shell.nav-open .sidebar { transform: none; box-shadow: 18px 0 50px rgba(0,0,0,.35); }
html.is-mobile .mobile-nav-backdrop { position: fixed; z-index: 65; inset: 0; display: block; background: rgba(8, 28, 26, .5); }
html.is-mobile .mobile-nav-backdrop[hidden] { display: none; }
html.is-mobile .brand { padding: 4px 6px 18px; }
html.is-mobile .mobile-nav-close { position: absolute; top: 14px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; color: #cfe6dd; background: rgba(255,255,255,.08); font-size: 22px; line-height: 1; }
html.is-mobile .side-nav { display: block; flex: 1; }
html.is-mobile .side-nav .nav-label { display: block; }
html.is-mobile .side-nav .nav-item { min-height: 48px; display: flex; justify-content: flex-start; margin: 2px 0; font-size: 15px; }
html.is-mobile .side-nav .nav-item.muted { display: flex; }
html.is-mobile .sidebar-account { display: grid; margin-top: 8px; padding: 12px 6px; }
html.is-mobile .nav-label-spaced { margin-top: 18px; }
html.is-mobile .sidebar-account { margin-top: 8px; }
html.is-mobile .sidebar-foot { padding-top: 12px; }
html.is-mobile #layoutSwitchButton, html.is-mobile #tableModeButton, html.touch-device #layoutSwitchButton { display: block; width: 100%; margin-top: 10px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; color: #cfe6dd; background: rgba(255,255,255,.06); font-size: 12px; font-weight: 700; text-align: center; }
#layoutSwitchButton[hidden], #tableModeButton[hidden] { display: none !important; }

html.is-mobile .mobile-tabbar {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
html.is-mobile .mobile-tabbar[hidden] { display: none; }
html.is-mobile .mobile-tab { min-width: 0; min-height: 50px; display: grid; justify-items: center; align-content: center; gap: 3px; padding: 2px; border: 0; border-radius: 10px; color: #62736e; background: transparent; }
html.is-mobile .mobile-tab-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: #35514c; background: #edf3f0; font-size: 12px; font-weight: 800; }
html.is-mobile .mobile-tab-label { max-width: 100%; overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
html.is-mobile .mobile-tab.active { color: #1f654a; }
html.is-mobile .mobile-tab.active .mobile-tab-icon { color: white; background: linear-gradient(145deg, #68b990, #2d795c); }

/* ---------- 主内容 ---------- */
html.is-mobile .main-content { padding: 12px 12px 20px; }
html.is-mobile .topbar { display: block; margin-bottom: 12px; }
html.is-mobile .topbar > div:first-child .eyebrow, html.is-mobile .topbar h1 { display: none; }
html.is-mobile .topbar p { margin: 0 2px 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
html.is-mobile .topbar-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 0; }
html.is-mobile .topbar-actions .button { width: auto; flex: none; }
html.is-mobile .month-control select, html.is-mobile .month-control .date-picker-entry { width: 100%; min-width: 0; }
html.is-mobile .flash-message { position: fixed; z-index: 80; top: 64px; left: 12px; right: 12px; margin: 0; box-shadow: 0 12px 30px rgba(10, 40, 34, .18); }
html.is-mobile .client-update-notice { padding: 12px; }
html.is-mobile .client-update-notice .button { width: 100%; }
html.is-mobile .loading-state { min-height: 140px; }

html.is-mobile .section-title-row { display: grid; gap: 10px; margin: 2px 0 12px; }
html.is-mobile .section-title-row h2 { font-size: 18px; line-height: 1.3; }
html.is-mobile .section-title-row p { font-size: 12px; line-height: 1.55; }
html.is-mobile .section-actions, html.is-mobile .product-list-toolbar, html.is-mobile #employeeManageActions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html.is-mobile .section-actions .button, html.is-mobile .product-list-toolbar .button { width: 100%; flex: none; white-space: nowrap; }
html.is-mobile .product-list-toolbar .product-list-operator-filter { grid-column: 1 / -1; width: 100%; }
html.is-mobile .section-title-row > .button, html.is-mobile .section-title-row > .panel-actions { width: 100%; }
html.is-mobile .section-title-row > .panel-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.is-mobile .section-title-row > .panel-actions .button { width: 100%; }
html.is-mobile #employeesView .employee-title-row > div:first-child { flex-basis: auto; }
html.is-mobile .monthly-calculation-filter { width: 100%; min-width: 0; }
html.is-mobile .monthly-calculation-filter small { text-align: left; }

/* 控件：手机上更大更好点，输入框 16px 避免 iOS 聚焦时放大页面 */
html.is-mobile select, html.is-mobile input[type="month"], html.is-mobile input[type="date"], html.is-mobile input[type="search"], html.is-mobile input[type="text"], html.is-mobile input[type="number"], html.is-mobile .date-picker-entry .date-picker-manual { height: 44px; min-width: 0; font-size: 16px; }
html.is-mobile .search-box { height: 44px; min-width: 0; }
html.is-mobile .search-box input { height: auto; font-size: 16px; }
html.is-mobile .search-box.wide { min-width: 0; width: 100%; }
html.is-mobile .button { min-height: 42px; height: auto; padding: 8px 14px; font-size: 14px; white-space: normal; }
html.is-mobile .button-small, html.is-mobile .button-compact { min-height: 36px; padding: 6px 11px; font-size: 12px; }
html.is-mobile .icon-button { width: 38px; height: 38px; }
html.is-mobile .table-link { padding: 7px 9px; font-size: 12px; }
html.is-mobile .text-button { width: calc(100% - 28px); margin: 3px 14px 14px; font-size: 13px; }

/* 面板与卡片 */
html.is-mobile .panel { border-radius: 12px; }
html.is-mobile .panel-head, html.is-mobile .panel-head.compact { min-height: 0; display: grid; gap: 10px; padding: 12px 14px; }
html.is-mobile .panel-head h2, html.is-mobile .panel-head h3 { font-size: 15px; }
html.is-mobile .panel-head p { font-size: 12px; line-height: 1.5; }
html.is-mobile .panel-actions, html.is-mobile .panel-head-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html.is-mobile .panel-actions .search-box, html.is-mobile .panel-head-actions .result-count { grid-column: 1 / -1; }
html.is-mobile .panel-actions .button, html.is-mobile .panel-head-actions .button { width: 100%; }
html.is-mobile .panel-actions > :only-child, html.is-mobile .panel-head-actions > :only-child { grid-column: 1 / -1; }
html.is-mobile .panel-subhead { padding: 10px 14px 8px; }
html.is-mobile .panel-subhead small { font-size: 10px; }
html.is-mobile .empty-dashboard { min-height: 260px; padding: 32px 18px; }
html.is-mobile .empty-dashboard p { font-size: 13px; }
html.is-mobile .empty-state { padding: 28px 16px; font-size: 13px; }
html.is-mobile .result-count { font-size: 12px; }

/* 指标卡：两列，字号收紧 */
html.is-mobile .kpi-grid, html.is-mobile .employee-kpi-grid, html.is-mobile .operations-kpi-grid, html.is-mobile .operations-settings-kpis, html.is-mobile .recruiting-kpis, html.is-mobile .monthly-estimate-kpis, html.is-mobile .launch-accounting-kpis, html.is-mobile .channel-cooperation-kpis, html.is-mobile .recruiting-service-fee-kpis, html.is-mobile .operations-promotion-masterdata .employee-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
html.is-mobile .kpi-card { min-height: 0; padding: 14px; }
html.is-mobile .kpi-card > strong { margin: 10px 0 6px; font-size: clamp(14px, 4.6vw, 20px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.is-mobile .kpi-card p { font-size: 11px; }
html.is-mobile .employee-kpi-grid article { min-height: 0; gap: 5px; padding: 12px 13px; }
html.is-mobile .employee-kpi-grid span { font-size: 11px; }
html.is-mobile .employee-kpi-grid strong { font-size: clamp(14px, 4.3vw, 18px); letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
html.is-mobile .employee-kpi-grid small { font-size: 10px; line-height: 1.4; }
html.is-mobile .permission-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.is-mobile .permission-summary > div { padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
html.is-mobile .permission-summary > div:nth-child(odd) { border-right: 1px solid var(--line); }
html.is-mobile .permission-summary > div:nth-last-child(-n+2) { border-bottom: 0; }
html.is-mobile .order-rights-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.is-mobile .order-rights-kpis article { padding: 12px 14px; border-right: 0; border-bottom: 1px solid #eee6d7; }
html.is-mobile .order-rights-kpis article:nth-child(odd) { border-right: 1px solid #eee6d7; }
html.is-mobile .order-rights-kpis article:nth-last-child(-n+2) { border-bottom: 0; }
html.is-mobile .order-rights-kpis strong { font-size: 17px; }

/* 说明横幅：竖排、缩小 */
html.is-mobile .formula-banner, html.is-mobile .operations-formula-banner, html.is-mobile .operations-settings-notice, html.is-mobile .monthly-calculation-notice, html.is-mobile .unassigned-panel, html.is-mobile .alimama-status-banner, html.is-mobile .channel-cooperation-notice, html.is-mobile .company-notice { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 12px; padding: 12px 14px; }
html.is-mobile .formula-banner { min-height: 0; grid-template-columns: 36px minmax(0, 1fr); align-items: center; }
html.is-mobile .formula-banner span { font-size: 12px; }
html.is-mobile .quality-pill { display: inline-block; grid-column: 2; justify-self: start; margin: 0; }
html.is-mobile .operations-formula-banner strong { font-size: 14px; line-height: 1.45; }
html.is-mobile .operations-formula-banner p, html.is-mobile .operations-settings-notice p, html.is-mobile .monthly-calculation-notice p, html.is-mobile .unassigned-panel p, html.is-mobile .channel-cooperation-notice p, html.is-mobile .company-notice { max-width: none; font-size: 11px; line-height: 1.55; text-align: left; }
html.is-mobile .operations-settings-notice strong { font-size: 13px; }
html.is-mobile .monthly-calculation-notice, html.is-mobile .unassigned-panel { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
html.is-mobile .unassigned-icon { width: 34px; height: 34px; }
html.is-mobile .monthly-calculation-notice h3, html.is-mobile .unassigned-panel h3 { font-size: 13px; }
html.is-mobile .launch-matching-note { font-size: 11px; line-height: 1.55; }
html.is-mobile .monthly-estimate-status { padding: 10px 12px; font-size: 12px; line-height: 1.5; }
html.is-mobile .company-summary summary { display: grid; gap: 6px; padding: 14px; }
html.is-mobile .company-summary summary > span:last-child { text-align: left; }
html.is-mobile .company-settings { padding: 14px; }
html.is-mobile .company-settings fieldset { padding: 12px; }

/* 页内分类卡（订单管理 5 个、月度计算 2 个……）：横向滑动一排 */
html.is-mobile .order-source-tabs { display: flex; gap: 8px; margin: 0 -12px 12px; padding: 2px 12px 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
html.is-mobile .order-source-tabs::-webkit-scrollbar { display: none; }
html.is-mobile .order-source-tab { flex: 0 0 auto; min-width: 150px; min-height: 56px; grid-template-columns: 32px minmax(0, 1fr); column-gap: 9px; padding: 9px 12px; scroll-snap-align: start; }
html.is-mobile .order-source-tab > span { width: 32px; height: 32px; font-size: 12px; }
html.is-mobile .order-source-tab strong { font-size: 13px; }
html.is-mobile .order-source-tab small { font-size: 10px; }
html.is-mobile .order-source-tabs.monthly-calculation-tabs, html.is-mobile .order-source-tabs.launch-product-list-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 12px; padding: 0; overflow: visible; }
html.is-mobile .order-source-tabs.monthly-calculation-tabs .order-source-tab, html.is-mobile .order-source-tabs.launch-product-list-tabs .order-source-tab { min-width: 0; }
html.is-mobile .order-workspace-tabs { margin-bottom: 8px; }
html.is-mobile .youzan-page-switcher { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
html.is-mobile .youzan-page-switcher button { grid-template-columns: 34px minmax(0, 1fr); gap: 9px; padding: 10px 11px; }
html.is-mobile .youzan-page-switcher button > span:first-child { width: 34px; height: 34px; font-size: 12px; }
html.is-mobile .youzan-page-switcher strong { font-size: 12px; }
html.is-mobile .youzan-page-switcher small { font-size: 9px; }
html.is-mobile .recruiting-toolbar { min-height: 0; display: grid; gap: 10px; padding: 12px 14px; }
html.is-mobile .recruiting-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.is-mobile .recruiting-tabs button { min-height: 38px; font-size: 12px; }
html.is-mobile .recruiting-filters { min-width: 0; width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
html.is-mobile .recruiting-filters .search-box, html.is-mobile .recruiting-filters select, html.is-mobile .recruiting-filters .button { width: 100%; min-width: 0; }
html.is-mobile .recruiting-toolbar > div > strong { font-size: 14px; }
html.is-mobile .panel-inline-hint { font-size: 11px; line-height: 1.5; }

/* 筛选表单：两列，搜索类控件占整行 */
html.is-mobile .monthly-estimate-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
html.is-mobile .monthly-estimate-filters label { flex: none; font-size: 12px; }
html.is-mobile .monthly-estimate-filters label:has(input[type="search"]), html.is-mobile .channel-cooperation-team-picker, html.is-mobile .channel-cooperation-match-search { grid-column: 1 / -1; }
html.is-mobile .monthly-estimate-filters input { height: 44px; font-size: 16px; }
html.is-mobile .channel-cooperation-team-field { min-height: 44px; }
html.is-mobile .monthly-estimate-filters .channel-cooperation-team-field input { height: 34px; font-size: 15px; }
html.is-mobile .launch-accounting-filter-panel { padding: 14px; }
html.is-mobile .launch-accounting-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html.is-mobile .launch-accounting-filters label:nth-child(3), html.is-mobile .launch-accounting-filters .button { grid-column: 1 / -1; width: 100%; }
html.is-mobile .launch-accounting-filters input, html.is-mobile .launch-accounting-filters select { height: 44px; }
html.is-mobile .launch-product-search-bar { display: grid; gap: 10px; padding: 12px 14px; }
html.is-mobile .launch-product-search-combobox { width: 100%; }
html.is-mobile .launch-bulk-subsidy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding-left: 0; border-left: 0; white-space: normal; }
html.is-mobile .launch-bulk-subsidy-label { grid-column: 1 / -1; }
html.is-mobile .launch-bulk-subsidy .launch-subsidy-rate { width: 100%; }
html.is-mobile .launch-bulk-subsidy .launch-subsidy-rate input { height: 40px; font-size: 16px; }
html.is-mobile .launch-product-search-hint { font-size: 11px; }
html.is-mobile .promotion-settings-tools, html.is-mobile .order-promotion-tools, html.is-mobile .order-filters, html.is-mobile .saved-first-tools, html.is-mobile .operations-promotion-tools, html.is-mobile .saved-subsidy-tools { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
html.is-mobile .promotion-settings-tools > *, html.is-mobile .order-promotion-tools > *, html.is-mobile .saved-first-tools > *, html.is-mobile .saved-subsidy-tools > * { width: 100%; min-width: 0; max-width: none; }
html.is-mobile .promotion-settings-scope select, html.is-mobile .saved-first-tools select { width: 100%; font-size: 14px; }
html.is-mobile .operations-promotion-tools > label { grid-template-rows: auto 44px; }
html.is-mobile .operations-promotion-tools select, html.is-mobile .operations-promotion-tools .search-box { height: 44px; }
html.is-mobile .youzan-api-panel { display: grid; gap: 10px; padding: 12px 14px; }
html.is-mobile .youzan-api-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html.is-mobile .youzan-api-actions .button { width: 100%; }
html.is-mobile .order-rights-import-row { min-height: 0; display: grid; gap: 8px; padding: 10px 14px; }
html.is-mobile .recruiting-source-grid { gap: 10px; margin-bottom: 12px; }
html.is-mobile .recruiting-source-card { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; padding: 12px 14px; }
html.is-mobile .recruiting-source-copy p { white-space: normal; overflow-wrap: anywhere; }
html.is-mobile .recruiting-source-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-left: 0; }
html.is-mobile .recruiting-source-actions .button { width: 100%; }
html.is-mobile .recruiting-source-actions > :only-child { grid-column: 1 / -1; }
html.is-mobile .channel-cooperation-import-grid { gap: 10px; margin-bottom: 12px; }
html.is-mobile .channel-cooperation-import-card { display: grid; gap: 10px; padding: 12px 14px; }
html.is-mobile .channel-cooperation-import-card h3 { font-size: 14px; }
html.is-mobile .channel-cooperation-import-card p { font-size: 12px; line-height: 1.5; }
html.is-mobile .channel-cooperation-import-card .panel-actions { grid-template-columns: minmax(0, 1fr); }
html.is-mobile .channel-cooperation-sync { display: grid; grid-template-columns: minmax(0, 1fr); }
html.is-mobile .channel-cooperation-sync .button, html.is-mobile #channelCooperationSyncButton { width: 100%; }
html.is-mobile .channel-cooperation-toolbar { display: grid; gap: 10px; }
html.is-mobile .channel-cooperation-sync { display: grid; gap: 8px; }
html.is-mobile .channel-cooperation-sync .button { width: 100%; }
html.is-mobile .recruiting-service-fee-panel { margin-top: 12px; padding: 14px; }
html.is-mobile .recruiting-service-fee-panel > .panel-head { padding-left: 0; padding-right: 0; }
html.is-mobile .channel-cooperation-groups { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
html.is-mobile .operations-settings-group-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; }
html.is-mobile .operations-group-head { min-height: 0; display: grid; gap: 10px; padding: 12px 14px; }
html.is-mobile .operations-group-summary { justify-content: flex-start; gap: 10px 16px; }
html.is-mobile .operations-group-summary div { text-align: left; }
html.is-mobile .operations-group-summary strong { font-size: 15px; }
html.is-mobile .operations-group-card { overflow: hidden; }
html.is-mobile .operations-promotion-masterdata { gap: 12px; margin-top: 18px; padding-top: 16px; }
html.is-mobile .operations-subsidy-summary { display: grid; gap: 10px; padding: 12px 14px; }
html.is-mobile .operations-subsidy-equation { justify-content: flex-start; }
html.is-mobile .content-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
html.is-mobile .right-rail { grid-template-columns: minmax(0, 1fr); gap: 12px; }
html.is-mobile .source-list { padding: 4px 14px 6px; }
html.is-mobile .ranking-chart { padding: 12px 14px 16px; }
html.is-mobile .ranking-row { grid-template-columns: 84px minmax(0, 1fr); }
html.is-mobile .pagination { gap: 8px; padding: 10px 12px; }
html.is-mobile .pagination .button { flex: 1; min-height: 40px; padding: 6px 8px; font-size: 13px; }
html.is-mobile .pagination span { min-width: 0; flex: 0 0 auto; font-size: 12px; }
html.is-mobile .promotion-reference-list { min-width: 0; }
html.is-mobile .promotion-reference { min-width: 0; max-width: 100%; }
html.is-mobile .role-management-actions { flex-wrap: wrap; }

/* ---------- 表格：默认卡片化（每行一张卡，表头文字变成每格的标签），可切回横向表格 ---------- */
html.is-mobile .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
html.is-mobile table { font-size: 13px; }
html.is-mobile th { height: 40px; padding: 0 12px; font-size: 11px; }
html.is-mobile td { padding: 0 12px; }
html.is-mobile.table-scroll .table-wrap { position: relative; }
html.is-mobile.table-scroll .table-wrap::after { content: "← 左右滑动查看 →"; display: block; padding: 6px 12px 8px; color: var(--muted); font-size: 10px; text-align: center; }
html.is-mobile.table-scroll .detail-table-wrap, html.is-mobile.table-scroll .recruiting-table-wrap, html.is-mobile.table-scroll .order-record-table-wrap, html.is-mobile.table-scroll .alimama-table-wrap, html.is-mobile.table-scroll .youzan-brand-table-wrap { max-height: none; }

html.is-mobile:not(.table-scroll) .table-wrap { overflow: visible; max-height: none; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] { display: block; min-width: 0 !important; width: 100%; white-space: normal; table-layout: auto; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > caption { display: none; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > colgroup { display: none; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > thead { display: none; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody { display: block; padding: 8px 10px 10px; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 2px 8px rgba(23, 61, 54, .04); }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr:last-child { margin-bottom: 0; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr[hidden] { display: none; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td, html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > th { height: auto; min-height: 0; min-width: 0; display: block; padding: 6px 8px; border: 0; border-radius: 8px; background: #f6f8f7 !important; box-shadow: none !important; color: #2a3a36; font-size: 13px; line-height: 1.4; text-align: left; white-space: normal; overflow-wrap: anywhere; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.35; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td.numeric { font-variant-numeric: tabular-nums; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td[data-empty] { display: none; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td[data-primary] { order: -1; grid-column: 1 / -1; padding: 0 0 8px; border-radius: 0; border-bottom: 1px solid #e6ebe9; background: transparent !important; color: var(--ink); font-size: 14px; font-weight: 750; line-height: 1.4; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td[data-primary]::before { display: none; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td[data-block] { grid-column: 1 / -1; padding: 4px 0; background: transparent !important; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td[data-label]:has(.button, .table-link, .table-action, .history-action, select, .launch-subsidy-rate, .youzan-cost-input, .youzan-rate-control, .saved-subsidy-editor, .first-record-actions, .role-management-actions) { grid-column: 1 / -1; background: transparent !important; padding-left: 0; padding-right: 0; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td[data-block] > .table-wrap { margin: 4px -12px -10px; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td.loading-cell, html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > td.empty-state { grid-column: 1 / -1; padding: 22px 8px; color: var(--muted); text-align: center; font-size: 13px; background: transparent !important; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr > th[colspan] { grid-column: 1 / -1; padding: 4px 0; color: #245e44; background: transparent !important; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.first-history-group, html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.youzan-brand-group-row { padding: 8px 12px; border-color: #cfe2d9; background: #edf6f1; box-shadow: none; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.first-history-group th { height: auto; padding: 0; background: transparent; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.first-history-group small { display: block; margin: 4px 0 0; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.monthly-total-row { border-color: #8fc5aa; background: #edf8f2; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.channel-cooperation-row-matched { border-left: 4px solid #3f9b74; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.channel-cooperation-row-unmatched { border-left: 4px solid #e0894f; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.recruiting-service-fee-row.active { border-color: var(--green); background: var(--mint); }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.order-operator-details, html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.operations-promotion-breakdown-row { padding: 0; border-color: #cfe2d9; background: #f2f7f5; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.order-operator-details > td, html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.operations-promotion-breakdown-row > td { padding: 10px 12px; background: transparent !important; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.order-operator-details .table-wrap, html.is-mobile:not(.table-scroll) table[data-mobile-cards] > tbody > tr.operations-promotion-breakdown-row .table-wrap { margin: 0; border: 0; background: transparent; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] table[data-mobile-cards] > tbody { padding: 0; }
html.is-mobile:not(.table-scroll) table[data-mobile-cards] table[data-mobile-cards] > tbody > tr { background: white; }
html.is-mobile:not(.table-scroll) .operations-promotion-breakdown, html.is-mobile:not(.table-scroll) .operations-single-member-breakdown { padding: 0; border: 0; background: transparent; }
html.is-mobile:not(.table-scroll) .operations-promotion-breakdown-title { border-radius: 10px 10px 0 0; }
html.is-mobile:not(.table-scroll) .operations-member-summary-row > td { background: transparent; }
html.is-mobile:not(.table-scroll) .order-operator-toggle { padding: 0; }
html.is-mobile:not(.table-scroll) .order-operator-toggle strong { font-size: 14px; }
html.is-mobile:not(.table-scroll) .order-cell-primary, html.is-mobile:not(.table-scroll) .order-cell-secondary, html.is-mobile:not(.table-scroll) .note-cell, html.is-mobile:not(.table-scroll) .promotion-owner-cell .promotion-note, html.is-mobile:not(.table-scroll) .user-cell small, html.is-mobile:not(.table-scroll) .role-management-panel td small, html.is-mobile:not(.table-scroll) .promotion-reference strong, html.is-mobile:not(.table-scroll) .promotion-reference small, html.is-mobile:not(.table-scroll) .operations-choice-list strong, html.is-mobile:not(.table-scroll) .operations-choice-list small { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
html.is-mobile:not(.table-scroll) .order-cell-primary { font-size: 13px; }
html.is-mobile:not(.table-scroll) .order-cell-secondary { font-size: 11px; }
html.is-mobile:not(.table-scroll) td[data-primary] .order-cell-secondary, html.is-mobile:not(.table-scroll) td[data-primary] small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.45; }
html.is-mobile:not(.table-scroll) td.actual-column, html.is-mobile:not(.table-scroll) td.net-commission { color: #176444; font-weight: 800; }
html.is-mobile:not(.table-scroll) .detail-table td:nth-child(3) { max-width: none; }
html.is-mobile:not(.table-scroll) .promotion-owner-cell, html.is-mobile:not(.table-scroll) .channel-cooperation-product, html.is-mobile:not(.table-scroll) .youzan-accounting-cell, html.is-mobile:not(.table-scroll) .recruiting-order-counts, html.is-mobile:not(.table-scroll) .operations-promotion-detail-name, html.is-mobile:not(.table-scroll) .operations-promotion-channel, html.is-mobile:not(.table-scroll) .first-products-table td:first-child, html.is-mobile:not(.table-scroll) .first-products-table td:nth-child(2), html.is-mobile:not(.table-scroll) .first-products-table td:nth-child(3) { min-width: 0; max-width: none; }
html.is-mobile:not(.table-scroll) .first-daily-table td, html.is-mobile:not(.table-scroll) .first-history-table td, html.is-mobile:not(.table-scroll) .saved-subsidy-table td { padding-top: 6px; padding-bottom: 6px; }
html.is-mobile:not(.table-scroll) .first-record-actions { justify-items: stretch; width: 100%; }
html.is-mobile:not(.table-scroll) .first-record-actions .table-action { width: 100%; text-align: center; }
html.is-mobile:not(.table-scroll) .history-action { flex-wrap: wrap; justify-content: flex-end; }
html.is-mobile:not(.table-scroll) .youzan-assignment-cell select, html.is-mobile:not(.table-scroll) .youzan-accounting-mode-control select { min-width: 0; width: 100%; }
html.is-mobile:not(.table-scroll) .youzan-product-date-control input, html.is-mobile:not(.table-scroll) .youzan-cost-input, html.is-mobile:not(.table-scroll) .youzan-rate-control { width: 100%; max-width: 180px; }
html.is-mobile:not(.table-scroll) .launch-subsidy-rate { width: 120px; }
html.is-mobile:not(.table-scroll) .launch-subsidy-rate input { height: 40px; font-size: 16px; }
html.is-mobile:not(.table-scroll) .saved-subsidy-editor { justify-content: end; }
html.is-mobile:not(.table-scroll) .launch-select-column { width: auto; min-width: 0; text-align: left; }
html.is-mobile:not(.table-scroll) .launch-selection-control { grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 8px; }
html.is-mobile:not(.table-scroll) .launch-selection-control input { width: 22px; height: 22px; }
html.is-mobile:not(.table-scroll) .channel-cooperation-operators-panel select { max-width: none; width: 100%; }
html.is-mobile:not(.table-scroll) .channel-cooperation-note { max-width: none; }
html.is-mobile:not(.table-scroll) .channel-cooperation-product .table-link { display: inline-block; margin-top: 6px; }
html.is-mobile:not(.table-scroll) .operations-settings-table .button, html.is-mobile:not(.table-scroll) .promotion-assignment-table .button { min-height: 36px; }
html.is-mobile:not(.table-scroll) td[data-label] .button, html.is-mobile:not(.table-scroll) td[data-label] .table-action { min-height: 38px; }
html.is-mobile:not(.table-scroll) td[data-label] > .table-link { display: inline-block; margin: 2px 6px 2px 0; padding: 8px 11px; font-size: 12px; }
html.is-mobile:not(.table-scroll) .history-action { display: flex; flex-wrap: wrap; gap: 6px; }
html.is-mobile:not(.table-scroll) .history-action .table-link { padding: 8px 11px; font-size: 12px; }
html.is-mobile:not(.table-scroll) .role-badge, html.is-mobile:not(.table-scroll) .account-status, html.is-mobile:not(.table-scroll) .order-status, html.is-mobile:not(.table-scroll) .owner-badge, html.is-mobile:not(.table-scroll) .selection-status, html.is-mobile:not(.table-scroll) .group-badge, html.is-mobile:not(.table-scroll) .employee-role-badge { font-size: 11px; }
html.is-mobile:not(.table-scroll) .user-cell { align-items: flex-start; }

/* ---------- 弹窗：从底部弹出、占满宽度、内部滚动、底部按钮固定 ---------- */
html.is-mobile .modal-backdrop { display: flex; align-items: flex-end; justify-content: center; padding: 0; }
html.is-mobile .modal-backdrop .modal { width: 100%; max-width: 100%; max-height: calc(100dvh - 16px); display: flex; flex-direction: column; overflow: auto; overscroll-behavior: contain; border-radius: 18px 18px 0 0; }
html.is-mobile .modal-backdrop .modal.first-followup-modal { height: calc(100dvh - 16px); }
html.is-mobile .modal-head { position: sticky; z-index: 2; top: 0; flex-shrink: 0; align-items: center; padding: 14px 16px 10px; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid #edf1ef; }
html.is-mobile .modal-head h2 { font-size: 17px; line-height: 1.3; }
html.is-mobile .modal-head .eyebrow { margin-bottom: 3px; font-size: 10px; }
html.is-mobile .modal-foot { position: sticky; z-index: 2; bottom: 0; flex-shrink: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.98); }
html.is-mobile .modal-foot .button { width: 100%; min-height: 44px; padding: 6px 8px; font-size: 14px; }
html.is-mobile #employeeModal .modal-foot, html.is-mobile #employeeSaveError { grid-auto-flow: row; }
html.is-mobile #employeeModal .modal-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.is-mobile #employeeSaveError { grid-column: 1 / -1; }
html.is-mobile #deleteRoleButton { margin-right: 0; }
html.is-mobile .modal .month-first-step, html.is-mobile .modal .upload-step-label, html.is-mobile .modal .drop-zone, html.is-mobile .modal .parse-progress, html.is-mobile .modal .import-preview, html.is-mobile .modal .permission-user-card, html.is-mobile .modal .permission-form-grid, html.is-mobile .modal .permission-columns, html.is-mobile .modal .role-permission-preview, html.is-mobile .modal .role-form-head, html.is-mobile .modal #promotionScopeField, html.is-mobile .modal #channelTeamScopeField, html.is-mobile .modal .permission-scope-help, html.is-mobile .modal .assignment-promotion-card, html.is-mobile .modal .assignment-hint, html.is-mobile .modal .operations-choice-field, html.is-mobile .modal .operations-assignee-card, html.is-mobile .modal .operations-promotion-tools, html.is-mobile .modal .order-upload-progress, html.is-mobile .modal .youzan-preview-notice, html.is-mobile .modal .channel-cooperation-match-source, html.is-mobile .modal .channel-cooperation-match-notice, html.is-mobile .modal .channel-cooperation-match-filters, html.is-mobile .modal .channel-cooperation-match-count, html.is-mobile .modal .channel-cooperation-match-list { margin-left: 14px; margin-right: 14px; }
html.is-mobile .modal .month-first-step { margin-top: 12px; }
html.is-mobile .modal .channel-cooperation-match-source { margin-top: 12px; }
html.is-mobile .modal .channel-cooperation-match-list { max-height: none; margin-bottom: 12px; overflow: visible; }
html.is-mobile .modal .channel-cooperation-candidate { display: grid; gap: 8px; padding: 11px 12px; }
html.is-mobile .modal .channel-cooperation-candidate-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; }
html.is-mobile .modal .channel-cooperation-candidate-side .table-link { min-height: 36px; padding: 8px 12px; font-size: 13px; }
html.is-mobile .organization-form { padding: 12px 14px 16px; }
html.is-mobile .organization-form.two-columns { grid-template-columns: minmax(0, 1fr); }
html.is-mobile .organization-form input, html.is-mobile .organization-form select, html.is-mobile .company-settings input:not([type=checkbox]), html.is-mobile .company-settings select, html.is-mobile .permission-form-grid select, html.is-mobile .role-form-head input, html.is-mobile .month-first-step select { height: 44px; font-size: 16px; }
html.is-mobile .permission-form-grid, html.is-mobile .permission-columns, html.is-mobile .role-form-head, html.is-mobile .operations-promotion-tools, html.is-mobile .operations-choice-list, html.is-mobile .promotion-check-list, html.is-mobile .employee-project-choices { grid-template-columns: minmax(0, 1fr); }
html.is-mobile .operations-choice-list, html.is-mobile .operations-choice-list.promotion-list { max-height: none; }
html.is-mobile .promotion-check-list { max-height: 50vh; }
html.is-mobile .permission-check-list label, html.is-mobile .promotion-check-list label, html.is-mobile .operations-choice-list label { padding: 10px 10px; font-size: 13px; }
html.is-mobile .permission-check-list input, html.is-mobile .promotion-check-list input, html.is-mobile .operations-choice-list input, html.is-mobile .employee-project-choices input { width: 20px; height: 20px; }
html.is-mobile .permission-selection-tools .button { min-height: 36px; }
html.is-mobile .drop-zone { min-height: 190px; padding: 20px; }
html.is-mobile .file-chip strong { max-width: none; }
html.is-mobile .preview-money-grid { grid-template-columns: minmax(0, 1fr); }
html.is-mobile .first-followup-content { padding: 0 14px 12px; }
html.is-mobile .first-followup-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html.is-mobile .first-followup-filters label:nth-child(3), html.is-mobile .first-followup-filters .button { grid-column: 1 / -1; }
html.is-mobile .first-followup-filters input, html.is-mobile .first-followup-filters select { height: 44px; }
html.is-mobile .first-followup-table-wrap { max-height: none; }
html.is-mobile .first-followup-table-wrap table { min-width: 0; }
html.is-mobile .operations-group-promotions-content { padding: 0 14px; }
html.is-mobile .operations-group-promotions-content table { min-width: 0; }
html.is-mobile .operations-candidates-toolbar { display: grid; gap: 8px; }
html.is-mobile .operations-candidates-toolbar button { width: 100%; }
html.is-mobile .youzan-sku-cost-fieldset { max-height: none; }
html.is-mobile .youzan-sku-spec-list { max-width: none; }
html.is-mobile .date-picker-popup { max-width: calc(100vw - 20px); }
