* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #14243a;
  --panel: #202c45;
  --panel-alt: #192840;
  --input-bg: #24324c;
  --text: #f4f7fb;
  --muted: #aebbd0;
  --border: #394a66;
  --brand: #45d0c0;
  --muted-btn: #3b4965;
  --ok: #67e1ad;
  --warn: #ffd27b;
  --danger: #ff8d9a;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
  background: var(--bg);
  color: var(--text);
}

body.report-app {
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

.offline-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.offline-page img {
  width: 72px;
  height: 72px;
}

.offline-page h1,
.offline-page p {
  margin: 0;
}

.offline-page p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.6;
}

.offline-page button {
  width: auto;
  min-width: 120px;
}

.page {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #14243a;
}

.login-box {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  box-shadow: 0 18px 54px rgba(5, 12, 24, 0.34);
  padding: 28px;
}

h1,
h2,
h3 {
  margin: 0;
}

.title {
  font-size: 24px;
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.field {
  margin-top: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

input,
select,
button {
  width: 100%;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 10px;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text);
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(69, 208, 192, 0.72);
  outline-offset: 2px;
}

button {
  border: 0;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.08);
}

.btn-primary {
  background: var(--brand);
  color: #0d2a2d;
  font-weight: 700;
}

.btn-muted {
  background: var(--muted-btn);
  color: #fff;
}

.btn-danger {
  background: #9f3e4d;
  color: #fff;
}

.alert {
  padding: 9px 10px;
  border-radius: 4px;
  font-size: 13px;
  margin: 10px 0 0;
}

.alert-error {
  background: rgba(220, 53, 69, 0.2);
  color: var(--danger);
}

.alert-ok {
  background: rgba(40, 167, 69, 0.2);
  color: var(--ok);
}

.topbar {
  min-height: 64px;
  background: #18283f;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  box-shadow: 0 8px 28px rgba(6, 14, 27, 0.18);
}

.topbar-title {
  font-size: 19px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user {
  font-size: 13px;
  color: var(--muted);
}

.topbar-actions form {
  margin: 0;
}

.topbar-actions button {
  width: auto;
  height: 34px;
  padding: 0 12px;
}

.pwa-install-button {
  width: auto;
}

.mobile-table-sort {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-nav-trigger,
.mobile-nav-spacer,
.mobile-topbar-title,
.mobile-nav-backdrop,
.mobile-nav-drawer,
.mobile-filter-toggle,
.mobile-module-header {
  display: none;
}

.account-filter-actions {
  display: contents;
}

.mobile-module {
  display: contents;
}

.nav-link {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.stat-card {
  min-height: 104px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: 8px;
  background: var(--panel);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  font-size: 22px;
  line-height: 1.2;
  white-space: nowrap;
}

.stat-card small {
  color: var(--muted);
  font-size: 12px;
}

.fund-overview-grid .stat-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 0;
  box-shadow: 0 8px 24px rgba(7, 14, 28, 0.14), inset 0 1px rgba(255, 255, 255, 0.08);
}

.fund-overview-grid .stat-card-neutral {
  background: linear-gradient(135deg, #343c68, #414b7c);
}

.fund-overview-grid .stat-card-teal {
  background: linear-gradient(135deg, #15bca8, #27cfd0);
}

.fund-overview-grid .stat-card-blue {
  background: linear-gradient(135deg, #2e7fd2, #39b8e9);
}

.fund-overview-grid .stat-card-green {
  background: linear-gradient(135deg, #27bb79, #3ddca6);
}

.fund-overview-grid .stat-card-cyan {
  background: linear-gradient(135deg, #158fa9, #2bc4d6);
}

.fund-overview-grid .stat-card-amber {
  background: linear-gradient(135deg, #ff9c72, #f67d94);
}

.fund-overview-grid .stat-card-positive {
  background: linear-gradient(135deg, #20a86f, #4bd39b);
}

.fund-overview-grid .stat-card-negative {
  background: linear-gradient(135deg, #bd536b, #e96f84);
}

.fund-overview-grid .stat-card span,
.fund-overview-grid .stat-card small {
  color: rgba(255, 255, 255, 0.82);
}

.fund-overview-grid .stat-card strong,
.fund-overview-grid .stat-card .delta-positive,
.fund-overview-grid .stat-card .delta-negative {
  color: #fff;
}

.history-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.history-meta strong {
  color: var(--text);
}

.history-chart {
  width: 100%;
  max-width: 100%;
  height: 180px;
  display: block;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #17253a;
  touch-action: pan-y;
  user-select: none;
}

.history-chart-shell {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overscroll-behavior-x: contain;
  touch-action: pan-y;
}

.history-chart polyline {
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-crosshair {
  opacity: 0;
  stroke: rgba(231, 237, 245, 0.6);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.history-crosshair.is-visible {
  opacity: 1;
}

.history-point {
  fill: var(--panel-alt);
  stroke: var(--brand);
  stroke-width: 1.25;
  opacity: 0;
  pointer-events: none;
}

.history-point.is-active {
  fill: var(--brand);
  stroke: #fff;
  stroke-width: 1.75;
  opacity: 0;
}

.history-active-dot {
  position: absolute;
  z-index: 3;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px rgba(47, 129, 247, 0.32);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.history-hitbox {
  fill: transparent;
  cursor: crosshair;
  pointer-events: all;
  touch-action: pan-y;
}

.history-chart:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.history-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 164px;
  max-width: calc(100% - 16px);
  padding: 10px 12px;
  border: 1px solid #4c5b6d;
  border-radius: 4px;
  background: #202731;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 3px;
  transform: translate(-50%, -115%);
  pointer-events: none;
}

.history-tooltip strong {
  color: var(--text);
  font: 600 15px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.history-tooltip span,
.history-tooltip small {
  color: var(--muted);
  font-size: 12px;
}

.pwa-install-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel-alt);
  color: var(--text);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.pwa-install-dialog::backdrop {
  background: rgba(0, 0, 0, 0.68);
}

.pwa-install-dialog-header {
  min-height: 54px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pwa-install-dialog-header button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  font-size: 24px;
}

.pwa-install-dialog p {
  margin: 0;
  padding: 18px 16px;
  color: var(--muted);
  line-height: 1.7;
}

.pwa-install-dialog > .btn-primary {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
}

.history-axis {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.history-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.delta-positive {
  color: var(--ok);
}

.delta-negative {
  color: var(--danger);
}

.account-detail-link {
  color: var(--text);
  font-weight: 700;
  text-decoration-color: var(--brand);
  text-underline-offset: 4px;
}

.account-detail-link:hover {
  color: var(--ok);
}

.audit-message {
  min-width: 240px;
  max-width: 520px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.report-grid > div {
  display: grid;
  gap: 4px;
}

.report-code {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.report-parent-form {
  grid-template-columns: minmax(260px, 1fr) auto;
  margin-top: 14px;
}

.content {
  padding: 20px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(6, 14, 27, 0.16);
  margin-bottom: 16px;
}

.fund-filter-card {
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42);
}

.card-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
}

.card-body {
  padding: 16px;
}

.toolbar {
  display: grid;
  grid-template-columns: 2fr 1fr minmax(190px, 1.4fr) 88px auto auto;
  gap: 8px;
}

.fund-toolbar {
  grid-template-columns: minmax(260px, 1.6fr) repeat(4, minmax(128px, 0.72fr)) minmax(140px, 0.85fr) auto;
  align-items: center;
}

.report-results {
  transition: opacity 140ms ease, filter 140ms ease;
}

.report-data-loading .report-results {
  opacity: 0.48;
  filter: saturate(0.72);
  pointer-events: none;
}

.report-loading-indicator {
  position: fixed;
  z-index: 190;
  top: 82px;
  left: 50%;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(78, 222, 204, 0.36);
  border-radius: 6px;
  background: rgba(26, 41, 65, 0.96);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateX(-50%);
}

.report-loading-indicator[hidden] {
  display: none;
}

.report-loading-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: report-loading-spin 650ms linear infinite;
}

@keyframes report-loading-spin {
  to { transform: rotate(360deg); }
}

.report-update-error {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(255, 107, 121, 0.5);
  border-radius: 6px;
  background: #321f2a;
  color: #ffb5bd;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar-actions button,
.toolbar-actions .nav-link {
  width: auto;
  height: 38px;
  min-height: 38px;
  min-width: 76px;
}

.device-filter {
  position: relative;
  min-width: 190px;
}

.device-filter summary {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.device-filter summary::marker {
  content: "";
}

.device-filter summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.device-filter[open] summary::after {
  content: "-";
}

.device-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  width: min(360px, 78vw);
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel-alt);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.device-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 6px;
  color: var(--text);
  cursor: pointer;
}

.device-option:hover {
  background: rgba(47, 129, 247, 0.12);
}

.device-option input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 1px 0 0;
  padding: 0;
}

.device-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.device-option small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.toolbar .btn-primary,
.toolbar .btn-muted {
  width: auto;
  padding: 0 14px;
}

.summary {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.table-wrap {
  overflow: auto;
  max-height: 620px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: var(--panel-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px;
  text-align: left;
  white-space: nowrap;
}

.table-sort-button {
  width: auto;
  height: auto;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  text-align: left;
}

.table-sort-button::before {
  content: "↕";
  width: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

th[data-sort-direction="asc"] .table-sort-button::before {
  content: "↑";
  color: var(--brand);
}

th[data-sort-direction="desc"] .table-sort-button::before {
  content: "↓";
  color: var(--brand);
}

.table-sort-button:hover,
.table-sort-button:focus-visible {
  color: #fff;
  filter: none;
}

tbody td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr {
  transition: background-color 140ms ease;
}

tbody tr:hover {
  background: rgba(69, 208, 192, 0.045);
}

.mono {
  font-family: Consolas, "Courier New", monospace;
}

.wallet-main,
.asset-main {
  font-weight: 600;
  color: var(--text);
}

.exchange-name {
  font-weight: 600;
}

.exchange-name.exchange-binance {
  color: #f3ba2f;
}

.exchange-name.exchange-bybit {
  color: #ffffff;
}

.exchange-name.exchange-bitget {
  color: #00f0ff;
}

.exchange-name.exchange-gate {
  color: #0068ff;
}

.wallet-sub,
.asset-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
}

.wallet-detail {
  min-width: 420px;
}

.wallet-detail summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.wallet-detail[open] summary {
  margin-bottom: 4px;
}

.wallet-main-row td {
  vertical-align: middle;
}

.detail-trigger-cell {
  width: 60px;
  text-align: center;
}

.detail-trigger {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

.wallet-detail-panel-row td {
  background: rgba(47, 129, 247, 0.06);
  border-bottom: 1px solid var(--border);
  padding-top: 10px;
  padding-bottom: 10px;
}

.wallet-detail-panel-row.is-collapsed {
  display: none;
}

.wallet-detail-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wallet-detail-block {
  background: rgba(18, 22, 28, 0.85);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
}

.wallet-detail-title {
  font-size: 13px;
  color: #6aa7f2;
  font-weight: 600;
  margin-bottom: 6px;
}

.wallet-detail-line {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.badge-mainnet {
  background: rgba(40, 167, 69, 0.2);
  color: var(--ok);
}

.badge-testnet {
  background: rgba(255, 193, 7, 0.2);
  color: var(--warn);
}

.badge-enabled {
  background: rgba(40, 167, 69, 0.2);
  color: var(--ok);
}

.badge-disabled {
  background: rgba(220, 53, 69, 0.2);
  color: var(--danger);
}

.pager {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pager-actions {
  display: flex;
  gap: 8px;
}

.pager-actions a {
  text-decoration: none;
}

.pager-actions .btn-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  height: 34px;
  padding: 0 12px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-toolbar button {
  width: auto;
  padding: 0 14px;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions form {
  margin: 0;
}

.row-actions button {
  width: auto;
  height: 32px;
  padding: 0 10px;
}

.table-wrap td form button {
  width: auto;
  height: 32px;
  padding: 0 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 6px;
  align-items: center;
}

.inline-form input,
.inline-form select {
  height: 32px;
}

.inline-form button {
  height: 32px;
}

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-mask[hidden] {
  display: none !important;
}

.modal-card {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.modal-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-close-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 25px;
}

.account-management-content {
  max-width: 1240px;
}

.account-management-hero {
  min-height: 116px;
  margin-bottom: 16px;
  padding: 8px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.account-management-hero h1 {
  margin-top: 4px;
  font-size: 30px;
}

.account-management-hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
}

.account-count {
  min-width: 150px;
  font-size: 34px;
  text-align: right;
}

.account-count small {
  margin-top: 5px;
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 500;
}

.account-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 1fr) 140px auto;
  align-items: end;
  gap: 12px;
}

.account-create-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.account-create-form button {
  width: auto;
  min-width: 112px;
}

.account-list-card .table-wrap {
  max-height: none;
}

.account-row-actions {
  flex-wrap: wrap;
}

.compact-modal {
  width: min(480px, 100%);
}

.modal-body {
  padding: 12px;
}

.modal-body .field:first-child {
  margin-top: 0;
}

.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.modal-actions button {
  width: auto;
  min-width: 96px;
}

@media (max-width: 1220px) {
  .fund-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fund-toolbar .toolbar-actions {
    grid-column: span 2;
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .toolbar,
  .admin-toolbar,
  .inline-form {
    grid-template-columns: 1fr;
  }

  .wallet-detail-panel {
    grid-template-columns: 1fr;
  }

  .pager {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar .btn-primary,
  .toolbar .btn-muted,
  .admin-toolbar button,
  .inline-form button {
    width: 100%;
  }

  .fund-toolbar .toolbar-actions {
    grid-column: auto;
  }

  .toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .toolbar-actions button,
  .toolbar-actions .nav-link {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 96px;
    padding: 12px;
  }

  .stat-card strong {
    font-size: 18px;
  }

  .topbar {
    padding: 10px 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .topbar-title {
    font-size: 16px;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-user {
    width: 100%;
    font-size: 12px;
  }

  .topbar-actions form {
    flex: 1 1 auto;
    min-width: 120px;
  }

  .topbar-actions button {
    width: 100%;
    height: 36px;
    padding: 0 10px;
  }

  .content {
    padding: 10px;
  }

  .card-header {
    padding: 9px 10px;
  }

  .card-body {
    padding: 10px;
  }

  .summary {
    font-size: 12px;
    line-height: 1.45;
  }

  .table-wrap {
    max-height: none;
  }

  .table-wrap table {
    min-width: 980px;
  }

  thead th,
  tbody td {
    padding: 7px 6px;
    font-size: 12px;
  }

  .detail-trigger-cell {
    width: 50px;
  }

  .detail-trigger {
    width: 26px;
    height: 26px;
    min-width: 26px;
  }

  .wallet-detail-title {
    font-size: 12px;
  }

  .wallet-detail-line {
    font-size: 11px;
  }

  .modal-mask {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100vh - 20px);
    overflow: auto;
  }
}

@media (max-width: 768px) {
  body.report-app {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .report-app .page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 100dvh;
  }

  .report-app .topbar-title {
    width: auto;
    min-width: 0;
    line-height: 1.35;
    text-align: center;
  }

  .report-app .topbar-actions {
    display: none;
  }

  .report-app .topbar-user {
    grid-column: 1 / -1;
  }

  .report-app .topbar {
    position: sticky;
    top: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    height: calc(60px + env(safe-area-inset-top));
    min-height: calc(60px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: 0;
    padding-left: max(12px, env(safe-area-inset-left));
    align-items: center;
    gap: 8px;
    background: rgba(23, 28, 36, 0.96);
    backdrop-filter: blur(12px);
  }

  .report-app .desktop-topbar-title {
    display: none;
  }

  .report-app .mobile-topbar-title,
  .report-app .mobile-nav-spacer {
    display: block;
  }

  .report-app .mobile-nav-trigger {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 9px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
  }

  .report-app .mobile-nav-trigger span {
    height: 2px;
    border-radius: 1px;
    background: var(--text);
  }

  .report-app .mobile-nav-trigger:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
  }

  .report-app .mobile-nav-backdrop {
    position: fixed;
    z-index: 160;
    inset: 0;
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.58);
    transition: opacity 160ms ease, visibility 160ms ease;
  }

  .report-app .mobile-nav-drawer {
    position: fixed;
    z-index: 170;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(84vw, 320px);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    border-right: 1px solid var(--border);
    background: var(--panel-alt);
    box-shadow: 18px 0 38px rgba(0, 0, 0, 0.38);
    display: flex;
    flex-direction: column;
    transform: translateX(-104%);
    transition: transform 180ms ease;
  }

  .report-app.mobile-nav-open,
  body.mobile-nav-open {
    overflow: hidden;
  }

  .report-app.mobile-nav-open .mobile-nav-backdrop,
  body.mobile-nav-open .mobile-nav-backdrop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .report-app.mobile-nav-open .mobile-nav-drawer,
  body.mobile-nav-open .mobile-nav-drawer {
    transform: translateX(0);
  }

  .report-app .mobile-nav-header {
    min-height: 64px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .report-app .mobile-nav-header div {
    display: grid;
    gap: 2px;
  }

  .report-app .mobile-nav-header span {
    color: var(--muted);
    font-size: 11px;
  }

  .report-app .mobile-nav-header strong {
    font-size: 17px;
  }

  .report-app .mobile-nav-header button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 28px;
    line-height: 1;
  }

  .report-app .mobile-nav-user {
    margin: 14px 12px 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel);
    display: grid;
    gap: 4px;
  }

  .report-app .mobile-nav-user span {
    color: var(--muted);
    font-size: 11px;
  }

  .report-app .mobile-nav-user strong {
    overflow-wrap: anywhere;
    font-size: 15px;
  }

  .report-app .mobile-nav-links {
    padding: 4px 12px;
    display: grid;
    gap: 4px;
  }

  .report-app .mobile-nav-links a,
  .report-app .mobile-nav-footer button {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    display: flex;
    align-items: center;
    text-align: left;
    text-decoration: none;
  }

  .report-app .mobile-nav-links a.is-active {
    background: rgba(47, 129, 247, 0.16);
    color: var(--brand);
    font-weight: 700;
  }

  .report-app .mobile-nav-footer {
    margin-top: auto;
    padding: 10px 12px 14px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 4px;
  }

  .report-app .mobile-nav-footer form {
    margin: 0;
  }

  .report-app .mobile-nav-footer button {
    color: var(--muted);
  }

  .report-app .topbar-actions > .nav-link,
  .report-app .topbar-actions > button,
  .report-app .topbar-actions > form {
    width: 100%;
    min-width: 0;
  }

  .report-app .topbar-actions > .nav-link,
  .report-app .topbar-actions > button {
    width: 100%;
    min-height: 36px;
  }

  .report-app .content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-top: 8px;
    padding-right: 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    padding-left: 0;
  }

  .report-app .report-search-card {
    position: sticky;
    z-index: 110;
    top: calc(60px + env(safe-area-inset-top));
    margin-bottom: 8px;
    border-top-width: 2px;
    background: rgba(18, 22, 28, 0.98);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
  }

  .report-app .report-search-card > .card-header {
    display: none;
  }

  .report-app .report-search-card > .card-body {
    padding: 8px 10px;
  }

  .report-app .card,
  .report-app .card-body,
  .report-app .table-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .report-app .card {
    margin-bottom: 8px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .report-app .content > .alert {
    margin-right: 8px;
    margin-left: 8px;
  }

  .report-app .toolbar,
  .report-app .fund-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .report-app .toolbar > input[name="keyword"],
  .report-app .toolbar > .device-filter,
  .report-app .fund-toolbar > input[name="keyword"],
  .report-app .fund-toolbar > .device-filter,
  .report-app .fund-toolbar > .toolbar-actions,
  .report-app .report-parent-form > select,
  .report-app .report-parent-form > button {
    grid-column: 1 / -1;
  }

  .report-app .toolbar > .btn-primary,
  .report-app .toolbar > .btn-muted,
  .report-app .toolbar-actions,
  .report-app .toolbar-actions .nav-link {
    width: 100%;
  }

  .report-app .fund-toolbar > .toolbar-actions {
    grid-template-columns: 1fr;
  }

  .report-app .account-report-toolbar {
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
  }

  .report-app .account-report-toolbar > input.account-filter-keyword {
    grid-column: 1;
  }

  .report-app .account-report-toolbar > .device-filter {
    grid-column: 2;
  }

  .report-app .account-report-toolbar > .account-filter-network,
  .report-app .account-report-toolbar > .account-filter-page-size {
    display: none;
  }

  .report-app .account-report-toolbar > .device-filter summary {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 12px;
    white-space: nowrap;
  }

  .report-app .account-report-toolbar > .device-filter summary::after {
    font-size: 15px;
  }

  .report-app .account-filter-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .report-app .account-filter-actions > * {
    width: 100%;
  }

  .report-app .account-report-toolbar .device-options {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    width: min(340px, calc(100vw - 20px));
    max-height: min(360px, 56vh);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  }

  .report-app .fund-toolbar {
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
    align-items: start;
  }

  .report-app .fund-toolbar > input.fund-search-keyword {
    grid-column: 1;
    grid-row: 1;
  }

  .report-app .mobile-filter-toggle {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--input-bg);
    color: var(--text);
    display: block;
    font-size: 12px;
    font-weight: 600;
  }

  .report-app .fund-toolbar > .fund-advanced-filter {
    display: none;
  }

  .report-app .fund-toolbar.mobile-filters-open > .fund-advanced-filter {
    display: block;
  }

  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-network {
    grid-column: 1;
    grid-row: 2;
  }

  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-history {
    grid-column: 2;
    grid-row: 2;
  }

  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-spot {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-futures {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-device {
    grid-column: 1 / -1;
    grid-row: 5;
  }

  .report-app .fund-toolbar.mobile-filters-open > .toolbar-actions {
    grid-column: 1 / -1;
    grid-row: 6;
    display: grid;
  }

  .report-app .fund-toolbar .device-options {
    position: static;
    width: 100%;
    max-height: min(280px, 42vh);
    margin-top: 4px;
  }

  .report-app .device-filter {
    min-width: 0;
  }

  .report-app .device-options {
    position: static;
    width: 100%;
    max-height: 240px;
    margin-top: 4px;
    box-shadow: none;
  }

  .report-app .fund-filter-card {
    position: sticky;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  }

  .report-app .mobile-module {
    display: block;
    margin-bottom: 8px;
    border-top: 2px solid var(--brand);
    background: var(--panel);
  }

  .report-app .mobile-module-header {
    min-height: 42px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
  }

  .report-app .mobile-module > .stat-grid {
    padding: 8px;
  }

  .report-app .mobile-collapsible > .card-header,
  .report-app .mobile-collapsible > .mobile-module-header {
    padding-right: 38px;
    position: relative;
    cursor: pointer;
    user-select: none;
  }

  .report-app .mobile-collapsible > .card-header::after,
  .report-app .mobile-collapsible > .mobile-module-header::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 16px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 150ms ease;
  }

  .report-app .mobile-collapsible.is-collapsed > .card-header,
  .report-app .mobile-collapsible.is-collapsed > .mobile-module-header {
    border-bottom-color: transparent;
  }

  .report-app .mobile-collapsible.is-collapsed > .card-header::after,
  .report-app .mobile-collapsible.is-collapsed > .mobile-module-header::after {
    transform: translateY(-35%) rotate(-45deg);
  }

  .report-app .mobile-collapsible.is-collapsed > .card-body,
  .report-app .mobile-collapsible.is-collapsed > .mobile-module-body,
  .report-app .mobile-collapsible[data-mobile-default="collapsed"]:not(.mobile-collapse-ready) > .card-body,
  .report-app .mobile-collapsible[data-mobile-default="collapsed"]:not(.mobile-collapse-ready) > .mobile-module-body {
    display: none;
  }

  .report-app .stat-grid {
    gap: 8px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .report-app .stat-card {
    min-width: 0;
  }

  .report-app .stat-card strong {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .report-app .history-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  .report-app .history-chart {
    height: 150px;
  }

  .report-app .table-wrap {
    overflow: visible;
  }

  .report-app .mobile-table-sort {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
  }

  .report-app .mobile-table-sort select {
    min-width: 0;
  }

  .report-app table.responsive-table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 0;
  }

  .report-app .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .report-app .responsive-table tbody {
    display: grid;
    width: 100%;
    gap: 10px;
  }

  .report-app .responsive-table tbody tr {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 2px solid rgba(47, 129, 247, 0.72);
    border-radius: 4px;
    background: var(--panel-alt);
  }

  .report-app .responsive-table tbody td {
    display: grid;
    grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    overflow-wrap: anywhere;
  }

  .report-app .responsive-table tbody td > * {
    min-width: 0;
    max-width: 100%;
  }

  .report-app .responsive-table .badge,
  .report-app .responsive-table .exchange-name {
    width: max-content;
    justify-self: start;
  }

  .report-app .responsive-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 500;
    line-height: 1.45;
  }

  .report-app .responsive-table tbody td:last-child {
    border-bottom: 0;
  }

  .report-app .responsive-table tbody td .nav-link,
  .report-app .responsive-table tbody td button {
    width: fit-content;
  }

  .report-app .responsive-table .audit-message {
    min-width: 0;
    max-width: none;
  }

  .report-app .responsive-table .wallet-sub {
    margin-top: 3px;
  }

  .report-app .responsive-table tr.responsive-table-empty td {
    display: block;
    text-align: center;
  }

  .report-app .responsive-table tr.responsive-table-empty td::before {
    content: none;
  }

  .report-app .account-report-table tbody tr:not(.responsive-table-empty) {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    cursor: pointer;
  }

  .report-app .account-report-table tbody tr:not(.responsive-table-empty):focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
  }

  .report-app .account-report-table tbody tr:not(.responsive-table-empty)::after {
    content: "查看详情  ›";
    grid-column: 1 / -1;
    padding: 9px 12px;
    border-top: 1px solid var(--border);
    color: var(--brand);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
  }

  .report-app .account-report-table .mobile-card-secondary {
    display: none;
  }

  .report-app .account-report-table .mobile-card-account,
  .report-app .account-report-table .mobile-card-exchange,
  .report-app .account-report-table .mobile-card-total,
  .report-app .account-report-table .mobile-card-available {
    display: grid;
    min-width: 0;
    padding: 12px;
  }

  .report-app .account-report-table .mobile-card-account,
  .report-app .account-report-table .mobile-card-exchange {
    grid-template-columns: 1fr;
    border-bottom: 1px solid var(--border);
  }

  .report-app .account-report-table .mobile-card-account::before,
  .report-app .account-report-table .mobile-card-exchange::before {
    content: none;
  }

  .report-app .account-report-table .mobile-card-account .wallet-main {
    font-size: 16px;
    font-weight: 700;
  }

  .report-app .account-report-table .mobile-card-exchange {
    justify-items: end;
    text-align: right;
  }

  .report-app .account-report-table .mobile-card-exchange .wallet-sub {
    display: none;
  }

  .report-app .account-report-table .mobile-card-total,
  .report-app .account-report-table .mobile-card-available {
    grid-template-columns: 1fr;
    gap: 5px;
    border-bottom: 0;
    background: rgba(20, 39, 50, 0.34);
    font-size: 15px;
    font-weight: 700;
  }

  .report-app .account-report-table .mobile-card-total::before,
  .report-app .account-report-table .mobile-card-available::before {
    font-size: 11px;
    font-weight: 500;
  }

  .report-app .account-report-table .mobile-card-available::before {
    content: attr(data-mobile-label);
  }

  .report-app .account-report-table .desktop-only-value {
    display: none;
  }

  .report-app .mobile-bottom-nav {
    position: fixed;
    z-index: 140;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    min-height: calc(58px + env(safe-area-inset-bottom));
    padding-right: max(6px, env(safe-area-inset-right));
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: max(6px, env(safe-area-inset-left));
    border-top: 1px solid var(--border);
    background: rgba(18, 22, 28, 0.98);
    backdrop-filter: blur(16px);
  }

  .report-app .mobile-bottom-nav a,
  .report-app .mobile-bottom-nav button {
    width: 100%;
    height: 58px;
    min-width: 0;
    padding: 0 6px;
    border: 0;
    border-top: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
  }

  .report-app .mobile-bottom-nav a.is-active {
    border-top-color: var(--brand);
    color: var(--text);
  }

  .report-app .mobile-bottom-nav form {
    min-width: 0;
    margin: 0;
  }
}

@media (max-width: 560px) {
  .login-page {
    padding: 12px;
  }

  .login-box {
    padding: 16px;
  }

  input,
  select,
  button {
    height: 40px;
    font-size: 15px;
  }

  .title {
    font-size: 22px;
  }

  .toolbar,
  .admin-toolbar,
  .inline-form {
    gap: 6px;
  }

  .pager-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .pager-actions .btn-muted {
    width: 100%;
    min-width: 0;
  }

  .report-app .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-app .account-audit-stats {
    grid-template-columns: 1fr;
  }

  .report-app .stat-card {
    min-height: 88px;
    padding: 10px;
  }

  .report-app .stat-card span,
  .report-app .stat-card small {
    font-size: 11px;
  }

  .report-app .stat-card strong {
    font-size: 16px;
  }

  .report-app .history-meta {
    grid-template-columns: 1fr;
  }

  .report-app .responsive-table tbody td {
    grid-template-columns: minmax(86px, 34%) minmax(0, 1fr);
    gap: 8px;
  }

  .report-app .topbar {
    gap: 8px;
  }

  .report-app .topbar-actions {
    gap: 6px;
  }

  .report-app .card-header {
    font-size: 13px;
  }

  .report-app .toolbar input,
  .report-app .toolbar select,
  .report-app .device-filter summary {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .report-app .toolbar,
  .report-app .fund-toolbar {
    grid-template-columns: 1fr;
  }

  .report-app .toolbar > input[name="keyword"],
  .report-app .toolbar > .device-filter,
  .report-app .fund-toolbar > input[name="keyword"],
  .report-app .fund-toolbar > .device-filter,
  .report-app .fund-toolbar > .toolbar-actions {
    grid-column: 1;
  }

  .report-app .account-report-toolbar {
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
  }

  .report-app .account-report-toolbar > input.account-filter-keyword {
    grid-column: 1;
  }

  .report-app .account-report-toolbar > .device-filter {
    grid-column: 2;
  }

  .report-app .account-report-toolbar > .account-filter-actions {
    grid-column: 1 / -1;
  }

  .report-app .fund-toolbar {
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr);
  }

  .report-app .fund-toolbar > input.fund-search-keyword {
    grid-column: 1;
  }

  .report-app .fund-toolbar > .mobile-filter-toggle {
    grid-column: 2;
  }

  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-network,
  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-history,
  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-spot,
  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-futures,
  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-device,
  .report-app .fund-toolbar.mobile-filters-open > .toolbar-actions {
    grid-column: 1 / -1;
  }

  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-network { grid-row: 2; }
  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-history { grid-row: 3; }
  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-spot { grid-row: 4; }
  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-futures { grid-row: 5; }
  .report-app .fund-toolbar.mobile-filters-open > .fund-filter-device { grid-row: 6; }
  .report-app .fund-toolbar.mobile-filters-open > .toolbar-actions { grid-row: 7; }

  .report-app .account-report-table .mobile-card-total,
  .report-app .account-report-table .mobile-card-available {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  body.report-app {
    background: #14243a;
  }

  .report-loading-indicator {
    top: calc(76px + env(safe-area-inset-top));
  }

  .report-app .topbar {
    height: calc(64px + env(safe-area-inset-top));
    min-height: calc(64px + env(safe-area-inset-top));
    background: rgba(24, 40, 63, 0.97);
  }

  .report-app .mobile-topbar-title {
    font-size: 19px;
    font-weight: 500;
  }

  .report-app .mobile-nav-drawer {
    background: #192840;
  }

  .report-app .mobile-nav-user {
    border-color: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #202c45;
  }

  .report-app .mobile-nav-links a.is-active {
    background: rgba(69, 208, 192, 0.14);
    color: var(--brand);
  }

  .report-app .content {
    padding: 12px max(12px, env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .report-app .report-search-card {
    top: calc(64px + env(safe-area-inset-top));
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(32, 44, 69, 0.98);
  }

  .report-app .card {
    margin-bottom: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #202c45;
    box-shadow: 0 10px 28px rgba(5, 13, 27, 0.16);
  }

  .report-app .mobile-module {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #202c45;
  }

  .report-app .mobile-module-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .report-app .stat-grid {
    gap: 10px;
    padding: 10px;
  }

  .report-app .fund-overview-grid .stat-card {
    min-height: 104px;
    padding: 12px;
  }

  .report-app .responsive-table tbody tr {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: #1a2941;
  }

  .report-app .account-report-table tbody tr:not(.responsive-table-empty)::after {
    color: var(--brand);
  }

  .account-management-hero {
    min-height: 96px;
    margin-bottom: 10px;
    padding: 6px 2px;
  }

  .account-management-hero h1 {
    font-size: 25px;
  }

  .account-management-hero p {
    font-size: 12px;
  }

  .account-count {
    min-width: 88px;
    font-size: 28px;
  }

  .account-create-form {
    grid-template-columns: 1fr;
  }

  .account-create-form button {
    width: 100%;
  }

  .account-management-table .account-row-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .account-management-table .account-row-actions button {
    width: 100%;
    min-width: 0;
    padding: 0 6px;
    font-size: 13px;
    white-space: nowrap;
  }

  .account-management-table .account-row-actions form {
    min-width: 0;
  }

  .account-management-table tbody td[data-label="操作"] {
    grid-template-columns: 1fr;
  }
}
