html[data-mobile-login] :is(.login-page,.account-root) {
  min-height: 100vh; min-height: 100dvh; height: auto; overflow: visible;
}
html[data-mobile-login] .login-page { flex-direction: column; background: #f3f6fa; }
html[data-mobile-login] :is(.login-brand,.form-tabs,.form-subtitle) { display: none; }
html[data-mobile-login] .login-form-area {
  box-sizing: border-box; width: 100%; min-height: 100dvh; justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
}
html[data-mobile-login] .mobile-logo { display: flex; align-items: center; gap: 8px; width: min(100%,380px); margin-bottom: 28px; }
html[data-mobile-login] .mobile-logo img { width: 30px; height: 30px; }
html[data-mobile-login] .mobile-logo span { font: 650 21px/1.2 system-ui,sans-serif; color: #254764; background: none; -webkit-text-fill-color: currentColor; }
html[data-mobile-login] .form-header { margin-bottom: 20px; }
html[data-mobile-login] .account-root-card { max-width: calc(100% - 24px); }
html[data-mobile-login] input { font-size: 16px; }
html[data-mobile-login] .form-body .n-button--primary-type { --n-color: #24568b !important; --n-color-hover: #1c476f !important; box-shadow: none; }

[data-mobile-workspace] {
  --mw-ink: #1d3142; --mw-muted: #526676; --mw-brand: #225786;
  --mw-surface: #fff; --mw-paper: #f3f6f9; --mw-line: #d4dfe6;
  --mw-mast: calc(48px + env(safe-area-inset-top));
  --mw-top: calc(var(--mw-mast) + 46px);
}
html.dark[data-mobile-workspace],html[data-theme="dark"][data-mobile-workspace] {
  --mw-ink: #e9f0f5; --mw-muted: #b0c1cd; --mw-brand: #9fcaff;
  --mw-surface: #232a31; --mw-paper: #1c232a; --mw-line: #3e4d59;
}
[data-mobile-workspace] :is(.naive-layout-sider-zhanwei,.naive-layout-sider,.naive-layout-tabs,
.naive-layout-tabs-zhanwei,.naive-pro-global-header-logo,.naive-pro-global-header .header-menu-box) { display: none !important; }
[data-mobile-workspace] :is(.naive-layout,.naive-layout-content,.table-toolbar-left,.table-toolbar-right) { min-width: 0; }
[data-mobile-workspace] .naive-layout-header.naive-pro-fixed-header-action {
  position: fixed; inset: 0 0 auto; z-index: 20; padding-top: env(safe-area-inset-top);
  box-sizing: border-box; width: 100% !important; height: var(--mw-mast); margin: 0;
  border: 0; border-radius: 0; background: var(--mw-surface); box-shadow: none;
}
[data-mobile-workspace] .naive-layout-header-zhanwei { display: none; }
[data-mobile-workspace] .naive-pro-global-header { justify-content: flex-end; }
[data-mobile-workspace] .right-item { padding-right: max(12px,env(safe-area-inset-right)); }
[data-mobile-workspace] .right-item > .right-item-divider,
[data-mobile-workspace] .right-item > button.right-item-trigger { display: none; }
[data-mobile-workspace] .mobile-wordmark {
  position: fixed; z-index: 21; top: env(safe-area-inset-top); inset-inline-start: max(16px,env(safe-area-inset-left));
  display: flex; align-items: center; height: 48px; color: var(--mw-ink);
  font: 700 21px/1 system-ui,sans-serif; letter-spacing: -.045em; pointer-events: none;
}
[data-mobile-workspace] .mobile-shortcuts {
  position: fixed; z-index: 20; inset: var(--mw-mast) 0 auto; box-sizing: border-box;
  display: flex; align-items: stretch; gap: clamp(8px,3vw,28px); height: 46px;
  padding: 0 max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));
  background: var(--mw-surface); border-bottom: 1px solid var(--mw-line); color: var(--mw-muted);
}
.mobile-shortcuts :is(a,button) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-size: 14px; color: inherit; white-space: nowrap; text-decoration: none; }
.mobile-shortcuts a { border-bottom: 3px solid transparent; padding: 3px 1px 0; }
.mobile-shortcuts a[aria-current="page"] { border-color: var(--mw-brand); color: var(--mw-brand); font-weight: 700; }
.mobile-shortcuts button { margin-inline-start: auto; font-weight: 500; }
.mobile-menu-sheet {
  box-sizing: border-box; inset: var(--mw-mast) 12px auto auto; margin: 0;
  width: min(390px,calc(100% - 24px)); max-height: 72dvh; overflow: auto;
  padding: 16px; border: 1px solid var(--mw-line); border-radius: 10px; color: var(--mw-ink); background: var(--mw-surface);
}
.mobile-menu-sheet::backdrop { background: rgb(18 28 40 / 34%); }
.mobile-menu-sheet header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.mobile-menu-sheet button,.mobile-menu-sheet a { min-height: 44px; padding: 0 8px; }
.mobile-menu-sheet nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px; }
.mobile-menu-sheet a { display: flex; align-items: center; color: inherit; text-decoration: none; }
.mobile-menu-sheet a[aria-current="page"] { font-weight: 650; color: var(--mw-brand); }

html[data-mobile-workspace] .naive-layout-content.naive-pro-basicLayout-content { background: var(--mw-paper); padding: var(--mw-top) 0 0; margin-top: 0; }
[data-mobile-workspace] .naive-pro-grid-content { box-sizing: border-box; width: 100%; min-width: 0; max-width: 1200px; margin-inline: auto; padding: 16px clamp(12px,3vw,32px) max(24px,env(safe-area-inset-bottom)); }
[data-mobile-workspace] :is(.order-content,.payaccount-content) { min-height: 0; }
.mobile-list-heading { display: none; }
[data-mobile-workspace] .mobile-list-heading {
  display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin: 0 0 10px;
  color: var(--mw-ink);
}
.mobile-list-heading h1 { margin: 0; font-size: clamp(23px,3vw,30px); line-height: 1.3; font-weight: 650; }
.mobile-list-controls { display: flex; gap: 8px; }
.mobile-list-controls button,.mobile-detail-toggle { min-height: 44px; padding-inline: 6px; color: var(--mw-brand); font-weight: 550; }
.mobile-list-controls button[aria-expanded="true"] { text-decoration: underline; text-underline-offset: 4px; }
[data-mobile-workspace] .mobile-list-heading[data-expanded="false"] + .proCard { display: none; }
[data-mobile-workspace] :is(.order-content,.payaccount-content) .table-toolbar { flex-wrap: wrap; height: auto; gap: 8px; }
[data-mobile-workspace] .table-toolbar :is(.table-toolbar-left,.table-toolbar-right) { flex-wrap: wrap; max-width: 100%; }
[data-mobile-workspace] .table-toolbar-left > div,[data-mobile-workspace] .table-toolbar-right > div { max-width: 100%; flex-wrap: wrap !important; }
[data-mobile-workspace] .order-content .mobile-list-heading[data-tools="false"] ~ .proCard-table .table-toolbar,
[data-mobile-workspace] .payaccount-content .mobile-list-heading[data-tools="false"] ~ .proCard-table .table-toolbar-right { display: none !important; }
[data-mobile-workspace] .payaccount-content .mobile-list-heading[data-tools="false"] ~ .proCard-table .table-toolbar-left .n-space > div:not(:has(> .n-button--primary-type)) { display: none; }
[data-mobile-workspace] .payaccount-content .table-toolbar-left span.text-sm { white-space: normal !important; margin-left: 0 !important; }
[data-mobile-workspace] .order-content .export-tag { margin-inline-start: 0 !important; }
[data-mobile-workspace] .table-toolbar-left .n-button { min-height: 36px; }
[data-mobile-workspace] .n-data-table__pagination { overflow-x: auto; justify-content: flex-start; }
[data-mobile-workspace] .n-pagination { flex-wrap: wrap; row-gap: 6px; }
[data-mobile-workspace] :is(.n-modal,.n-drawer) { box-sizing: border-box; max-width: calc(100vw - 12px); }
[data-mobile-workspace] .proCard-table > .n-card__content { padding: 12px; }
[data-mobile-workspace] .order-content .mobile-record-table thead { display: none; }
[data-mobile-workspace] .mobile-list-heading[data-tools="false"] ~ .proCard-table .n-pagination-quick-jumper { display: none; }
[data-mobile-workspace] .mobile-record-table .n-data-table-th,
[data-mobile-workspace] .mobile-record-table .n-data-table-td { border-inline: 0; }
[data-mobile-workspace] .mobile-record-table .n-data-table-td { background: var(--mw-surface); vertical-align: top; }
[data-mobile-workspace] .mobile-record-table .n-data-table-th { color: var(--mw-muted); font-size: 12px; background: var(--mw-paper); }
.mobile-record { text-align: start; white-space: normal; color: var(--mw-ink); }
.mobile-record dl,.mobile-record dd { margin: 0; }
.mobile-record dt,.mobile-record dd { overflow-wrap: anywhere; }
.mobile-record-head { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; }
.mobile-record-head dt { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.mobile-record-head div:first-child { flex: 1 1 100px; min-width: 0; }
.mobile-record-head div:first-child dd { font-size: 17px; font-weight: 650; line-height: 1.4; }
.mobile-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 16px; }
.mobile-record .mobile-summary { margin-top: 10px; }
.mobile-fields > div { min-width: 0; }
.mobile-fields dt { font-size: 12px; color: var(--mw-muted); }
.mobile-fields dd { margin-top: 1px; font-size: 14px; font-variant-numeric: tabular-nums; }
.mobile-fields [data-field="amount"] dd,.mobile-fields [data-field="todayAmount"] dd { color: var(--mw-ink); font-size: 18px; font-weight: 650; }
.mobile-detail-toggle { padding-inline: 0; }
.mobile-detail-toggle::after,.mobile-list-controls button:first-child::after {
  content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 7px;
  border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg);
}
.mobile-detail-toggle[aria-expanded="true"]::after,.mobile-list-controls button[aria-expanded="true"]::after { transform: rotate(225deg); margin-bottom: 0; }
.mobile-record .mobile-detail-fields { border-top: 1px solid var(--mw-line); padding-top: 10px; padding-bottom: 8px; }
[data-mobile-workspace] :is(.mobile-shortcuts,.mobile-list-heading,.mobile-menu-sheet,.mobile-record-detail) :is(button,a):focus-visible { outline: 2px solid var(--mw-brand); outline-offset: -2px; }
@media (min-width: 768px) {
  [data-mobile-workspace] .mobile-shortcuts { justify-content: flex-start; padding-inline: max(24px,calc((100% - 1136px)/2)); }
  [data-mobile-workspace] .mobile-wordmark { inset-inline-start: max(24px,calc((100% - 1136px)/2)); }
  .mobile-record { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 24px; align-items: start; }
  .mobile-record[data-open="true"] { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .mobile-record[data-open="true"] .mobile-record-detail { border-inline-start: 1px solid var(--mw-line); padding-inline-start: 20px; }
  .mobile-record[data-open="true"] .mobile-detail-fields { max-height: min(42dvh,420px); overflow-y: auto; overscroll-behavior: contain; }
  .mobile-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  [data-mobile-workspace] .proCard-table > .n-card__content { padding: 16px 20px; }
}
@media (max-width: 767px) {
  [data-mobile-workspace] .right-item .n-flex:has(> .n-avatar) > .n-text { display: none; }
  [data-mobile-workspace] .search-form { display: flex; flex-flow: column; align-items: stretch; gap: 4px; }
  [data-mobile-workspace] .search-form .n-form-item { max-width: 100%; margin: 0; }
  [data-mobile-workspace] .search-form .n-form-item-blank { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
  [data-mobile-workspace] .search-form :is(.n-date-picker,.n-select,.n-input) { flex: 1 1 140px; max-width: 100%; margin-inline-start: 0 !important; }
  [data-mobile-workspace] .n-modal .n-form-item-blank { min-width: 0; }
  [data-mobile-workspace] .n-modal .n-card__content { max-height: 75dvh; overflow: auto; }
}
@media (max-width: 359px) {
  [data-mobile-workspace] .mobile-shortcuts { gap: 6px; padding-inline: 6px; }
  .mobile-shortcuts :is(a,button) { font-size: 13px; }
  .mobile-list-controls { gap: 2px; }
}

[data-mobile-workspace] .order-content .proCard-table .stats > :first-child { display: none; }
.mobile-order-metrics {
  box-sizing: border-box; flex: 1 1 100%; min-width: 0; margin-top: 3px;
  padding: 8px clamp(16px, 3vw, 28px) 18px; border-radius: 10px;
  color: #fff; background: #183c57;
}
.mobile-metrics-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #c7dbe8; font-size: 13px; }
.mobile-metrics-heading button { min-height: 44px; padding: 0 2px; color: inherit; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.mobile-metrics-heading button:disabled { text-decoration: none; }
[data-mobile-workspace] .mobile-metrics-heading button:focus-visible { outline-color: #fff; }
.mobile-order-metrics dl { display: grid; grid-template-columns: minmax(0,1.6fr) repeat(2,minmax(0,1fr)); gap: 16px; margin: 0; }
.mobile-metric { min-width: 0; }
.mobile-metric dt { color: #d1e1ec; font-size: 13px; line-height: 1.5; }
.mobile-metric dd { margin: 2px 0 0; color: #fff; font: 650 clamp(24px,3vw,36px)/1.15 system-ui,sans-serif; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mobile-metric:first-child dd { font-size: clamp(32px,4.4vw,50px); }
.mobile-metric small { display: inline-block; margin-inline-start: 4px; font-size: .48em; font-weight: 500; }
@media (max-width: 599px) {
  .mobile-order-metrics dl { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 16px; }
  .mobile-metric:first-child { grid-column: 1/-1; padding-bottom: 10px; border-bottom: 1px solid #507187; }
}
