/**
 * 全功能手机端布局：窄屏抽屉菜单、表格→卡片、弹窗全屏 sheet。
 * 仅在 html[data-gt-mobile="1"] / body.gt-mobile-ops 下生效。
 */
html[data-gt-mobile="1"],
body.gt-mobile-ops {
  --gt-mobile-bottom-h: 56px;
  --gt-mobile-header-h: 56px;
  --gt-dd-primary: #0089ff;
  --gt-dd-bg: #f8fafc;
  --gt-dd-text: #0f172a;
  --gt-dd-muted: #475569;
  --gt-dd-border: #e2e8f0;
  --sidebar-width: min(86vw, 320px);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body.gt-dingtalk-ui {
  background: var(--gt-dd-bg) !important;
}

html[data-gt-mobile="1"] body,
body.gt-mobile-ops {
  overflow-x: hidden;
  max-width: 100vw;
}

/* 隐藏桌面窗口控件 */
html[data-gt-mobile="1"] #global-window-controls,
body.gt-mobile-ops #global-window-controls {
  display: none !important;
}

/* 顶栏紧凑 */
html[data-gt-mobile="1"] .app-header,
body.gt-mobile-ops .app-header {
  min-height: var(--gt-mobile-header-h);
  padding: 0 8px 0 4px !important;
  gap: 4px;
}

html[data-gt-mobile="1"] .header-title,
html[data-gt-mobile="1"] .header-music-player,
html[data-gt-mobile="1"] .ai-assistant-btn,
html[data-gt-mobile="1"] .header-ask-btn,
html[data-gt-mobile="1"] .gt-density-switch,
body.gt-mobile-ops .header-title,
body.gt-mobile-ops .header-music-player,
body.gt-mobile-ops .ai-assistant-btn,
body.gt-mobile-ops .header-ask-btn,
body.gt-mobile-ops .gt-density-switch {
  display: none !important;
}

html[data-gt-mobile="1"] .app-body,
body.gt-mobile-ops .app-body {
  position: relative;
  min-height: 0;
  flex: 1;
}

/* 侧栏改为抽屉 */
html[data-gt-mobile="1"] .app-sidebar,
body.gt-mobile-ops .app-sidebar {
  position: fixed !important;
  left: 0 !important;
  top: var(--gt-mobile-header-h) !important;
  bottom: var(--gt-mobile-bottom-h) !important;
  height: auto !important;
  max-height: none !important;
  z-index: 1200;
  width: var(--sidebar-width) !important;
  min-width: 0 !important;
  max-width: 86vw;
  transform: translateX(-105%);
  transition: transform 0.22s ease;
  box-shadow: 8px 0 28px rgba(15, 23, 42, 0.18);
  background: #fff !important;
  color: #111111 !important;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}

html[data-gt-mobile="1"] .app-sidebar.gt-mobile-open,
body.gt-mobile-ops .app-sidebar.gt-mobile-open {
  transform: translateX(0);
}

html[data-gt-mobile="1"] .gt-mobile-sidebar-mask,
body.gt-mobile-ops .gt-mobile-sidebar-mask {
  display: none;
  position: fixed;
  inset: var(--gt-mobile-header-h) 0 var(--gt-mobile-bottom-h) 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 1190;
  pointer-events: none;
}

html[data-gt-mobile="1"] .gt-mobile-sidebar-mask.show,
body.gt-mobile-ops .gt-mobile-sidebar-mask.show,
html[data-gt-mobile="1"] body.gt-drawer-open .gt-mobile-sidebar-mask.show {
  display: block;
  pointer-events: auto;
  left: min(82vw, 320px);
}

html[data-gt-mobile="1"] .app-main,
html[data-gt-mobile="1"] .page-container,
body.gt-mobile-ops .app-main,
body.gt-mobile-ops .page-container {
  width: 100% !important;
  max-width: 100vw;
  padding: 10px 10px calc(var(--gt-mobile-bottom-h) + 12px) !important;
  margin: 0 !important;
}

html[data-gt-mobile="1"] .app-footer,
body.gt-mobile-ops .app-footer {
  display: none !important;
}

/* 底栏 — 钉钉风格 */
.gt-mobile-tabbar,
.gt-mobile-tabbar.gt-native-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--gt-mobile-bottom-h) + env(safe-area-inset-bottom, 0px));
  z-index: 1300;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: #fff;
  border-top: 1px solid var(--gt-dd-border, #e5e6eb);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: none;
}

.gt-mobile-tabbar button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--gt-dd-muted, #475569);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  min-height: 44px;
  padding: 6px 4px 4px;
  transition: color 0.15s ease;
}

.gt-mobile-tabbar button.active,
.gt-mobile-tabbar button:active {
  color: var(--gt-dd-primary, #0089ff);
  font-weight: 600;
}

.gt-mobile-tabbar button.active .ico svg {
  stroke: var(--gt-dd-primary, #0089ff);
}

.gt-mobile-tabbar .ico {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.gt-mobile-tabbar .ico svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.gt-mobile-tabbar .label {
  font-size: 11px;
  line-height: 1.1;
}

/* 首页能力条 — Mission Control */
.gt-mobile-banner-hub {
  display: grid;
  gap: 12px;
  padding: 16px !important;
  border-radius: 16px !important;
  background:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(3, 105, 161, 0.12), transparent 55%),
    linear-gradient(165deg, #f8fafc 0%, #eef6ff 55%, #f8fafc 100%) !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  margin: 10px 0 14px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.gt-mobile-hub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gt-mobile-hub-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #0369a1, #0f172a);
  box-shadow: 0 2px 8px rgba(3, 105, 161, 0.35);
}

.gt-mobile-banner-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.gt-mobile-banner-text {
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
  font-weight: 600;
}

.gt-mobile-pillars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.gt-mobile-pillars button {
  min-height: 64px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 2px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gt-mobile-pillars button .ico {
  width: 22px;
  height: 22px;
  color: #0369a1;
  display: inline-flex;
}

.gt-mobile-pillars button .ico svg {
  width: 22px;
  height: 22px;
}

.gt-mobile-pillars button.is-download,
.gt-mobile-pillars button.is-download .ico {
  color: #0369a1;
  border-color: #7dd3fc;
  background: #e0f2fe;
}

.gt-mobile-pillars button:active,
.gt-mobile-pillars button:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

.gt-mobile-hub-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #0369a1;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(3, 105, 161, 0.28);
  transition: background-color 0.2s ease;
}

.gt-mobile-hub-cta .ico {
  width: 20px;
  height: 20px;
  display: inline-flex;
}

.gt-mobile-hub-cta .ico svg {
  width: 20px;
  height: 20px;
}

.gt-mobile-hub-cta:active,
.gt-mobile-hub-cta:hover {
  background: #075985;
}

.gt-mobile-banner-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.gt-mobile-banner-actions button {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.gt-mobile-banner-actions button:active,
.gt-mobile-banner-actions button:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0369a1;
}

/* 查询抽屉 */
.gt-mobile-query-sheet {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.gt-mobile-query-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.gt-mobile-query-panel {
  position: relative;
  width: min(100%, 520px);
  max-height: min(88dvh, 640px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.18);
  animation: gt-query-up 0.22s ease;
}

.gt-mobile-query-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 4px auto 10px;
}

@keyframes gt-query-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .gt-mobile-query-panel { animation: none; }
  .gt-mobile-tabbar button,
  .gt-mobile-banner-actions button,
  .gt-mobile-pillars button,
  .gt-mobile-hub-cta { transition: none; }
}

.gt-mobile-query-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.gt-mobile-query-head strong {
  font-size: 17px;
  color: var(--gt-dd-text, #171a1d);
  font-weight: 700;
}

.gt-mobile-query-close {
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.gt-mobile-query-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.gt-mobile-query-sec {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: none;
  margin: 4px 0 8px;
}

.gt-mobile-query-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.gt-mobile-query-grid button {
  min-height: 72px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.gt-mobile-query-grid button .ico {
  width: 24px;
  height: 24px;
  color: #0369a1;
}

.gt-mobile-query-grid button .ico svg {
  width: 24px;
  height: 24px;
}

.gt-mobile-query-grid button:active {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.gt-mobile-ask-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.gt-mobile-ask-chips button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.gt-mobile-ask-chips button:active {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.gt-mobile-download-zone {
  display: grid;
  gap: 10px;
}

.gt-mobile-dl-primary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  background: var(--gt-dd-primary, #0089ff);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.gt-mobile-dl-primary .ico {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.gt-mobile-dl-primary .ico svg {
  width: 28px;
  height: 28px;
}

.gt-mobile-dl-primary .txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gt-mobile-dl-primary .txt strong {
  font-size: 15px;
  font-weight: 800;
}

.gt-mobile-dl-primary .txt em {
  font-style: normal;
  font-size: 12px;
  opacity: 0.88;
  font-weight: 500;
}

.gt-mobile-dl-primary:active {
  background: #0066cc;
}

.gt-mobile-dl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gt-mobile-dl-row button {
  min-height: 56px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #f0f9ff;
  color: #0369a1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.gt-mobile-dl-row button .ico {
  width: 20px;
  height: 20px;
}

.gt-mobile-dl-row button .ico svg {
  width: 20px;
  height: 20px;
}

.gt-mobile-dl-row button:active {
  background: #e0f2fe;
}

/* 菜单项「建议电脑端」标记 */
.gt-mobile-desktop-hint {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
}

/* 表格 → 卡片化 */
html[data-gt-mobile="1"] .data-table-wrapper,
html[data-gt-mobile="1"] .table-container,
html[data-gt-mobile="1"] .list-table-wrap,
body.gt-mobile-ops .data-table-wrapper,
body.gt-mobile-ops .table-container,
body.gt-mobile-ops .list-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
}

html[data-gt-mobile="1"] table.data-table,
html[data-gt-mobile="1"] .data-table,
html[data-gt-mobile="1"] .list-table,
body.gt-mobile-ops table.data-table,
body.gt-mobile-ops .data-table,
body.gt-mobile-ops .list-table {
  min-width: 640px;
  font-size: 12px;
}

html[data-gt-mobile="1"] .toolbar,
html[data-gt-mobile="1"] .page-toolbar,
html[data-gt-mobile="1"] .module-toolbar,
body.gt-mobile-ops .toolbar,
body.gt-mobile-ops .page-toolbar,
body.gt-mobile-ops .module-toolbar {
  flex-wrap: wrap !important;
  gap: 8px !important;
}

html[data-gt-mobile="1"] .btn,
body.gt-mobile-ops .btn {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

/* 弹窗全屏 sheet */
html[data-gt-mobile="1"] .modal-overlay .modal,
html[data-gt-mobile="1"] .modal-dialog,
html[data-gt-mobile="1"] .modal-content,
html[data-gt-mobile="1"] .gt-modal,
body.gt-mobile-ops .modal-overlay .modal,
body.gt-mobile-ops .modal-dialog,
body.gt-mobile-ops .modal-content,
body.gt-mobile-ops .gt-modal {
  width: 100vw !important;
  max-width: 100vw !important;
  min-height: 70vh;
  max-height: 96vh !important;
  margin: 0 !important;
  border-radius: 16px 16px 0 0 !important;
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
}

html[data-gt-mobile="1"] .modal-overlay,
body.gt-mobile-ops .modal-overlay {
  align-items: flex-end !important;
  padding: 0 !important;
}

html[data-gt-mobile="1"] .form-grid,
html[data-gt-mobile="1"] .form-row,
html[data-gt-mobile="1"] .detail-grid,
body.gt-mobile-ops .form-grid,
body.gt-mobile-ops .form-row,
body.gt-mobile-ops .detail-grid {
  grid-template-columns: 1fr !important;
}

html[data-gt-mobile="1"] .card,
html[data-gt-mobile="1"] .panel,
body.gt-mobile-ops .card,
body.gt-mobile-ops .panel {
  border-radius: 12px;
}

html[data-gt-mobile="1"] .login-wrapper,
body.gt-mobile-ops .login-wrapper {
  padding: 12px !important;
}

html[data-gt-mobile="1"] .login-card,
body.gt-mobile-ops .login-card {
  width: 100% !important;
  max-width: 100% !important;
  box-shadow: none !important;
}

/* 快捷首页卡片（并入原四 Tab 原型） */
.gt-mobile-quick-home {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.gt-mobile-quick-home button {
  border: 1px solid rgba(29, 99, 237, 0.18);
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
  color: #0f172a;
  font-size: 14px;
}

.gt-mobile-quick-home button span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.gt-mobile-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.45;
}

.gt-mobile-banner.warn {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.gt-mobile-force-update {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #0f172a;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  text-align: center;
  gap: 14px;
}

.gt-mobile-force-update h1 {
  margin: 0;
  font-size: 22px;
}

.gt-mobile-force-update p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
  max-width: 360px;
}

.gt-mobile-force-update a,
.gt-mobile-force-update button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  border: 0;
  background: #1d63ed;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  font-size: 15px;
}

/* 打印/对账等重操作提示 */
html[data-gt-mobile="1"] .print-btn,
html[data-gt-mobile="1"] [data-desktop-preferred],
body.gt-mobile-ops .print-btn,
body.gt-mobile-ops [data-desktop-preferred] {
  opacity: 0.85;
}

html[data-gt-mobile="1"] .print-btn::after,
body.gt-mobile-ops .print-btn::after {
  content: ' · 建议电脑';
  font-size: 10px;
  font-weight: 700;
  color: #b45309;
}

/* —— P1 核心业务可编辑适配 —— */
html[data-gt-mobile="1"] .quotation-page,
html[data-gt-mobile="1"] .contract-page,
html[data-gt-mobile="1"] .customer-page,
html[data-gt-mobile="1"] .sale-page,
html[data-gt-mobile="1"] .purchase-page,
html[data-gt-mobile="1"] .delivery-page,
html[data-gt-mobile="1"] .expense-page,
html[data-gt-mobile="1"] .warehouse-page,
body.gt-mobile-ops .quotation-page,
body.gt-mobile-ops .contract-page,
body.gt-mobile-ops .customer-page,
body.gt-mobile-ops .sale-page,
body.gt-mobile-ops .purchase-page,
body.gt-mobile-ops .delivery-page,
body.gt-mobile-ops .expense-page,
body.gt-mobile-ops .warehouse-page {
  padding: 0 !important;
}

html[data-gt-mobile="1"] .filter-bar,
html[data-gt-mobile="1"] .search-bar,
html[data-gt-mobile="1"] .action-bar,
body.gt-mobile-ops .filter-bar,
body.gt-mobile-ops .search-bar,
body.gt-mobile-ops .action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

html[data-gt-mobile="1"] input,
html[data-gt-mobile="1"] select,
html[data-gt-mobile="1"] textarea,
body.gt-mobile-ops input,
body.gt-mobile-ops select,
body.gt-mobile-ops textarea {
  font-size: 16px !important; /* 避免 iOS 自动缩放 */
  max-width: 100%;
}

html[data-gt-mobile="1"] .modal-body,
html[data-gt-mobile="1"] .form-section,
body.gt-mobile-ops .modal-body,
body.gt-mobile-ops .form-section {
  max-height: calc(96vh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html[data-gt-mobile="1"] .modal-footer,
body.gt-mobile-ops .modal-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* —— P2 审批 / 薪酬 / 报表 / 设置 —— */
html[data-gt-mobile="1"] .workflow-center,
html[data-gt-mobile="1"] .commission-page,
html[data-gt-mobile="1"] .payroll-page,
html[data-gt-mobile="1"] .reports-page,
html[data-gt-mobile="1"] .settings-page,
html[data-gt-mobile="1"] .premium-addons-page,
body.gt-mobile-ops .workflow-center,
body.gt-mobile-ops .commission-page,
body.gt-mobile-ops .payroll-page,
body.gt-mobile-ops .reports-page,
body.gt-mobile-ops .settings-page,
body.gt-mobile-ops .premium-addons-page {
  overflow-x: hidden;
}

html[data-gt-mobile="1"] .settings-actions.card,
body.gt-mobile-ops .settings-actions.card {
  padding: 12px;
}

html[data-gt-mobile="1"] .chart-container,
html[data-gt-mobile="1"] canvas,
body.gt-mobile-ops .chart-container,
body.gt-mobile-ops canvas {
  max-width: 100% !important;
  height: auto !important;
}

/* —— 手机登录：Trust 浅底一屏表单，去掉长营销区 —— */
html[data-gt-mobile="1"] #login-wrapper,
body.gt-mobile-ops #login-wrapper {
  display: flex !important;
  align-items: stretch;
  justify-content: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 !important;
  background: #f8fafc;
}

html[data-gt-mobile="1"] #app.gt-app-visible,
body.gt-mobile-ops #app.gt-app-visible {
  display: flex !important;
  min-height: 100dvh;
  flex-direction: column;
}

html[data-gt-mobile="1"] #login-wrapper.gt-login-hidden,
body.gt-mobile-ops #login-wrapper.gt-login-hidden,
html[data-gt-mobile="1"] #login-wrapper[style*="display: none"],
html[data-gt-mobile="1"] #login-wrapper[style*="display:none"],
body.gt-mobile-ops #login-wrapper[style*="display: none"],
body.gt-mobile-ops #login-wrapper[style*="display:none"] {
  display: none !important;
}

html[data-gt-mobile="1"] .login-shell,
body.gt-mobile-ops .login-shell {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  width: 100%;
  min-height: 100dvh;
  gap: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  padding: max(16px, env(safe-area-inset-top, 0)) 16px max(20px, env(safe-area-inset-bottom, 0)) !important;
  background: #f8fafc !important;
}

html[data-gt-mobile="1"] .login-wrapper.login-stunning,
body.gt-mobile-ops .login-wrapper.login-stunning {
  background: #f8fafc !important;
  min-height: 100dvh;
}

html[data-gt-mobile="1"] .login-drag-strip,
body.gt-mobile-ops .login-drag-strip {
  display: none !important;
}

html[data-gt-mobile="1"] .login-brand,
body.gt-mobile-ops .login-brand {
  display: none !important;
}

html[data-gt-mobile="1"] .login-card,
body.gt-mobile-ops .login-card {
  flex: 0 1 auto !important;
  width: 100% !important;
  max-width: 24rem !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  align-items: stretch !important;
  box-shadow: none !important;
  border: 1px solid #e2e8f0;
}

html[data-gt-mobile="1"] .login-card-inner,
body.gt-mobile-ops .login-card-inner {
  width: 100% !important;
  max-width: none !important;
  padding: 24px 20px 20px !important;
  transform: none !important;
  box-shadow: none !important;
  border-radius: 12px !important;
  background: #fff !important;
}

html[data-gt-mobile="1"] .login-card-inner::before,
body.gt-mobile-ops .login-card-inner::before {
  content: "金";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 9999px;
  background: #0f172a;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  box-shadow: none;
}

html[data-gt-mobile="1"] .login-header,
body.gt-mobile-ops .login-header {
  margin-bottom: 18px !important;
  text-align: center;
}

html[data-gt-mobile="1"] .login-header h2,
body.gt-mobile-ops .login-header h2 {
  font-size: 22px !important;
  margin: 0 0 6px !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}

html[data-gt-mobile="1"] .login-header p,
body.gt-mobile-ops .login-header p {
  font-size: 13px !important;
  margin: 0 !important;
  line-height: 1.4;
  color: #475569 !important;
}

html[data-gt-mobile="1"] .login-form,
body.gt-mobile-ops .login-form {
  gap: 12px !important;
}

html[data-gt-mobile="1"] .login-form .input-group,
body.gt-mobile-ops .login-form .input-group {
  gap: 0 !important;
}

html[data-gt-mobile="1"] .login-form .input-label,
html[data-gt-mobile="1"] .login-form .input-icon,
body.gt-mobile-ops .login-form .input-label,
body.gt-mobile-ops .login-form .input-icon {
  display: none !important;
}

html[data-gt-mobile="1"] .login-form input:not([type="checkbox"]):not([type="hidden"]),
html[data-gt-mobile="1"] .login-form select,
body.gt-mobile-ops .login-form input:not([type="checkbox"]):not([type="hidden"]),
body.gt-mobile-ops .login-form select {
  min-height: 44px !important;
  height: 48px !important;
  font-size: 16px !important;
  width: 100% !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #0f172a !important;
  padding: 0 16px !important;
  box-shadow: none !important;
}

html[data-gt-mobile="1"] .login-company-switch,
body.gt-mobile-ops .login-company-switch {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

html[data-gt-mobile="1"] .login-company-chip,
body.gt-mobile-ops .login-company-chip {
  min-height: 44px !important;
  height: 48px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  background: #f8fafc !important;
  color: #334155 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

html[data-gt-mobile="1"] .login-company-chip.is-active,
body.gt-mobile-ops .login-company-chip.is-active {
  background: rgba(3, 105, 161, 0.1) !important;
  color: #0369a1 !important;
  border-color: #7dd3fc !important;
}

html[data-gt-mobile="1"] .login-form input::placeholder,
body.gt-mobile-ops .login-form input::placeholder {
  color: #94a3b8 !important;
}

html[data-gt-mobile="1"] .login-form select,
body.gt-mobile-ops .login-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

html[data-gt-mobile="1"] .login-form input:focus,
html[data-gt-mobile="1"] .login-form select:focus,
body.gt-mobile-ops .login-form input:focus,
body.gt-mobile-ops .login-form select:focus {
  outline: none !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 0 0 2px rgba(3, 105, 161, 0.22) !important;
}

html[data-gt-mobile="1"] .login-btn,
body.gt-mobile-ops .login-btn {
  min-height: 44px !important;
  height: 48px !important;
  font-size: 16px !important;
  border-radius: 8px !important;
  background: #0369a1 !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transform: none !important;
}

html[data-gt-mobile="1"] .login-btn:hover,
html[data-gt-mobile="1"] .login-btn:active,
body.gt-mobile-ops .login-btn:hover,
body.gt-mobile-ops .login-btn:active {
  background: #075985 !important;
  transform: none !important;
}

html[data-gt-mobile="1"] .login-bio-btn,
body.gt-mobile-ops .login-bio-btn {
  margin-top: 10px;
  min-height: 44px !important;
  height: 48px !important;
  width: 100%;
  font-size: 16px !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 700 !important;
}

html[data-gt-mobile="1"] .login-bio-btn[hidden],
body.gt-mobile-ops .login-bio-btn[hidden] {
  display: none !important;
}

html[data-gt-mobile="1"] .login-bio-btn:active,
body.gt-mobile-ops .login-bio-btn:active {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
}

html[data-gt-mobile="1"] .remember-login-row,
body.gt-mobile-ops .remember-login-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100%;
  margin: 4px 0 2px;
}

html[data-gt-mobile="1"] .login-wrapper.login-stunning .remember-login-check,
body.gt-mobile-ops .login-wrapper.login-stunning .remember-login-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px !important;
  color: #475569 !important;
}

html[data-gt-mobile="1"] .login-wrapper.login-stunning .remember-login-check input[type="checkbox"],
body.gt-mobile-ops .login-wrapper.login-stunning .remember-login-check input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 18px !important;
  border-radius: 4px !important;
  border: 1px solid #cbd5e1 !important;
  background: #fff !important;
  accent-color: #0369a1;
  appearance: auto;
  -webkit-appearance: checkbox;
}

html[data-gt-mobile="1"] .remember-login-check span,
body.gt-mobile-ops .remember-login-check span {
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  writing-mode: horizontal-tb !important;
}

html[data-gt-mobile="1"] .login-forgot-link,
body.gt-mobile-ops .login-forgot-link {
  color: #0369a1 !important;
  font-size: 13px !important;
  min-height: 44px;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

html[data-gt-mobile="1"] .login-forgot-link:hover,
body.gt-mobile-ops .login-forgot-link:hover {
  color: #075985 !important;
}

html[data-gt-mobile="1"] .login-license-summary,
html[data-gt-mobile="1"] .login-online-actions-tip,
body.gt-mobile-ops .login-license-summary,
body.gt-mobile-ops .login-online-actions-tip {
  color: #475569 !important;
}

html[data-gt-mobile="1"] .login-mobile-social,
body.gt-mobile-ops .login-mobile-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
  text-align: center;
}

html[data-gt-mobile="1"] .login-mobile-social-text,
body.gt-mobile-ops .login-mobile-social-text {
  margin: 0 0 8px;
  font-size: 13px;
  color: #64748b;
}

html[data-gt-mobile="1"] .login-mobile-social-text strong,
body.gt-mobile-ops .login-mobile-social-text strong {
  color: #0f172a;
  font-weight: 600;
}

html[data-gt-mobile="1"] .login-mobile-avatars,
body.gt-mobile-ops .login-mobile-avatars {
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-gt-mobile="1"] .login-mobile-avatars img,
body.gt-mobile-ops .login-mobile-avatars img {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  object-fit: cover;
  border: 2px solid #181824;
  margin-left: -6px;
}

html[data-gt-mobile="1"] .login-mobile-avatars img:first-child,
body.gt-mobile-ops .login-mobile-avatars img:first-child {
  margin-left: 0;
}

html[data-gt-mobile="1"] .login-mobile-social,
body.gt-mobile-ops .login-mobile-social,
html[data-gt-mobile="1"] .login-wrapper.login-stunning .login-mobile-social,
body.gt-mobile-ops .login-wrapper.login-stunning .login-mobile-social {
  display: none !important;
}

/* 登录页不显示底栏 */
body.gt-mobile-login .gt-mobile-tabbar,
html[data-gt-mobile="1"] body:has(#login-wrapper:not([style*="display: none"])) .gt-mobile-tabbar {
  display: none !important;
}

body.gt-mobile-login {
  --gt-mobile-bottom-h: 0px;
}

/* ========== 手机端只读：隐藏写操作入口，保留查询与下载 ========== */
html[data-gt-mobile-readonly="1"] .gt-native-fab,
html[data-gt-mobile-readonly="1"] body.gt-native-fab-on .gt-native-fab,
body.gt-mobile-readonly .gt-native-fab,
html[data-gt-mobile-readonly="1"] #add-quotation-btn,
html[data-gt-mobile-readonly="1"] #add-contract-btn,
html[data-gt-mobile-readonly="1"] #add-delivery-btn,
html[data-gt-mobile-readonly="1"] #add-customer-btn,
html[data-gt-mobile-readonly="1"] #add-supplier-btn,
html[data-gt-mobile-readonly="1"] #add-expense-btn,
html[data-gt-mobile-readonly="1"] #add-sale-btn,
html[data-gt-mobile-readonly="1"] #add-purchase-btn,
html[data-gt-mobile-readonly="1"] button[id^="add-"],
html[data-gt-mobile-readonly="1"] [data-action="create"],
html[data-gt-mobile-readonly="1"] [data-action="delete"],
html[data-gt-mobile-readonly="1"] .btn-delete,
html[data-gt-mobile-readonly="1"] .btn-danger,
html[data-gt-mobile-readonly="1"] button[id*="posting"],
html[data-gt-mobile-readonly="1"] button[id*="approve"],
html[data-gt-mobile-readonly="1"] button[id*="reject"],
html[data-gt-mobile-readonly="1"] .page-header-actions .btn-primary,
html[data-gt-mobile-readonly="1"] .operator-workbench,
html[data-gt-mobile-readonly="1"] .gt-native-quick-grid [data-native-opt],
body.gt-mobile-readonly #add-quotation-btn,
body.gt-mobile-readonly button[id^="add-"],
body.gt-mobile-readonly [data-action="create"],
body.gt-mobile-readonly [data-action="delete"],
body.gt-mobile-readonly .btn-delete,
body.gt-mobile-readonly .page-header-actions .btn-primary {
  display: none !important;
}

/* 保留并突出导出 / 下载类按钮 */
html[data-gt-mobile-readonly="1"] button[id*="export"],
html[data-gt-mobile-readonly="1"] button[id*="download"],
html[data-gt-mobile-readonly="1"] [data-action="export"],
html[data-gt-mobile-readonly="1"] [data-action="download"],
html[data-gt-mobile-readonly="1"] .btn-download,
body.gt-mobile-readonly button[id*="export"],
body.gt-mobile-readonly button[id*="download"],
body.gt-mobile-readonly [data-action="export"],
body.gt-mobile-readonly [data-action="download"],
body.gt-mobile-readonly .btn-download {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 6px;
  border-color: #7dd3fc !important;
  color: #0369a1 !important;
  background: #e0f2fe !important;
  font-weight: 700;
}

html[data-gt-mobile-readonly="1"] .gt-mobile-banner {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

/* 手机端升级弹层 */
.gt-mobile-update-sheet {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.gt-mobile-update-sheet.is-force {
  align-items: center;
  background: rgba(15, 23, 42, 0.72);
}
.gt-mobile-update-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.gt-mobile-update-panel {
  position: relative;
  width: min(100%, 480px);
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 10px 18px 22px;
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.18);
}
.gt-mobile-update-sheet.is-force .gt-mobile-update-panel {
  border-radius: 16px;
  margin: 16px;
}
.gt-mobile-update-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 4px auto 12px;
}
.gt-mobile-update-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #0f172a;
}
.gt-mobile-update-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  color: #64748b;
}
.gt-mobile-update-row strong {
  color: #0f172a;
  font-weight: 600;
}
.gt-mobile-update-notes {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}
.gt-mobile-update-notes-empty {
  margin: 12px 0 0;
  color: #94a3b8;
  font-size: 13px;
}
.gt-mobile-update-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}
.gt-mobile-update-primary,
.gt-mobile-update-secondary,
.gt-mobile-update-later {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.gt-mobile-update-primary {
  background: #2563eb;
  color: #fff;
}
.gt-mobile-update-secondary {
  background: #eff6ff;
  color: #1d4ed8;
}
.gt-mobile-update-later {
  background: transparent;
  color: #64748b;
}
.gt-mobile-toast {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 100001;
  max-width: 86vw;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

.gt-mobile-download-ready {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.gt-mobile-download-ready-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.gt-mobile-download-ready-panel {
  position: relative;
  width: min(100%, 440px);
  max-height: 88vh;
  overflow: auto;
  margin: 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
}
.gt-mobile-download-ready-ok {
  width: 44px;
  height: 44px;
  margin: 4px auto 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}
.gt-mobile-download-ready-panel h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 18px;
  color: #0a2f5c;
}
.gt-mobile-download-ready-tip {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
  text-align: center;
}
.gt-mobile-download-ready-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.gt-mobile-download-ready-meta div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.gt-mobile-download-ready-meta span { color: #64748b; }
.gt-mobile-download-ready-meta strong {
  color: #0f172a;
  text-align: right;
  word-break: break-all;
}
.gt-mobile-download-ready-label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 12px;
}
.gt-mobile-download-ready-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  resize: none;
  font-family: inherit;
}
.gt-mobile-download-ready-actions {
  display: grid;
  gap: 8px;
}
.gt-mobile-download-ready-actions .gt-mobile-update-primary,
.gt-mobile-download-ready-actions .gt-mobile-update-secondary,
.gt-mobile-download-ready-actions .gt-mobile-update-later {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}
.gt-mobile-download-ready-actions .gt-mobile-update-primary {
  background: #0a2f5c;
  color: #fff;
}
.gt-mobile-download-ready-actions .gt-mobile-update-secondary {
  background: #e8f3ff;
  color: #0a2f5c;
}
.gt-mobile-download-ready-actions .gt-mobile-update-later {
  background: transparent;
  color: #64748b;
}
.gt-native-header-right {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.gt-native-btn[data-native-action="update"]:disabled {
  opacity: 0.45;
}

/* —— 销售/采购手机端：更大触控、金额更醒目 —— */
html[data-gt-mobile="1"] .sale-customer-item,
html[data-gt-mobile="1"] .ask-mark-partner {
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
}
html[data-gt-mobile="1"] .sale-overview,
html[data-gt-mobile="1"] .purchase-overview {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}
html[data-gt-mobile="1"] .sale-overview-card .overview-value,
html[data-gt-mobile="1"] .purchase-overview-card .overview-value {
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}
html[data-gt-mobile="1"] .ask-mark-banner {
  position: sticky;
  top: 0;
  z-index: 5;
  margin-bottom: 10px;
}
html[data-gt-mobile="1"] .sale-page .page-subtitle,
html[data-gt-mobile="1"] .purchase-page .page-subtitle {
  font-size: 12px;
  color: #64748b;
}
html[data-gt-mobile="1"] .group-dash-page {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
html[data-gt-mobile="1"] .group-dash-totals {
  grid-template-columns: 1fr 1fr !important;
  gap: 8px !important;
}
html[data-gt-mobile="1"] .group-dash-total-card strong {
  font-size: 17px !important;
}
html[data-gt-mobile="1"] .group-dash-grid {
  grid-template-columns: 1fr !important;
}
html[data-gt-mobile="1"] .group-dash-company {
  padding: 12px !important;
}



