/* 中文注释：全局设计变量，采用克制的专业后台色板和稳定的排版尺度。 */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #eff6ff;
  --sidebar: #0b1730;
  --sidebar-2: #101f3d;
  --bg: #f5f7fb;
  --bg-soft: #eef4ff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #111827;
  --text-soft: #64748b;
  --muted: #94a3b8;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --info: #2563eb;
  --info-bg: #dbeafe;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 8px 22px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 18px 44px rgba(15, 23, 42, 0.10);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-width: 248px;
  --sidebar-collapsed: 76px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled,
select:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

a {
  color: inherit;
}

svg {
  display: block;
}

.os-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection {
  color: #ffffff;
  background: var(--primary);
}
/* 中文注释：登录页保持简洁专业，不使用大面积深色或花哨装饰。 */
.login-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 32px;
  background: var(--bg);
  overflow: hidden;
}

.login-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--login-bg-image, none) center / cover no-repeat;
  opacity: 1;
}

.login-shell::after {
  display: none;
}

.login-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.login-bg-refresh {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 8px 13px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
  font-weight: 850;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.login-bg-refresh:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

.login-bg-refresh .os-icon {
  width: 16px;
  height: 16px;
}

.login-card {
  position: relative;
  width: min(100%, 420px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  padding: 22px;
}

.login-lang-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 46px;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-xs);
  font-size: 13px;
  font-weight: 900;
}

.login-lang-toggle:hover {
  background: #ffffff;
  border-color: #bfdbfe;
}

.login-card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.login-card .logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 16px;
}

.login-card h2 {
  font-size: 24px;
  line-height: 1.2;
}

.login-card h2,
.card h2,
.modal-head h2,
.confirm-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.login-card p,
.modal-head p,
.confirm-panel p {
  margin: 4px 0 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.login-card .form-stack {
  gap: 12px;
}

.login-row-field {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.login-row-field span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-size: 13px;
  font-weight: 780;
  white-space: nowrap;
}

.login-row-field input {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: 0;
  color: var(--text);
  background: #ffffff;
  font-size: 15px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-row-field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.captcha-field {
  gap: 6px;
}

.captcha-field input[name="captchaAnswer"],
.captcha-field input[name="captchaId"] {
  grid-column: 2;
}

.captcha-field input[type="hidden"] {
  display: none;
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
  align-items: center;
}

.captcha-row strong {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 10px;
  color: var(--primary);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08)),
    #fff;
  font-size: 17px;
  letter-spacing: 0;
}

.captcha-row .icon-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
}

.login-card .btn.wide {
  min-height: 44px;
}
/* 中文注释：主布局采用专业后台常见的深色侧栏、紧凑顶栏和浅灰工作区。 */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  transition: grid-template-columns 0.18s ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px 12px 14px;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  color: rgba(255, 255, 255, 0.84);
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
  z-index: 12;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.brand-block {
  min-height: 46px;
  margin-bottom: 18px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.logo-mark.has-image {
  overflow: hidden;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #ffffff;
}

.logo-mark.has-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-block strong {
  display: block;
  max-width: 166px;
  overflow: hidden;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.brand-block small {
  display: block;
  margin-top: 3px;
  max-width: 166px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  width: 100%;
  min-height: 44px;
  padding: 10px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  text-align: left;
  transition: color 0.16s ease, background 0.16s ease;
}

.nav button span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: inherit;
  background: rgba(255, 255, 255, 0.06);
}

.nav button b {
  overflow: hidden;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nav button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav button.active {
  color: #ffffff;
  background: #1f4fd6;
}

.nav button.active span {
  background: rgba(255, 255, 255, 0.14);
}

.sidebar-status {
  flex: 0 0 auto;
  margin-top: auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 14px 28px rgba(2, 8, 23, 0.16);
}

@media (min-width: 1025px) and (max-height: 780px) {
  .sidebar {
    padding-block: 12px 10px;
  }

  .brand-block {
    margin-bottom: 10px;
  }

  .nav {
    gap: 2px;
  }

  .nav button {
    min-height: 38px;
    padding-block: 7px;
  }

  .sidebar-status {
    margin-top: 9px;
  }

  .sidebar-collapse {
    min-height: 36px;
    margin-top: 8px;
  }
}

.sidebar-status-head {
  min-width: 0;
  padding: 11px 12px 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-status-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.16);
}

.sidebar-status-icon .os-icon,
.sidebar-status-avatar .os-icon {
  width: 15px;
  height: 15px;
}

.sidebar-status-title {
  min-width: 0;
  flex: 1;
}

.sidebar-status-title strong {
  display: block;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.sidebar-status-title small {
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  font-weight: 700;
}

.sidebar-status-title small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.sidebar-status-list {
  padding: 6px 12px;
}

.sidebar-status p {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 27px;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
}

.sidebar-status span {
  min-width: 0;
}

.sidebar-status-list b {
  max-width: 106px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-status .ok {
  color: #4ade80;
}

.sidebar-status .warn {
  color: #facc15;
}

.sidebar-status-user {
  min-width: 0;
  margin: 0 7px 7px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(4, 12, 30, 0.22);
}

.sidebar-status-avatar {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.13);
}

.sidebar-status-user-copy {
  min-width: 0;
  flex: 1;
}

.sidebar-status-user-copy small,
.sidebar-status-user-copy b {
  display: block;
  min-width: 0;
}

.sidebar-status-user-copy small {
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.50);
  font-size: 9px;
  font-weight: 700;
}

.sidebar-status-user-copy b {
  overflow: hidden;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-collapse {
  min-height: 40px;
  margin-top: 12px;
  padding: 0 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  font-weight: 800;
}

.sidebar-collapse:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

.app-shell.sidebar-collapsed .brand-block div:not(.logo-mark),
.app-shell.sidebar-collapsed .nav button b,
.app-shell.sidebar-collapsed .sidebar-status,
.app-shell.sidebar-collapsed .sidebar-collapse span {
  display: none;
}

.app-shell.sidebar-collapsed .sidebar {
  padding-inline: 10px;
}

.app-shell.sidebar-collapsed .brand-block,
.app-shell.sidebar-collapsed .nav button,
.app-shell.sidebar-collapsed .sidebar-collapse {
  justify-content: center;
}

.sidebar-backdrop {
  display: none;
}

.main {
  min-width: 0;
  padding: 22px 28px 30px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  min-height: 72px;
  margin: -22px -28px 22px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(16px);
}

.topbar-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar h1 {
  margin: 0;
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: 0;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.toolbar-account-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-tools-toggle {
  display: none;
}

.mobile-header-actions,
.mobile-account-menu {
  display: none;
}

.search-box {
  width: min(360px, 30vw);
  min-width: 260px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.user-pill {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
}

.user-pill b {
  color: var(--text);
  font-size: 14px;
}

.icon-btn.mobile-menu {
  display: none;
}
/* 中文注释：后台组件系统，强调紧凑、清晰、统一。 */
.page-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.mobile-section-toggle {
  display: none;
}

.mobile-section-body {
  display: contents;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.card,
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card {
  min-width: 0;
  padding: 18px 18px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.card-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 850;
}

.card-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.card-actions,
.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

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

.stat-card {
  min-width: 0;
  min-height: 104px;
  padding: 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.stat-icon .os-icon {
  width: 20px;
  height: 20px;
}

.stat-card span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 760;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: clamp(22px, 1.6vw, 28px);
  line-height: 1.05;
  letter-spacing: 0;
}

.stat-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.metric-strip .stat-card {
  padding: 12px;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 8px;
}

.metric-strip .stat-icon {
  width: 36px;
  height: 36px;
}

.metric-strip .stat-card strong {
  overflow: hidden;
  font-size: clamp(16px, 1.3vw, 18px);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.stat-card.purple .stat-icon,
.stat-card.blue .stat-icon {
  color: var(--primary);
  background: var(--primary-soft);
}

.stat-card.green .stat-icon,
.stat-card.teal .stat-icon {
  color: var(--success);
  background: var(--success-bg);
}

.stat-card.orange .stat-icon {
  color: var(--warning);
  background: var(--warning-bg);
}

.stat-card.pink .stat-icon {
  color: #db2777;
  background: #fce7f3;
}

.btn,
.icon-btn,
.quick-action,
.link-btn,
.link-more,
.sort-btn,
.compact-row,
.rank-item,
.activity-item {
  -webkit-tap-highlight-color: transparent;
}

.btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  box-shadow: var(--shadow-sm);
}

.btn.primary {
  color: #ffffff;
  background: var(--primary);
}

.btn.primary:hover {
  background: var(--primary-hover);
}

.btn.secondary {
  color: var(--primary);
  border-color: #bfdbfe;
  background: var(--primary-soft);
}

.btn.outline {
  color: var(--text-soft);
  border-color: var(--border);
  background: #ffffff;
}

.btn.ghost {
  color: var(--text-soft);
  background: transparent;
  box-shadow: none;
}

.btn.danger,
.icon-btn.danger {
  color: var(--danger);
  border-color: #fecaca;
  background: #fff7f7;
}

.danger-text {
  color: var(--danger);
}

.btn.wide {
  width: 100%;
}

.btn.loading,
.btn.is-loading {
  pointer-events: none;
  opacity: 0.72;
}

.btn.loading::before,
.btn.is-loading::after {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  animation: button-spin 0.75s linear infinite;
}

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

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: var(--text-soft);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.icon-btn:hover {
  color: var(--primary);
  border-color: #bfdbfe;
  background: var(--primary-soft);
}

.top-icon {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.link-more {
  min-height: 30px;
  color: var(--text-soft);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.link-more:hover {
  color: var(--primary);
}

.form-grid,
.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.filter-card {
  background: #ffffff;
}

.filter-grid {
  grid-template-columns: minmax(180px, 1.15fr) repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.form-stack {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field.span-2,
.form-actions.span-2,
.saved-files.span-2,
.tag-suggestions.span-2,
.invoice-form-section.span-2 {
  grid-column: 1 / -1;
}

.invoice-form-section {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.invoice-description-field textarea {
  min-height: 230px;
  line-height: 1.55;
}

.order-modal-panel {
  width: min(960px, 100%);
}

.order-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 769px) {
  .order-form-actions {
    position: sticky;
    bottom: -20px;
    z-index: 4;
    margin: 2px -20px -20px;
    padding: 12px 20px;
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(12px);
  }
}

.order-form > input[type="hidden"] {
  display: none;
}

.customer-order-flow {
  grid-column: 1 / -1;
  padding: 10px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
}

.customer-order-flow ol {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.customer-order-flow li {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.customer-order-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -10%;
  width: 20%;
  height: 1px;
  background: #bfdbfe;
}

.customer-order-flow b {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  font-size: 11px;
}

.order-form-section {
  min-width: 0;
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  background: #ffffff;
}

.order-form-section > summary {
  min-height: 64px;
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  background: #fbfdff;
}

.order-form-section > summary::-webkit-details-marker {
  display: none;
}

.order-form-section[open] > summary {
  border-bottom: 1px solid var(--border);
}

.order-form-section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.order-form-section-icon .os-icon {
  width: 18px;
  height: 18px;
}

.order-form-section-copy {
  min-width: 0;
}

.order-form-section-copy strong,
.order-form-section-copy small {
  display: block;
}

.order-form-section-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.order-form-section-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.order-form-section-chevron {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--text-soft);
}

.order-form-section-chevron .os-icon {
  width: 17px;
  height: 17px;
  transition: transform 0.18s ease;
}

.order-form-section[open] .order-form-section-chevron .os-icon {
  transform: rotate(180deg);
}

.order-form-section-body {
  padding: 14px;
}

.order-form-stack {
  display: grid;
  gap: 12px;
}

.order-form-stack > .span-2 {
  grid-column: auto;
}

.order-upload-field {
  position: relative;
  padding: 13px;
  border: 1px dashed #93c5fd;
  border-radius: 11px;
  background: #f8fbff;
  cursor: pointer;
}

.order-upload-field > span .os-icon {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.order-upload-control {
  min-height: 46px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
}

.order-upload-control b {
  min-height: 31px;
  padding: 0 11px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.order-upload-control small {
  min-width: 0;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.order-upload-field .order-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.order-form-actions {
  grid-column: 1 / -1;
  padding-top: 2px;
}

.client-order-rules {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff 0%, #eff6ff 100%);
}

.client-order-rules-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-order-rules-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.client-order-rules-head p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.6;
}

.client-order-rules-head > .os-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: var(--primary);
}

.settings-subsection + .settings-subsection {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.settings-subsection > h3 {
  margin: 0 0 12px;
}

.brand-assets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.media-upload {
  width: 100%;
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.media-upload-preview {
  width: 92px;
  height: 72px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px dashed #bfdbfe;
  border-radius: 10px;
  color: var(--primary);
  background: #ffffff;
}

.media-upload.media-upload-icon .media-upload-preview,
.media-upload.media-upload-avatar .media-upload-preview {
  width: 72px;
  height: 72px;
}

.media-upload-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.media-upload.media-upload-avatar .media-upload-preview img {
  object-fit: cover;
}

.media-upload-placeholder {
  font-size: 12px;
  font-weight: 900;
}

.media-upload-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.media-upload-content > strong,
.media-upload-content > small,
.media-upload-content > p {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.media-upload-content > small {
  width: 100%;
  overflow: hidden;
  color: var(--primary);
  font-weight: 750;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.media-upload-content > p {
  width: 100%;
  margin: 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.media-upload-button {
  width: auto;
  min-height: 34px;
  margin-top: 3px;
  cursor: pointer;
}

.media-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.form-grid > .media-upload.span-2 {
  grid-column: 1 / -1;
}

.client-edit-panel {
  width: min(880px, 100%);
  overflow-x: hidden;
}

.client-avatar-upload {
  grid-template-columns: 88px minmax(0, 1fr);
  padding: 16px;
  border-color: #cbdcf7;
  background: #f8fbff;
}

.client-avatar-upload.media-upload-avatar .media-upload-preview {
  width: 88px;
  height: 88px;
}

.payment-information {
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.payment-information dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-information dl > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #ffffff;
}

.payment-information dl > div.wide {
  grid-column: 1 / -1;
}

.payment-information dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.payment-information dd {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.payment-information dd > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.payment-copy-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: none;
}

.payment-copy-btn .os-icon {
  width: 15px;
  height: 15px;
}

.payment-information-warning {
  margin-bottom: 11px;
  padding: 9px 10px;
  border: 1px solid #fde68a;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #92400e;
  background: #fffbeb;
}

.payment-information-warning .os-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.payment-information-warning strong,
.payment-information-warning small {
  display: block;
}

.payment-information-warning strong {
  font-size: 12px;
}

.payment-information-warning small {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.45;
}

.section-heading {
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h3,
.section-heading p {
  margin: 0;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.field span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-size: 13px;
  font-weight: 780;
}

.field span .required-mark {
  color: var(--danger);
  font-style: normal;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  outline: 0;
  color: var(--text);
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 17px, calc(100% - 12px) 17px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field input[readonly] {
  color: var(--text-soft);
  background: #f8fafc;
}

.tag-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-btn {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 760;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.settings-side {
  display: grid;
  gap: 16px;
  align-content: start;
}

.settings-card,
.settings-form section,
.settings-panel {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.settings-card {
  display: grid;
  gap: 12px;
}

.settings-panel {
  display: grid;
  gap: 16px;
}

.settings-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--primary);
}

.settings-panel-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.settings-panel-head h2,
.settings-panel .card-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.settings-panel-head p,
.settings-panel .card-header p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.settings-panel-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.settings-panel-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-panel-body {
  display: grid;
  gap: 14px;
}

.settings-panel.tone-blue::before,
.settings-panel.tone-blue .settings-panel-icon {
  color: #2563eb;
  background-color: #dbeafe;
}

.settings-panel.tone-green::before,
.settings-panel.tone-green .settings-panel-icon {
  color: #16a34a;
  background-color: #dcfce7;
}

.settings-panel.tone-purple::before,
.settings-panel.tone-purple .settings-panel-icon {
  color: #7c3aed;
  background-color: #ede9fe;
}

.settings-panel.tone-sky::before {
  background: #0ea5e9;
}

.settings-panel.tone-orange::before {
  background: #f59e0b;
}

.settings-panel.tone-slate::before {
  background: #64748b;
}

.settings-panel.tone-red::before {
  background: #ef4444;
}

.settings-panel.tone-blue::before {
  background: #2563eb;
}

.settings-panel.tone-green::before {
  background: #16a34a;
}

.settings-panel.tone-purple::before {
  background: #7c3aed;
}

.setting-section {
  min-width: 0;
}

.settings-anchor {
  position: sticky;
  top: 74px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(14px);
}

.settings-anchor button {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-soft);
  background: #f8fafc;
  font-size: 13px;
  font-weight: 820;
}

.settings-anchor button:hover {
  color: var(--primary);
  border-color: #bfdbfe;
  background: var(--primary-soft);
}

.settings-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); box-shadow: var(--shadow-xs); }
.settings-tabs button { flex: 0 0 auto; border: 0; border-radius: 9px; padding: 10px 14px; color: var(--text-soft); background: transparent; font: inherit; font-weight: 800; cursor: pointer; }
.settings-tabs button.active { color: #fff; background: var(--primary); }
.client-payout-section { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft, #f8fafc); }
.client-payout-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.client-type-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.client-type-setting { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.client-type-setting input { margin-top: 3px; }
.client-type-setting span { display: grid; gap: 3px; }
.client-type-setting small { color: var(--text-muted); }
.dashboard-period-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dashboard-period-setting { display: grid; grid-template-columns: minmax(0, 1fr) minmax(152px, .8fr); align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.dashboard-period-setting .field { margin: 0; }
.dashboard-period-setting .field-check { min-height: 46px; display: flex; align-items: center; gap: 10px; font-weight: 700; }
.client-payout-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0 0; }
.client-payout-details div { min-width: 0; }
.client-payout-details dt { color: var(--text-muted); font-size: 12px; }
.client-payout-details dd { margin: 3px 0 0; overflow-wrap: anywhere; color: var(--text-main); }

.connection-list {
  display: grid;
  gap: 10px;
}

.connection-list > div {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.connection-list span:first-child {
  color: var(--text);
  font-weight: 850;
}

.connection-list small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-pill i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
}

.status-pill.ok {
  color: var(--success);
  background: var(--success-bg);
}

.status-pill.warn {
  color: var(--warning);
  background: var(--warning-bg);
}

.log-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) minmax(132px, 0.72fr);
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.log-filter-grid .btn {
  align-self: end;
  width: 100%;
}

.reminder-list {
  display: grid;
  gap: 9px;
}

.finance-reminders .reminder-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-detail-card .table-shell {
  min-width: 0;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
}

.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
}

.reminder-item strong,
.reminder-item small {
  display: block;
}

.reminder-item strong {
  color: var(--text);
  font-weight: 850;
}

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

.reminder-item b {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.reminder-item.warning b {
  color: var(--warning);
  background: var(--warning-bg);
}

.reminder-item.danger b {
  color: var(--danger);
  background: var(--danger-bg);
}

.pending-upload-list {
  padding: 10px;
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
}

.settings-card .card-header,
.settings-panel .card-header {
  margin-bottom: 0;
}

.notification-card section {
  border-radius: 14px;
  background: #f8fafc;
  box-shadow: none;
}

.smtp-preset-help,
.settings-hint {
  margin: 0 0 12px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.smtp-preset-help {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(14, 165, 233, 0.05));
}

.smtp-preset-help strong {
  color: var(--text);
  font-size: 14px;
}

.settings-form h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 14px;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-form .single {
  max-width: 360px;
}

.compact-backup .card-header {
  margin-bottom: 0;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  background: #ffffff;
  font-size: 13px;
  font-weight: 780;
}

.check-field input {
  accent-color: var(--primary);
}

.customer-bind-box {
  display: grid;
}

.customer-bind-box[hidden] {
  display: none;
}

.settings-save {
  padding: 4px 0 0;
}

/* 中文注释：权限分配与时间显示保持紧凑，避免管理表格撑破布局。 */
.permission-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}

.permission-box h3,
.permission-box p {
  margin: 0 0 10px;
}

.permission-box p {
  color: var(--text-soft);
  font-size: 13px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.permission-grid label,
.csv-import-box label {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  background: #ffffff;
  font-size: 13px;
  font-weight: 760;
}

.permission-grid input,
.csv-import-box input {
  accent-color: var(--primary);
}

.time-cell {
  display: grid;
  gap: 2px;
  min-width: 145px;
}

.time-cell b {
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
}

.time-cell small {
  color: var(--muted);
  font-size: 12px;
}
/* 中文注释：专业后台表格，桌面紧凑、移动端卡片化。 */
.table-shell {
  display: grid;
  gap: 12px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.table-orders {
  min-width: 0;
}

.table-orders .col-select { width: 4%; }
.table-orders .col-orderNo { width: 11%; }
.table-orders .col-date { width: 14%; }
.table-orders .col-clientName { width: 11%; }
.table-orders .col-orderAmount { width: 10%; }
.table-orders .col-actualAmount { width: 13%; }
.table-orders .col-profitAmount { width: 9%; }
.table-orders .col-statusText { width: 8%; }
.table-orders .col-attachmentCount { width: 6%; }
.table-orders .col-actions { width: 14%; }

.table-orders th,
.table-orders td {
  padding-right: 8px;
  padding-left: 8px;
}

.table-orders td.col-orderAmount,
.table-orders td.col-profitAmount {
  white-space: nowrap;
}

.table-orders .time-cell,
.table-finance .time-cell {
  min-width: 0;
}

.table-orders .time-cell b,
.table-finance .time-cell b {
  font-size: 11.5px;
  white-space: nowrap;
}

.table-finance {
  min-width: 1120px;
}

.table-finance .col-orderNo { width: 105px; }
.table-finance .col-date { width: 140px; }
.table-finance .col-clientName { width: 130px; }
.table-finance .col-orderAmount,
.table-finance .col-profitAmount { width: 112px; }
.table-finance .col-actualAmount { width: 135px; }
.table-finance .col-statusText { width: 90px; }
.table-finance .col-reconciliationStatus { width: 138px; }
.table-finance .col-reconciliationReference { width: 150px; }
.table-finance .col-actions { width: 62px; }

.table-clients {
  min-width: 0;
}

.table-clients .col-name { width: 22%; }
.table-clients .col-clientType { width: 13%; }
.table-clients .col-payout { width: 23%; }
.table-clients .col-contact { width: 19%; }
.table-clients .col-tags { width: 14%; }
.table-clients .col-actions { width: 9%; }

.table-users .col-username { width: 17%; }
.table-users .col-role { width: 10%; }
.table-users .col-clientId { width: 16%; }
.table-users .col-permissions { width: 29%; }
.table-users .col-active { width: 10%; }
.table-users .col-actions { width: 18%; }

.table-logs {
  min-width: 900px;
}

.table-logs .col-createdAt { width: 17%; }
.table-logs .col-module { width: 13%; }
.table-logs .col-action { width: 17%; }
.table-logs .col-targetName { width: 16%; }
.table-logs .col-operator { width: 13%; }
.table-logs .col-detail { width: 24%; }

.table-logs th,
.table-logs td {
  padding: 13px 14px;
  vertical-align: top;
}

.table-logs .time-cell {
  min-width: 0;
}

.table-logs .time-cell b {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
}

.log-module-badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  overflow: hidden;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.log-action-text,
.log-target-text,
.log-operator-text,
.log-detail-text {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.log-action-text {
  color: var(--text);
  font-weight: 780;
  -webkit-line-clamp: 2;
}

.log-target-text {
  color: var(--text);
  font-weight: 720;
  -webkit-line-clamp: 2;
}

.log-operator-text {
  color: var(--text-soft);
  -webkit-line-clamp: 2;
}

.log-detail-text {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
  -webkit-line-clamp: 3;
}

.mobile-log-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.mobile-log-card header {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-log-card .time-cell {
  min-width: 0;
  justify-items: end;
  text-align: right;
}

.mobile-log-card .time-cell b {
  font-size: 11px;
  white-space: nowrap;
}

.mobile-log-action {
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.mobile-log-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
}

.mobile-log-card dl > div {
  min-width: 0;
}

.mobile-log-card dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.mobile-log-card dd {
  min-width: 0;
  margin: 0;
  font-size: 12px;
}

.mobile-log-card .mobile-log-detail {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
}

.table-clients th,
.table-clients td {
  padding-right: 8px;
  padding-left: 8px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}

.data-table td {
  font-size: 13px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #f8fbff;
}

.sort-btn {
  width: 100%;
  min-height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  color: inherit;
  background: transparent;
  font-size: 12px;
  font-weight: 850;
}

.sort-btn span {
  color: var(--muted);
  font-size: 11px;
}

.sort-btn.active {
  color: var(--primary);
}

.identity,
.client-mini {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.identity span,
.client-mini span {
  min-width: 0;
}

.identity b,
.client-mini b {
  max-width: 100%;
  overflow: hidden;
  color: var(--primary);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.identity b,
.identity small,
.client-mini b,
.client-mini small {
  display: block;
}

.identity small,
.client-mini small {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.data-table td:last-child .row-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 5px;
}

.data-table td:last-child .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.data-table.table-orders td.col-actions .row-actions {
  flex-wrap: wrap;
  gap: 3px;
}

.data-table.table-orders td.col-actions .icon-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border-radius: 8px;
}

.table-orders .link-btn {
  max-width: 100%;
  display: inline-block;
  overflow: hidden;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.table-orders td {
  height: 74px;
}

.table-clients td.col-clientType,
.table-clients td.col-payout,
.table-clients td.col-contact { white-space: normal; }
.client-payout-cell,
.client-contact-cell { display: grid; gap: 4px; min-width: 0; }
.client-payout-cell b,
.client-contact-cell b { color: var(--text-main); }
.client-payout-cell small,
.client-contact-cell small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-users td.col-username,
.table-users td.col-clientId {
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-users td.col-actions .row-actions {
  flex-wrap: wrap;
}

.mobile-data-list {
  display: none;
}

.orders-actions,
.orders-actions-primary,
.orders-actions-secondary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.mobile-order-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  background: #ffffff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mobile-order-card.is-selected {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px #dbeafe;
}

.mobile-order-listbar,
.mobile-order-card-head,
.mobile-order-client,
.mobile-order-card-foot {
  display: flex;
  align-items: center;
}

.mobile-order-listbar {
  min-height: 38px;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 11px;
}

.mobile-order-select-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.mobile-order-select-all input,
.mobile-order-check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.mobile-order-card-head {
  min-height: 64px;
  padding: 12px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: #fbfdff;
}

.mobile-order-check {
  width: 20px;
  min-height: 28px;
  display: grid;
  place-items: center;
}

.mobile-order-identity {
  min-width: 0;
}

.mobile-order-identity .link-btn,
.mobile-order-identity small {
  display: block;
  max-width: 100%;
}

.mobile-order-identity .link-btn {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-order-identity small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-order-client {
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  gap: 7px;
  border-bottom: 1px solid var(--border);
}

.mobile-order-client > .os-icon {
  width: 17px;
  height: 17px;
  color: var(--text-soft);
}

.mobile-order-client .link-btn {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-order-client small {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.mobile-order-client small .os-icon {
  width: 14px;
  height: 14px;
}

.mobile-order-amounts {
  padding: 11px 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.mobile-order-amounts > div {
  min-width: 0;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid #e5edf7;
  border-radius: 10px;
  background: #f8fafc;
}

.mobile-order-amounts > div:nth-child(3):last-child {
  grid-column: 1 / -1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-order-amounts > div:nth-child(3):last-child strong {
  margin-top: 0;
}

.mobile-order-amounts span,
.mobile-order-amounts strong,
.mobile-order-amounts small {
  display: block;
}

.mobile-order-amounts span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
}

.mobile-order-amounts strong {
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-order-amounts small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mobile-order-card-foot {
  min-height: 48px;
  padding: 8px 10px 8px 12px;
  justify-content: space-between;
  gap: 8px;
}

.mobile-order-card-foot > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.mobile-order-actions {
  min-width: 0;
}

.mobile-order-actions .row-actions {
  gap: 5px;
  justify-content: flex-end;
}

.mobile-order-actions .icon-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border-radius: 9px;
}

.mobile-order-primary-actions {
  position: relative;
  flex-wrap: nowrap;
}

.mobile-order-more {
  position: relative;
}

.mobile-order-more > summary {
  list-style: none;
  cursor: pointer;
}

.mobile-order-more > summary::-webkit-details-marker {
  display: none;
}

.mobile-order-more[open] > summary {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

.mobile-order-more-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 8;
  width: 178px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: grid;
  gap: 3px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
}

.mobile-order-menu-item {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.mobile-order-menu-item:hover {
  color: var(--text);
  background: #f8fafc;
}

.mobile-order-menu-item.danger {
  color: var(--danger);
}

.mobile-order-menu-item .os-icon {
  width: 17px;
  height: 17px;
}

.mobile-record-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  background: #ffffff;
}

.mobile-record-card > header {
  min-height: 62px;
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  background: #fbfdff;
}

.mobile-record-card > header .identity {
  min-width: 0;
  flex: 1;
}

.mobile-record-card > header .row-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 4px;
}

.mobile-record-card > header .icon-btn,
.mobile-record-card > footer .icon-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
}

.mobile-record-grid {
  padding: 10px 11px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.mobile-record-grid > div {
  min-width: 0;
  padding: 8px 9px;
  border-radius: 9px;
  background: #f8fafc;
}

.mobile-record-grid span,
.mobile-record-detail > span {
  display: block;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
}

.mobile-record-grid strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-record-detail {
  min-width: 0;
  padding: 10px 11px;
  border-bottom: 1px solid var(--border);
}

.mobile-record-detail .usdt-cell,
.mobile-record-detail .tag-list {
  margin-top: 6px;
}

.mobile-record-detail .usdt-cell {
  width: 100%;
}

.mobile-record-detail .usdt-cell small {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.mobile-record-card > footer {
  min-height: 48px;
  padding: 8px 11px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.mobile-client-card > footer {
  justify-content: space-between;
  gap: 10px;
}

.mobile-record-tags {
  min-width: 0;
  flex: 1;
}

.mobile-user-identity {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
}

.mobile-user-identity > div {
  min-width: 0;
}

.mobile-user-identity > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.mobile-user-identity b,
.mobile-user-identity small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-user-identity small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10px;
}

.mobile-user-badges {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 5px;
}

.amount-detail,
.usdt-cell {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.amount-detail strong {
  font-weight: 760;
  white-space: nowrap;
}

.amount-detail small,
.usdt-cell small {
  color: var(--muted);
  font-size: 11px;
}

.usdt-cell b {
  color: var(--primary);
  font-size: 11px;
}

.usdt-cell small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.avatar.fallback {
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  font-weight: 900;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.status-unpaid {
  color: #a16207;
  background: var(--warning-bg);
}

.status-paid {
  color: #1d4ed8;
  background: var(--info-bg);
}

.status-completed,
.badge.success {
  color: #15803d;
  background: var(--success-bg);
}

.status-cancelled {
  color: #b91c1c;
  background: var(--danger-bg);
}

.badge.info {
  color: var(--primary);
  background: var(--primary-soft);
}

.muted-badge {
  color: var(--text-soft);
  background: #eef2f7;
}

.tag-list,
.tag-stack {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-list i,
.tag-stack i {
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

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

.link-btn {
  color: var(--primary);
  background: transparent;
  font-weight: 850;
  text-align: left;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 13px;
}

.pagination label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination select {
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 4px 8px;
  background: #ffffff;
}

.pagination > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination-current {
  min-width: 52px;
  color: var(--text-soft);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

@media (min-width: 769px) {
  .table-shell-orders .table-wrap,
  .table-shell-clients .table-wrap,
  .table-shell-users .table-wrap,
  .finance-detail-card .table-wrap {
    max-height: min(68vh, 760px);
    overflow: auto;
  }

  .table-orders .col-select,
  .table-orders .col-orderNo,
  .table-orders .col-actions,
  .table-clients .col-name,
  .table-clients .col-actions,
  .table-users .col-username,
  .table-users .col-actions,
  .table-finance .col-orderNo {
    position: sticky;
    background: #ffffff;
  }

  .table-orders th.col-select,
  .table-orders th.col-orderNo,
  .table-orders th.col-actions,
  .table-clients th.col-name,
  .table-clients th.col-actions,
  .table-users th.col-username,
  .table-users th.col-actions,
  .table-finance th.col-orderNo {
    z-index: 5;
    background: #f8fafc;
  }

  .table-orders .col-select { left: 0; }
  .table-orders .col-orderNo { left: 34px; box-shadow: 8px 0 12px -12px rgba(15, 23, 42, 0.45); }
  .table-orders .col-actions,
  .table-clients .col-actions,
  .table-users .col-actions { right: 0; box-shadow: -8px 0 12px -12px rgba(15, 23, 42, 0.45); }
  .table-clients .col-name,
  .table-users .col-username,
  .table-finance .col-orderNo { left: 0; box-shadow: 8px 0 12px -12px rgba(15, 23, 42, 0.45); }

  .data-table tbody tr:hover .col-select,
  .data-table tbody tr:hover .col-orderNo,
  .data-table tbody tr:hover .col-actions,
  .data-table tbody tr:hover .col-name,
  .data-table tbody tr:hover .col-username {
    background: #f8fbff;
  }

  .table-orders .col-orderAmount,
  .table-orders .col-actualAmount,
  .table-orders .col-profitAmount,
  .table-finance .col-orderAmount,
  .table-finance .col-actualAmount,
  .table-finance .col-profitAmount,
  .table-reports .col-orderAmount,
  .table-reports .col-actualAmount,
  .table-reports .col-profitAmount,
  .table-reports .col-averageOrder {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .table-shell-logs .table-wrap {
    display: none;
  }

  .mobile-data-list-logs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .table-shell-orders .table-wrap,
  .table-shell-clients .table-wrap,
  .table-shell-users .table-wrap {
    display: none;
  }

  .mobile-data-list-orders,
  .mobile-data-list-clients,
  .mobile-data-list-users {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .mobile-order-listbar {
    grid-column: 1 / -1;
  }
}

@media (min-width: 769px) and (max-width: 860px) {
  .mobile-data-list-orders,
  .mobile-data-list-clients,
  .mobile-data-list-users,
  .mobile-data-list-logs {
    grid-template-columns: 1fr;
  }
}
/* 中文注释：图表、排行、活动流和概览区使用轻量原生 SVG/CSS。 */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.chart-wrap {
  min-height: 250px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.svg-chart {
  width: 100%;
  height: 250px;
  display: block;
}

.svg-grid {
  stroke: rgba(203, 213, 225, 0.72);
  stroke-width: 1;
}

.svg-base {
  stroke: var(--border-strong);
  stroke-width: 1.3;
}

.svg-axis,
.svg-label {
  fill: var(--muted);
  font-size: 11px;
}

.bar-order { background: var(--primary); }
.bar-actual { background: var(--success); }
.bar-profit { background: var(--warning); }

.rank-list,
.compact-list,
.activity-list {
  display: grid;
  gap: 8px;
}

.rank-item {
  width: 100%;
  min-height: 52px;
  padding: 8px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.rank-item:hover {
  background: var(--surface-2);
}

.rank-index {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 900;
}

.rank-item strong,
.rank-item small {
  display: block;
}

.rank-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.rank-item i {
  display: block;
  height: 6px;
  margin-top: 7px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.rank-item i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.compact-row {
  width: 100%;
  min-height: 58px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
}

.compact-row:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.compact-row strong,
.compact-row small {
  display: block;
}

.compact-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.activity-item {
  width: 100%;
  min-height: 52px;
  padding: 8px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.activity-item:hover {
  background: var(--surface-2);
}

.activity-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.activity-dot .os-icon {
  width: 15px;
  height: 15px;
}

.activity-dot.tone-1 { color: var(--success); background: var(--success-bg); }
.activity-dot.tone-2 { color: var(--warning); background: var(--warning-bg); }
.activity-dot.tone-3 { color: var(--info); background: var(--info-bg); }
.activity-dot.tone-4 { color: #db2777; background: #fce7f3; }

.activity-item strong,
.activity-item small {
  display: block;
}

.activity-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
}

.overview-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.overview-item span {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 780;
}

.overview-item strong {
  display: block;
  margin-top: 6px;
  color: var(--text);
  font-size: 20px;
}

.sparkline {
  width: 100%;
  height: 30px;
  margin-top: 8px;
  display: block;
}

.sparkline path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
}

.overview-item.green .sparkline path { stroke: var(--success); }
.overview-item.blue .sparkline path { stroke: var(--info); }
.overview-item.orange .sparkline path { stroke: var(--warning); }
.overview-item.pink .sparkline path { stroke: #db2777; }

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

.quick-action {
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 7px;
  justify-items: start;
  color: var(--text);
  background: var(--surface-2);
  text-align: left;
}

.quick-action:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}
/* 报表中心专用布局：突出筛选、核心指标、趋势与明细层级。 */
.reports-page {
  --report-blue: #2563eb;
  --report-green: #16a34a;
  --report-teal: #0f9f95;
  --report-orange: #d97706;
  gap: 18px;
}

.report-control-card {
  padding: 20px;
  overflow: hidden;
  border-color: #dbe4f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.report-control-head {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.report-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-heading-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.report-heading-icon .os-icon {
  width: 21px;
  height: 21px;
}

.report-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 850;
}

.report-heading p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.report-export-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.report-export-actions .os-icon,
.report-analyze-btn .os-icon,
.report-scope-summary .os-icon {
  width: 16px;
  height: 16px;
}

.report-filter-grid {
  grid-template-columns: minmax(180px, 1.2fr) repeat(2, minmax(170px, 1fr)) minmax(145px, 0.8fr) auto;
  gap: 10px;
  padding: 14px;
  border-color: #dbe4f0;
  border-radius: 11px;
  background: #f8fafc;
}

.report-filter-grid .field > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.report-filter-grid input,
.report-filter-grid select {
  min-height: 42px;
  border-color: #d8e1ec;
  background: #ffffff;
}

.report-analyze-btn {
  min-width: 102px;
  min-height: 42px;
}

.report-scope-summary {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.report-scope-summary span,
.report-card-tag,
.report-result-count {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1d4ed8;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 750;
}

.report-metric-grid {
  display: grid;
  grid-template-columns: repeat(var(--report-metric-count, 4), minmax(0, 1fr));
  gap: 14px;
}

.report-stat-card {
  position: relative;
  min-width: 0;
  min-height: 138px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.report-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--report-blue);
}

.report-stat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.report-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--report-blue);
  background: #eff6ff;
}

.report-stat-icon .os-icon {
  width: 17px;
  height: 17px;
}

.report-stat-card > strong {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 29px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.report-stat-card > small {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.report-stat-card.green::before { background: var(--report-green); }
.report-stat-card.green .report-stat-icon { color: var(--report-green); background: #ecfdf3; }
.report-stat-card.teal::before { background: var(--report-teal); }
.report-stat-card.teal .report-stat-icon { color: var(--report-teal); background: #ecfeff; }
.report-stat-card.orange::before { background: var(--report-orange); }
.report-stat-card.orange .report-stat-icon { color: var(--report-orange); background: #fff7ed; }

.report-chart-card,
.report-rank-card,
.report-detail-card {
  border-color: #dbe4f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.report-chart-card,
.report-rank-card {
  min-height: 410px;
}

.report-chart-card {
  display: flex;
  flex-direction: column;
}

.report-chart-card .chart-wrap {
  flex: 1;
}

.report-chart-card .chart-legend {
  margin: 0 0 12px;
}

.report-chart-card .chart-wrap {
  min-height: 304px;
  border-color: #e6ebf2;
  background: #fbfcfe;
}

.report-chart-card .chart-scroll {
  min-height: 300px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.report-chart-card .svg-chart {
  height: 300px;
}

.report-rank-card {
  display: flex;
  flex-direction: column;
}

.report-rank-card .rank-list {
  flex: 1;
  gap: 6px;
}

.report-rank-card .rank-item {
  min-height: 58px;
  padding: 9px 8px;
}

.report-rank-card .rank-index {
  border-radius: 8px;
}

.report-rank-insights {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-rank-insights div {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-2);
}

.report-rank-insights span,
.report-rank-insights strong {
  display: block;
}

.report-rank-insights span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.report-rank-insights strong {
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.report-detail-card .card-header {
  margin-bottom: 16px;
}

.report-period {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 800;
  white-space: nowrap;
}

.report-order-count {
  font-variant-numeric: tabular-nums;
}

.table-reports .col-period { width: 18%; }
.table-reports .col-count { width: 12%; }
.table-reports .col-orderAmount,
.table-reports .col-actualAmount,
.table-reports .col-profitAmount,
.table-reports .col-averageOrder { width: 17.5%; }

.table-reports td:not(.col-period) {
  font-variant-numeric: tabular-nums;
}

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

  .report-stat-card > strong {
    font-size: 27px;
  }
}

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

  .report-analyze-btn {
    width: 100%;
    grid-column: 1 / -1;
  }

  .report-chart-card,
  .report-rank-card {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .reports-page {
    gap: 14px;
  }

  .report-control-card {
    padding: 15px;
  }

  .report-control-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-export-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-export-actions .btn {
    width: 100%;
  }

  .report-filter-grid,
  .report-metric-grid {
    grid-template-columns: 1fr;
  }

  .report-stat-card {
    min-height: 122px;
  }

  .report-stat-card > strong {
    font-size: 25px;
  }

  .report-scope-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .report-scope-summary span {
    width: 100%;
  }

  .report-chart-card .card-actions,
  .report-detail-card .card-actions {
    width: 100%;
  }

  .report-card-tag,
  .report-result-count {
    width: 100%;
    justify-content: center;
  }

  .report-rank-insights {
    grid-template-columns: 1fr;
  }

  .report-detail-card {
    padding: 15px 10px;
  }
}

@media (max-width: 420px) {
  .report-export-actions {
    grid-template-columns: 1fr;
  }

  .report-heading-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}
/* 仪表盘与财务工作区：统一信息层级，并保持金额、图表和表格在各视口稳定。 */
.dashboard-page,
.finance-page {
  gap: 18px;
}

.workspace-metric-grid {
  display: grid;
  grid-template-columns: repeat(var(--workspace-metric-count, 4), minmax(0, 1fr));
  gap: 14px;
}

.dashboard-period-switcher {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 3px 0 1px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-period-switcher > span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-period-options {
  padding: 3px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background: #f8fafc;
}

.dashboard-period-option {
  min-height: 30px;
  padding: 5px 11px;
  border: 0;
  border-radius: 7px;
  color: #64748b;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-period-option:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

.dashboard-period-option.active {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.22);
}

.workspace-stat-card {
  position: relative;
  min-width: 0;
  min-height: 128px;
  padding: 17px 18px 16px;
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.workspace-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #2563eb;
}

.workspace-stat-head {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.workspace-stat-head > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-stat-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #2563eb;
  background: #eff6ff;
}

.workspace-stat-icon .os-icon {
  width: 17px;
  height: 17px;
}

.workspace-stat-card > strong {
  display: block;
  margin-top: 12px;
  color: var(--text);
  font-size: 25px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.workspace-stat-card > small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-metric-grid .workspace-stat-card > strong,
.finance-metric-grid .workspace-stat-card > strong {
  font-size: clamp(17px, 1.45vw, 20px);
}

.workspace-stat-card.green::before { background: #16a34a; }
.workspace-stat-card.green .workspace-stat-icon { color: #15803d; background: #ecfdf3; }
.workspace-stat-card.teal::before { background: #0f9f95; }
.workspace-stat-card.teal .workspace-stat-icon { color: #0f766e; background: #ecfeff; }
.workspace-stat-card.orange::before { background: #d97706; }
.workspace-stat-card.orange .workspace-stat-icon { color: #d97706; background: #fff7ed; }
.workspace-stat-card.pink::before { background: #db2777; }
.workspace-stat-card.pink .workspace-stat-icon { color: #db2777; background: #fdf2f8; }

.workspace-control-head {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.workspace-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.workspace-heading-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.workspace-heading-icon .os-icon {
  width: 21px;
  height: 21px;
}

.workspace-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 850;
}

.workspace-heading p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.workspace-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-actions .os-icon,
.finance-analyze-btn .os-icon {
  width: 16px;
  height: 16px;
}

.workspace-count-badge {
  min-width: 30px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #1d4ed8;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-orders-card,
.dashboard-activity-card,
.dashboard-chart-card,
.dashboard-rank-card,
.dashboard-overview-card,
.finance-control-card,
.finance-reminders,
.finance-detail-card {
  border-color: #dbe4f0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.dashboard-orders-card,
.dashboard-activity-card {
  min-height: 372px;
  align-self: stretch;
}

.dashboard-orders-card .compact-list,
.dashboard-activity-card .activity-list {
  gap: 7px;
}

.dashboard-orders-card .compact-row {
  min-height: 68px;
  padding: 9px 11px;
}

.compact-order-main {
  min-width: 0;
}

.compact-order-main > strong,
.compact-order-main > small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-order-time {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.compact-order-meta {
  margin-top: 2px;
}

.dashboard-orders-card .compact-row > b {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-activity-card .activity-item {
  min-height: 52px;
  padding: 7px 8px;
}

.dashboard-activity-card .activity-item strong,
.dashboard-activity-card .activity-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-chart-card,
.dashboard-rank-card {
  min-height: 390px;
  align-self: stretch;
}

.dashboard-chart-card {
  display: flex;
  flex-direction: column;
}

.dashboard-chart-card .chart-wrap {
  flex: 1;
  min-height: 278px;
  border-color: #e6ebf2;
  background: #fbfcfe;
}

.dashboard-chart-card .svg-chart {
  height: 278px;
}

.dashboard-rank-card .rank-item {
  min-height: 52px;
}

.dashboard-overview-card .card-header {
  align-items: center;
}

.finance-control-card {
  padding: 20px;
}

.finance-filter-grid {
  grid-template-columns: minmax(170px, .9fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  padding: 14px;
  border-color: #dbe4f0;
  border-radius: 11px;
  background: #f8fafc;
}

.finance-filter-grid input,
.finance-filter-grid select,
.finance-analyze-btn {
  min-height: 42px;
}

.finance-analyze-btn {
  min-width: 120px;
}

.finance-reminders .card-header,
.finance-detail-card .card-header {
  margin-bottom: 15px;
}

.finance-reminders .reminder-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-empty-reminder {
  min-height: 78px;
  padding: 15px 17px;
  border: 1px dashed #bbf7d0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f6fef9;
}

.finance-empty-reminder > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #15803d;
  background: #dcfce7;
}

.finance-empty-reminder .os-icon {
  width: 19px;
  height: 19px;
}

.finance-empty-reminder strong,
.finance-empty-reminder small {
  display: block;
}

.finance-empty-reminder strong {
  color: var(--text);
  font-size: 14px;
}

.finance-empty-reminder small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
}

.finance-detail-card .table-finance td {
  font-variant-numeric: tabular-nums;
}

.finance-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reconciliation-reference {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1400px) {
  .workspace-stat-card > strong {
    font-size: 23px;
  }
}

@media (max-width: 1180px) {
  .dashboard-metric-grid,
  .finance-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .finance-analyze-btn {
    width: 100%;
    grid-column: 1 / -1;
  }

  .dashboard-orders-card,
  .dashboard-activity-card,
  .dashboard-chart-card,
  .dashboard-rank-card {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .dashboard-page,
  .finance-page {
    gap: 14px;
  }

  .dashboard-metric-grid,
  .finance-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .dashboard-period-switcher {
    padding: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .dashboard-period-options {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-period-option {
    width: 100%;
  }

  .workspace-stat-card {
    min-height: 116px;
    padding: 14px;
  }

  .workspace-stat-card > strong {
    font-size: 21px;
  }

  .workspace-control-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-actions .btn {
    width: 100%;
  }

  .finance-control-card {
    padding: 15px;
  }

  .finance-filter-grid,
  .finance-reminders .reminder-list {
    grid-template-columns: 1fr;
  }

  .dashboard-orders-card .compact-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .dashboard-metric-grid,
  .finance-metric-grid {
    grid-template-columns: 1fr;
  }

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

  .workspace-stat-card {
    min-height: 108px;
  }

  .workspace-heading-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
}
/* 中文注释：空状态、弹窗、确认框和 Toast 统一视觉。 */
.empty-state {
  min-height: 170px;
  padding: 24px 18px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: var(--text-soft);
  background: var(--surface-2);
  text-align: center;
}

.empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: #eff6ff;
  font-weight: 900;
}

.empty-icon .os-icon {
  width: 20px;
  height: 20px;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.34);
}

.modal-panel {
  width: min(920px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-close {
  color: var(--text-soft);
  background: var(--surface-2);
}

.confirm-panel {
  width: min(430px, 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.confirm-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 14px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--warning);
  background: var(--warning-bg);
  font-weight: 900;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 260px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.toast span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.toast.success span {
  color: var(--success);
  background: var(--success-bg);
}

.toast.error span {
  color: var(--danger);
  background: var(--danger-bg);
}

.backup-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.backup-summary span {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-soft);
  background: var(--surface-2);
}

.file-btn {
  position: relative;
}

/* 中文注释：第二版本详情、附件和状态时间线样式。 */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.detail-grid section {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--surface-2);
}

.detail-grid h3,
.modal-panel h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.detail-grid p {
  margin: 6px 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.order-detail-panel {
  width: min(920px, 100%);
}

.order-workflow-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #cbdcf7;
  border-radius: 8px;
  background: #f8fbff;
}

.order-workflow-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.order-workflow-card h3,
.order-workflow-card p {
  margin: 0;
}

.order-workflow-card header p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.order-workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.order-workflow-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.order-workflow-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-2);
}

.order-workflow-index .os-icon {
  width: 19px;
  height: 19px;
}

.order-workflow-step strong,
.order-workflow-step small {
  display: block;
  overflow-wrap: anywhere;
}

.order-workflow-step strong {
  color: var(--text);
  font-size: 13px;
}

.order-workflow-step small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.order-workflow-step.done {
  border-color: #b7e4cc;
  background: #f3fcf7;
}

.order-workflow-step.done .order-workflow-index {
  color: #047857;
  background: #dcfce7;
}

.order-workflow-step.current {
  border-color: #9fc2ff;
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.order-workflow-step.current .order-workflow-index {
  color: var(--primary);
  background: #eaf2ff;
}

.order-workflow-step.cancelled {
  opacity: .62;
}

.order-workflow-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.order-workflow-message {
  margin-top: 14px !important;
  padding: 10px 12px;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  color: var(--text-soft);
  background: #fffbeb;
  font-size: 13px;
}

.order-workflow-timeline p:first-child {
  border-left-color: #16a34a;
  background: #f3fcf7;
}

.reconciliation-detail {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid #cbdcf7;
  border-radius: 8px;
  background: #f8fbff;
}

.reconciliation-detail h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
}

.reconciliation-detail > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.reconciliation-detail p {
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
}

.reconciliation-detail p:last-child {
  grid-column: 1 / -1;
}

.reconciliation-detail span,
.reconciliation-detail strong,
.reconciliation-detail small {
  display: block;
}

.reconciliation-detail span {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.reconciliation-detail strong {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.reconciliation-detail small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.reconciliation-order-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: var(--text-soft);
  background: #eff6ff;
}

.reconciliation-order-summary span,
.reconciliation-order-summary strong,
.reconciliation-order-summary b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reconciliation-order-summary span {
  color: var(--primary);
  font-weight: 800;
}

.reconciliation-order-summary b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.reconciliation-form .form-hint {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid #f59e0b;
  border-radius: 6px;
  color: var(--text-soft);
  background: #fffbeb;
}

.complete-action {
  color: #047857;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.client-detail-panel {
  width: min(820px, 100%);
}

.client-detail-panel .modal-head p {
  margin: 8px 0 0;
}

.client-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 14px;
}

.client-detail-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f8fafc;
}

.client-detail-section-head {
  margin-bottom: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.client-detail-section-head h3 {
  margin: 0;
}

.client-detail-section-head > span {
  min-width: 28px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 800;
}

.client-contact-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.client-contact-list > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
  background: #ffffff;
}

.client-contact-list > div.wide {
  grid-column: 1 / -1;
}

.client-contact-list dt,
.client-payout-block > span,
.client-report-grid span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
}

.client-contact-list dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-payout-block {
  min-width: 0;
  margin-top: 10px;
  padding: 11px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
}

.client-payout-block > div {
  min-width: 0;
  margin-top: 7px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.client-payout-block b {
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
}

.client-payout-block code {
  min-width: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

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

.client-report-grid > div {
  min-width: 0;
  min-height: 78px;
  padding: 11px;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
  background: #ffffff;
}

.client-report-grid span,
.client-report-grid strong {
  display: block;
}

.client-report-grid strong {
  margin-top: 9px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-list-section,
.client-recent-orders {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.detail-list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.detail-list-heading h3 {
  margin: 0;
}

.detail-list-heading > span {
  min-width: 28px;
  min-height: 26px;
  display: inline-grid;
  place-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}

.detail-list-section .attachment-list,
.detail-list-section .timeline,
.client-recent-orders .compact-list {
  margin-bottom: 12px;
}

.modal-panel .pagination {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.detail-actions,
.invoice-actions {
  margin-bottom: 14px;
  display: flex;
  justify-content: flex-end;
}

.invoice-action {
  color: #0369a1;
  border-color: #bae6fd;
  background: #f0f9ff;
}

.invoice-preview {
  padding: 14px;
  border-radius: 14px;
  background: #e9eef5;
  overflow-x: auto;
}

.invoice-document {
  width: min(100%, 816px);
  min-height: 960px;
  margin: 0 auto;
  padding: 48px;
  color: #172033;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  font-family: Arial, Helvetica, sans-serif;
}

.invoice-header,
.invoice-bill,
.invoice-items,
.invoice-summary {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

.invoice-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
  padding-bottom: 30px;
  border-bottom: 3px solid #1d4ed8;
}

.invoice-brand span,
.invoice-bill > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.invoice-brand h1,
.invoice-title h2,
.invoice-bill h3,
.invoice-document p {
  margin: 0;
}

.invoice-brand h1 {
  margin: 8px 0 5px;
  font-size: 25px;
}

.invoice-title {
  text-align: right;
}

.invoice-title h2 {
  margin-bottom: 14px;
  color: #1d4ed8;
  font-size: 38px;
  font-weight: 800;
}

.invoice-title p {
  margin: 5px 0;
  font-size: 12px;
}

.invoice-bill {
  margin: 32px 0;
  padding: 0 12px;
}

.invoice-bill h3 {
  margin: 7px 0 8px;
  font-size: 19px;
}

.invoice-bill p {
  margin: 4px 0;
  color: #475569;
  font-size: 13px;
}

.invoice-items {
  width: 100%;
  border-collapse: collapse;
}

.invoice-items th {
  padding: 11px 12px;
  color: #ffffff;
  background: #172033;
  font-size: 11px;
  text-align: left;
}

.invoice-items th:not(:first-child),
.invoice-items td:not(:first-child) {
  text-align: right;
}

.invoice-items td {
  padding: 16px 12px;
  border-bottom: 1px solid #cbd5e1;
  font-size: 13px;
}

.invoice-items .invoice-description {
  max-width: 430px;
  line-height: 1.45;
  text-align: left;
}

.invoice-summary {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.invoice-summary > div p {
  margin-bottom: 8px;
  color: #475569;
  font-size: 12px;
}

.invoice-summary table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-summary td {
  padding: 9px 0 9px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: right;
  font-size: 13px;
}

.invoice-summary td:first-child {
  color: #64748b;
  text-align: left;
}

.invoice-summary .invoice-total td {
  color: #172033;
  border-top: 2px solid #172033;
  border-bottom: 0;
  font-size: 17px;
  font-weight: 900;
}

.invoice-document footer {
  margin-top: 80px;
  padding-top: 18px;
  border-top: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.payout-information {
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
}

.payout-information .section-heading {
  margin-bottom: 10px;
}

.payout-address {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.payout-address b {
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
}

.payout-address code,
.detail-address {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.invoice-picker-list {
  display: grid;
  gap: 9px;
}

.invoice-picker-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.invoice-picker-item strong,
.invoice-picker-item small {
  display: block;
}

.invoice-picker-item small {
  margin-top: 3px;
  color: var(--muted);
}

.primary-icon {
  color: #ffffff;
  border-color: var(--primary);
  background: var(--primary);
}

.attachment-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 18px;
}

.attachment-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface);
}

.attachment-item img,
.file-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.file-icon {
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--info-bg);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.attachment-item strong,
.attachment-item small {
  display: block;
}

.attachment-item small {
  margin-top: 3px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.attachment-item.has-pdf-preview {
  align-items: start;
}

.attachment-pdf-preview {
  grid-column: 1 / -1;
  width: 100%;
  height: clamp(320px, 56vh, 620px);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.timeline {
  display: grid;
  gap: 8px;
  margin: 10px 0 18px;
}

.timeline p {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  background: var(--surface-2);
}

.timeline b,
.timeline span {
  display: block;
}

.timeline span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

#print-area {
  display: none;
}
/* 通知任务与数据库备份工作区。 */
.operations-center {
  gap: 18px;
  align-items: start;
}

.operations-control-card,
.ops-table-card,
.backup-safety-note {
  border-color: #dbe4f0;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.operations-control-card {
  padding: 20px;
}

.operations-control-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.operations-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.operations-heading-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--primary);
  background: var(--primary-soft);
}

.operations-heading-icon .os-icon {
  width: 21px;
  height: 21px;
}

.operations-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 850;
}

.operations-heading p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

.operations-toolbar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.operations-toolbar .os-icon {
  width: 16px;
  height: 16px;
}

.ops-filter {
  min-width: 190px;
  display: grid;
  gap: 5px;
}

.ops-filter > span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
}

.ops-filter select {
  min-height: 40px;
  border-color: #d8e1ec;
  background: #ffffff;
}

.operations-metric-grid {
  grid-template-columns: repeat(var(--workspace-metric-count, 4), minmax(0, 1fr));
}

.operations-metric-grid .workspace-stat-card > strong {
  font-size: 24px;
}

.backup-page .workspace-stat-card > strong {
  font-size: 20px;
}

.backup-safety-note {
  padding: 14px 17px;
  border-color: #fed7aa;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffaf3;
}

.backup-safety-note > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #b45309;
  background: #ffedd5;
}

.backup-safety-note .os-icon {
  width: 19px;
  height: 19px;
}

.backup-safety-note strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.backup-safety-note p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.ops-table-card {
  min-width: 0;
  padding: 18px;
}

.ops-table-card .card-header {
  margin-bottom: 15px;
}

.ops-result-count {
  min-width: 30px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  color: #1d4ed8;
  background: #f8fbff;
  font-size: 12px;
  font-weight: 800;
}

.ops-table-card .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.ops-table-card .pagination {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ops-table th,
.ops-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.ops-table th {
  color: #52637a;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.ops-table td {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
}

.ops-table tbody tr:last-child td {
  border-bottom: 0;
}

.ops-table tbody tr:hover td {
  background: #fbfdff;
}

.ops-table td > small,
.ops-table time small,
.ops-event small,
.ops-file-name + small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-table time strong,
.ops-table time small {
  white-space: nowrap;
}

.ops-table time strong {
  display: block;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ops-file-name {
  display: block;
  overflow: hidden;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-source-badge {
  min-height: 25px;
  padding: 4px 8px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.ops-source-badge.remote {
  color: #0f766e;
  background: #ecfeff;
}

.ops-size,
.ops-attempts {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ops-attempts strong {
  color: var(--text);
  font-size: 14px;
}

.ops-attempts span {
  color: var(--muted);
}

.ops-table code {
  padding: 4px 6px;
  border-radius: 6px;
  color: #475569;
  background: #f1f5f9;
  font-size: 10px;
  white-space: nowrap;
}

.backup-files-table th:nth-child(1) { width: 29%; }
.backup-files-table th:nth-child(2) { width: 11%; }
.backup-files-table th:nth-child(3) { width: 9%; }
.backup-files-table th:nth-child(4) { width: 17%; }
.backup-files-table th:nth-child(5) { width: 12%; }
.backup-files-table th:nth-child(6) { width: 13%; }
.backup-files-table th:nth-child(7) { width: 124px; }

.notification-jobs-table th:nth-child(1) { width: 9%; }
.notification-jobs-table th:nth-child(2) { width: 19%; }
.notification-jobs-table th:nth-child(3) { width: 17%; }
.notification-jobs-table th:nth-child(4) { width: 13%; }
.notification-jobs-table th:nth-child(5) { width: 8%; }
.notification-jobs-table th:nth-child(6) { width: 16%; }
.notification-jobs-table th:nth-child(7) { width: 12%; }
.notification-jobs-table th:nth-child(8) { width: 74px; }

.ops-event strong {
  display: block;
  overflow: hidden;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-target,
.job-error {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-badge,
.channel-result {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.job-badge.sent,
.channel-result.sent { color: #08783f; background: #dcfce7; }
.job-badge.failed,
.job-badge.partial,
.channel-result.failed { color: #b42318; background: #fee2e2; }
.job-badge.processing,
.job-badge.retrying { color: #075985; background: #e0f2fe; }
.job-badge.pending,
.channel-result.pending { color: #92400e; background: #fef3c7; }
.job-badge.skipped,
.job-badge.cancelled { color: #475569; background: #e2e8f0; }

.channel-results {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ops-actions .row-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 4px;
}

.ops-actions .icon-btn {
  width: 30px;
  height: 30px;
  min-height: 30px;
}

.ops-empty {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--text-soft);
  text-align: center;
}

.ops-empty svg {
  width: 26px;
  height: 26px;
  color: var(--primary);
}

.server-invoice-preview {
  min-height: 70vh;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eef2f7;
}

.server-invoice-preview iframe {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
  background: #fff;
}

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

  .notification-jobs-table {
    min-width: 1020px;
  }

  .backup-files-table {
    min-width: 940px;
  }
}

@media (max-width: 760px) {
  .operations-center {
    gap: 14px;
  }

  .operations-control-card,
  .ops-table-card {
    padding: 15px;
  }

  .operations-control-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .operations-toolbar,
  .ops-filter,
  .operations-toolbar .btn {
    width: 100%;
  }

  .operations-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .operations-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .backup-safety-note {
    align-items: flex-start;
  }

  .ops-table-card .table-wrap {
    overflow: visible;
    border: 0;
  }

  .ops-table,
  .ops-table tbody,
  .ops-table tr,
  .ops-table td {
    display: block;
    width: 100% !important;
    min-width: 0;
  }

  .ops-table {
    min-width: 0 !important;
  }

  .ops-table thead {
    display: none;
  }

  .ops-table tr {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #ffffff;
  }

  .ops-table td {
    min-height: 38px;
    padding: 8px 0;
    border: 0;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .ops-table td::before {
    content: attr(data-label);
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 850;
  }

  .ops-target,
  .job-error,
  .ops-event strong,
  .ops-file-name {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ops-table time strong,
  .ops-table time small {
    white-space: normal;
  }

  .ops-actions .row-actions {
    justify-content: flex-start;
  }

  .server-invoice-preview,
  .server-invoice-preview iframe {
    min-height: 62vh;
    height: 62vh;
  }
}

@media (max-width: 480px) {
  .operations-metric-grid {
    grid-template-columns: 1fr;
  }

  .operations-heading-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .ops-table td {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}
/* 中文注释：打印导出 PDF 时只显示格式化报表和订单详情。 */
@media print {
  @page {
    size: Letter;
    margin: 0.28in;
  }

  body {
    background: #fff;
  }

  #app {
    display: none;
  }

  #print-area {
    display: block;
    color: #111;
    padding: 0;
    font-family: Arial, sans-serif;
  }

  #print-area .invoice-document {
    width: 100%;
    height: 10.4in;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
    font-size: 10px;
  }

  #print-area .invoice-header {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 28px;
    padding-bottom: 14px;
  }

  #print-area .invoice-brand h1 {
    margin: 5px 0 3px;
    font-size: 21px;
  }

  #print-area .invoice-title h2 {
    margin-bottom: 8px;
    font-size: 30px;
  }

  #print-area .invoice-title p,
  #print-area .invoice-brand p,
  #print-area .invoice-bill p {
    margin: 2px 0;
    font-size: 9px;
  }

  #print-area .invoice-bill {
    margin: 14px 0;
    padding: 0 8px;
  }

  #print-area .invoice-bill h3 {
    margin: 4px 0;
    font-size: 15px;
  }

  #print-area .invoice-items th {
    padding: 7px 8px;
    font-size: 9px;
  }

  #print-area .invoice-items td {
    padding: 8px;
    font-size: 8.5px;
    line-height: 1.28;
  }

  #print-area .invoice-summary {
    margin-top: 14px;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 24px;
  }

  #print-area .invoice-summary > div p,
  #print-area .invoice-summary td {
    font-size: 8.5px;
    line-height: 1.25;
  }

  #print-area .invoice-summary td {
    padding: 5px 0 5px 10px;
  }

  #print-area .invoice-summary .invoice-total td {
    font-size: 13px;
  }

  #print-area .invoice-document footer {
    margin-top: 18px;
    padding-top: 8px;
    font-size: 9px;
  }

  .print-doc h1 {
    margin: 0 0 18px;
  }

  .print-card {
    page-break-inside: avoid;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
  }

  .print-table th,
  .print-table td {
    padding: 9px;
    border: 1px solid #ddd;
    color: #111;
  }
}
/* 中文注释：响应式断点覆盖桌面、平板和手机，核心目标是不横向溢出。 */
@media (max-width: 1400px) {
  .metric-strip,
  .overview-strip {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 1200px) {
  .span-7,
  .span-8,
  .span-5,
  .span-4 {
    grid-column: span 12;
  }

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

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

  .finance-reminders .reminder-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.sidebar-collapsed .brand-block div:not(.logo-mark),
  .app-shell.sidebar-collapsed .nav button b,
  .app-shell.sidebar-collapsed .sidebar-status,
  .app-shell.sidebar-collapsed .sidebar-collapse span {
    display: block;
  }

  .app-shell.sidebar-collapsed .nav button,
  .app-shell.sidebar-collapsed .sidebar-collapse {
    justify-content: flex-start;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 11;
    display: none;
    background: rgba(15, 23, 42, 0.30);
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .icon-btn.mobile-menu {
    display: inline-grid;
  }

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

  .toolbar,
  .search-box {
    width: 100%;
  }

  .search-box {
    min-width: 0;
  }

  .metric-strip,
  .overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .main {
    padding: 18px 20px 26px;
  }

  .topbar {
    min-height: 68px;
    margin: -18px -20px 18px;
    padding: 12px 20px;
    align-items: center;
    flex-direction: row;
  }

  .topbar-title {
    min-width: 210px;
    flex: 1;
  }

  .topbar p {
    display: none;
  }

  .toolbar {
    width: auto;
    flex: 0 1 auto;
  }

  .search-box {
    width: min(300px, 31vw);
    min-width: 210px;
  }

  .user-pill b {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .metric-strip,
  .overview-strip,
  .workspace-metric-grid,
  .report-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .settings-tabs { margin: 0 -2px; border-radius: 12px; }
  .settings-tabs button { padding: 9px 12px; }
  .client-payout-fields,
  .client-type-settings,
  .dashboard-period-settings,
  .client-payout-details { grid-template-columns: 1fr; }
  .client-payout-fields .span-2 { grid-column: auto; }
  .client-payout-section { padding: 14px; }
  .login-shell {
    min-height: 100svh;
    padding: 70px 14px 18px;
  }

  .login-bg-refresh {
    top: 16px;
    right: 16px;
  }

  .login-card {
    width: min(100%, 420px);
  }

  .login-row-field {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 8px;
  }

  .login-row-field span {
    font-size: 12px;
  }

  .quick-grid,
  .form-grid,
  .filter-grid,
  .permission-grid,
  .metric-strip,
  .overview-strip {
    grid-template-columns: 1fr;
  }

  .finance-reminders .reminder-list {
    grid-template-columns: 1fr;
  }

  .main {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 16px;
  }

  .topbar {
    margin: -16px -16px 16px;
    padding: 14px 16px;
  }

  .topbar-title {
    width: 100%;
  }

  .topbar-title > div {
    min-width: 0;
  }

  .topbar p {
    line-height: 1.45;
  }

  .toolbar {
    max-width: 100%;
  }

  .page-grid {
    gap: 14px;
  }

  .page-grid > .span-2,
  .page-grid > .span-3,
  .page-grid > .span-4,
  .page-grid > .span-5,
  .page-grid > .span-6,
  .page-grid > .span-7,
  .page-grid > .span-8,
  .page-grid > .span-12 {
    grid-column: span 12;
  }

  .form-grid > .span-2 {
    grid-column: 1 / -1;
  }

  .card {
    padding: 15px;
  }

  .card,
  .table-shell,
  .chart-wrap,
  .settings-panel,
  .settings-card,
  .setting-section {
    max-width: 100%;
    min-width: 0;
  }

  .settings-panel-head {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .settings-anchor {
    position: static;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .settings-anchor button {
    flex: 0 0 auto;
  }

  .connection-list > div,
  .log-filter-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .card-header,
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .card-actions,
  .form-actions,
  .pagination > div {
    justify-content: flex-start;
  }

  .card-actions .btn,
  .form-actions .btn,
  .pagination .btn,
  .card-actions .file-btn {
    width: 100%;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    overflow: visible;
  }

  .data-table thead {
    display: none;
  }

  .data-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 0 !important;
  }

  .data-table tr {
    width: 100%;
    margin: 10px 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    overflow: hidden;
  }

  .data-table td {
    width: 100% !important;
    min-height: 46px;
    display: grid;
    grid-template-columns: minmax(104px, 36%) minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--border);
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 850;
  }

  .data-table td:last-child {
    border-bottom: 0;
  }

  .row-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel,
  .confirm-panel {
    width: min(100%, 560px);
    max-height: calc(100svh - 24px);
    overflow-y: auto;
  }

  .detail-grid,
  .client-detail-layout {
    grid-template-columns: 1fr;
  }

  .order-workflow-card {
    padding: 14px;
  }

  .order-workflow-card > header {
    margin-bottom: 14px;
  }

  .order-workflow-steps {
    grid-template-columns: 1fr;
  }

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

  .order-workflow-actions .btn {
    width: 100%;
  }

  .reconciliation-detail > div,
  .reconciliation-order-summary {
    grid-template-columns: 1fr;
  }

  .client-detail-panel {
    padding: 16px;
  }

  .client-detail-panel .modal-head h2 {
    font-size: 21px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .client-detail-panel .modal-head p {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .invoice-preview {
    padding: 0;
    background: #ffffff;
  }

  .invoice-document {
    min-height: 0;
    padding: 22px 16px;
    box-shadow: none;
  }

  .invoice-header,
  .invoice-summary {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .invoice-title {
    text-align: left;
  }

  .invoice-title h2 {
    font-size: 30px;
  }

  .invoice-items {
    min-width: 560px;
  }

  .invoice-document footer {
    margin-top: 42px;
  }

  .payment-information dl {
    grid-template-columns: 1fr;
  }

  .payment-information dl > div.wide {
    grid-column: auto;
  }

  .customer-order-flow {
    margin-bottom: 9px;
    padding: 9px 8px;
  }

  .customer-order-flow li {
    gap: 5px;
    font-size: 10px;
    text-align: center;
  }

  .customer-order-flow b {
    width: 21px;
    height: 21px;
    font-size: 10px;
  }

  .attachment-pdf-preview {
    height: 420px;
  }

  .toast-stack {
    right: 14px;
    left: 14px;
    bottom: 14px;
  }

  .toast {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .login-card {
    padding: 18px;
    border-radius: 16px;
  }

  .login-card-head {
    padding-right: 44px;
  }

  .login-row-field {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 7px;
  }

  .login-bg-refresh span {
    display: none;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .user-pill,
  .btn,
  .toolbar .btn,
  .toolbar .icon-btn {
    width: 100%;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .data-table td {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .settings-panel {
    padding: 14px;
    border-radius: 14px;
  }

  .settings-panel-head {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .settings-panel-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .data-table td::before {
    font-size: 12px;
  }

  .invoice-picker-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .invoice-picker-item > b {
    grid-column: 1;
  }

  .invoice-picker-item .row-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .payout-address {
    grid-template-columns: 1fr;
  }

  .order-information .order-date-field,
  .order-information .order-client-field,
  .order-information .order-status-field {
    grid-column: 1 / -1;
  }

  .modal:not(.confirm-modal):not(.order-modal-panel-host) {
    padding: 0;
    align-items: stretch;
  }

  .modal:not(.confirm-modal) .modal-panel:not(.order-modal-panel) {
    width: 100%;
    height: 100svh;
    max-height: 100svh;
    padding: 14px;
    border: 0;
    border-radius: 0;
  }

  .modal:not(.confirm-modal) .modal-panel:not(.order-modal-panel) > .modal-head {
    position: sticky;
    top: -14px;
    z-index: 6;
    min-height: 62px;
    margin: -14px -14px 14px;
    padding: 12px 14px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
  }

  .modal:not(.confirm-modal) .modal-panel:not(.order-modal-panel) > .modal-head h2 {
    font-size: 20px;
  }

  .modal-panel:not(.order-modal-panel) > form > .form-actions:last-child,
  .modal-panel:not(.order-modal-panel) > .form-actions:last-child {
    position: sticky;
    bottom: -14px;
    z-index: 5;
    margin: 14px -14px -14px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.07);
  }
}

/* 中文注释：手机端使用折叠式工作台，避免将桌面模块机械地纵向堆叠。 */
@media (max-width: 768px) {
  .main {
    padding: 10px 12px 18px;
  }

  .topbar {
    min-height: 0;
    margin: -10px -12px 12px;
    padding: 10px 12px;
    display: block;
  }

  .topbar-title {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .topbar-title-copy {
    min-width: 0;
  }

  .topbar h1 {
    overflow: hidden;
    font-size: 21px;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .topbar p {
    margin-top: 3px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .icon-btn.mobile-menu,
  .mobile-tools-toggle {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .mobile-tools-toggle {
    display: inline-grid;
  }

  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-account-menu {
    position: relative;
    display: block;
  }

  .mobile-account-menu > summary {
    width: 40px;
    min-width: 40px;
    height: 40px;
    list-style: none;
    cursor: pointer;
  }

  .mobile-account-menu > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-account-menu[open] > summary {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
  }

  .mobile-account-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: min(230px, calc(100vw - 24px));
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: grid;
    gap: 4px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
  }

  .mobile-account-popover strong {
    padding: 9px 10px;
    overflow: hidden;
    color: var(--text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-account-popover button {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    color: var(--text-soft);
    background: transparent;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
  }

  .mobile-account-popover button:hover {
    color: var(--text);
    background: #f8fafc;
  }

  .mobile-account-popover button.danger {
    color: var(--danger);
  }

  .toolbar {
    width: 100%;
    max-width: none;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: none;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-xs);
  }

  .toolbar.mobile-open {
    display: grid;
  }

  .search-box {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    border-radius: 10px;
  }

  .toolbar-account-row {
    display: none;
  }

  .toolbar-account-row .user-pill {
    width: auto;
    min-width: 0;
    min-height: 40px;
    overflow: hidden;
    border-radius: 10px;
  }

  .toolbar-account-row .user-pill b {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolbar-account-row .icon-btn {
    width: 42px;
    min-width: 42px;
    height: 40px;
    min-height: 40px;
  }

  .toolbar-account-row .btn {
    width: auto;
    min-height: 40px;
    padding: 0 14px;
  }

  .page-grid,
  .reports-page,
  .dashboard-page,
  .finance-page,
  .operations-center {
    gap: 10px;
  }

  .mobile-collapsible {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1 !important;
    padding: 0 !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    display: block !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.045) !important;
  }

  .mobile-order-card {
    overflow: visible;
  }

  .mobile-section-toggle {
    width: 100%;
    min-height: 58px;
    padding: 11px 13px;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    background: #ffffff;
    text-align: left;
  }

  .mobile-section-toggle:hover,
  .mobile-section-toggle:active {
    background: #f8fafc;
  }

  .mobile-section-copy {
    min-width: 0;
  }

  .mobile-section-copy strong,
  .mobile-section-copy small {
    display: block;
  }

  .mobile-section-copy strong {
    overflow: hidden;
    font-size: 15px;
    line-height: 1.3;
    font-weight: 850;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .mobile-section-copy small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 11px;
    line-height: 1.35;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .mobile-section-control {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
  }

  .mobile-section-control b {
    min-width: 24px;
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 11px;
  }

  .mobile-section-control .os-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.18s ease;
  }

  .mobile-collapsible:not(.is-mobile-collapsed) > .mobile-section-toggle {
    border-bottom: 1px solid var(--border);
  }

  .mobile-collapsible:not(.is-mobile-collapsed) > .mobile-section-toggle .os-icon {
    transform: rotate(180deg);
  }

  .mobile-section-body {
    min-width: 0;
    padding: 12px;
    display: block;
  }

  .mobile-collapsible.is-mobile-collapsed > .mobile-section-body {
    display: none !important;
  }

  .metric-strip > .mobile-section-body,
  .workspace-metric-grid > .mobile-section-body,
  .report-metric-grid > .mobile-section-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
  }

  .mobile-metric-body .stat-card,
  .mobile-metric-body .workspace-stat-card,
  .mobile-metric-body .report-stat-card {
    min-width: 0;
    min-height: 96px;
    padding: 10px;
    border-radius: 11px;
    box-shadow: none;
  }

  .mobile-metric-body .stat-card {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }

  .mobile-metric-body .stat-icon,
  .mobile-metric-body .workspace-stat-icon,
  .mobile-metric-body .report-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .mobile-metric-body .stat-card strong,
  .mobile-metric-body .workspace-stat-card > strong,
  .mobile-metric-body .report-stat-card > strong {
    margin-top: 7px;
    overflow: visible;
    font-size: 18px;
    line-height: 1.12;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .mobile-metric-body .stat-card small,
  .mobile-metric-body .workspace-stat-card > small,
  .mobile-metric-body .report-stat-card > small {
    margin-top: 5px;
    overflow: hidden;
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .mobile-original-header {
    width: 100%;
    margin: 0 0 10px !important;
    align-items: stretch !important;
    justify-content: flex-end !important;
  }

  .mobile-original-header.mobile-header-empty {
    display: none !important;
  }

  .mobile-original-header > :first-child:not(.card-actions),
  .mobile-original-header > .report-heading,
  .mobile-original-header > .workspace-heading,
  .mobile-original-header > .operations-heading,
  .mobile-original-header > .settings-panel-icon,
  .mobile-original-header > .settings-panel-icon + div {
    display: none !important;
  }

  .mobile-original-header .card-actions,
  .mobile-original-header .report-export-actions,
  .mobile-original-header .workspace-actions,
  .mobile-original-header .operations-toolbar,
  .mobile-original-header .settings-panel-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-original-header .btn,
  .mobile-original-header .file-btn {
    width: 100%;
    min-height: 40px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .filter-grid,
  .report-filter-grid,
  .finance-filter-grid {
    gap: 10px;
    padding: 11px;
    grid-template-columns: 1fr;
  }

  .field input,
  .field select,
  .field textarea,
  .ops-filter select {
    min-height: 42px;
  }

  .settings-anchor > .mobile-section-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .settings-anchor button:not(.mobile-section-toggle) {
    width: 100%;
    min-height: 38px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 11px;
    white-space: normal;
  }

  .settings-form > .settings-save {
    display: none;
  }

  .settings-form:has(.mobile-collapsible:not(.is-mobile-collapsed)) > .settings-save {
    display: flex;
  }

  .chart-wrap,
  .report-chart-card .chart-wrap,
  .report-chart-card .chart-scroll,
  .report-chart-card .svg-chart {
    min-height: 220px;
    height: 220px;
  }

  .data-table tr,
  .ops-table tr {
    margin: 0 0 8px;
    border-radius: 10px;
  }

  .data-table td,
  .ops-table td {
    min-height: 40px;
    padding-block: 7px;
  }

  .pagination {
    gap: 9px;
  }

  .orders-list-card .mobile-original-header .card-actions {
    display: block;
  }

  .orders-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 8px;
  }

  .orders-actions-primary,
  .orders-actions-secondary {
    width: 100%;
    display: grid;
    justify-content: stretch;
    gap: 8px;
  }

  .orders-actions-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .orders-actions .btn {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    padding: 0 9px;
    overflow: hidden;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .orders-actions .btn .os-icon {
    width: 16px;
    height: 16px;
  }

  .table-shell-orders .table-wrap {
    display: none;
  }

  .table-shell-clients .table-wrap,
  .table-shell-users .table-wrap,
  .table-shell-logs .table-wrap {
    display: none;
  }

  .mobile-data-list-orders,
  .mobile-data-list-clients,
  .mobile-data-list-users,
  .mobile-data-list-logs {
    display: grid;
    gap: 9px;
  }

  .mobile-client-card > header {
    padding: 12px;
  }

  .mobile-client-card > header .identity {
    width: 100%;
  }

  .mobile-record-card > footer .row-actions {
    width: auto;
    flex: 0 0 auto;
    display: grid;
    gap: 6px;
  }

  .mobile-client-card > footer .row-actions {
    grid-template-columns: repeat(3, 38px);
  }

  .mobile-user-card > footer .row-actions {
    width: 100%;
    grid-template-columns: repeat(4, minmax(38px, 1fr));
  }

  .mobile-record-card > footer .icon-btn {
    width: 100%;
    min-width: 38px;
    height: 38px;
  }

  .notification-page .mobile-original-header .operations-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.72fr);
    align-items: end;
  }

  .notification-page .ops-filter {
    min-width: 0;
  }

  .notification-page .ops-filter select {
    width: 100%;
    min-width: 0;
  }

  .table-shell-orders .pagination,
  .table-shell-clients .pagination,
  .table-shell-users .pagination,
  .table-shell-logs .pagination {
    margin-top: 2px;
    padding-top: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    border-top: 1px solid var(--border);
  }

  .table-shell-orders .pagination > label,
  .table-shell-clients .pagination > label,
  .table-shell-users .pagination > label,
  .table-shell-logs .pagination > label {
    justify-self: end;
  }

  .table-shell-orders .pagination > div,
  .table-shell-clients .pagination > div,
  .table-shell-users .pagination > div,
  .table-shell-logs .pagination > div {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
  }

  .table-shell-orders .pagination .btn,
  .table-shell-clients .pagination .btn,
  .table-shell-users .pagination .btn,
  .table-shell-logs .pagination .btn {
    width: 100%;
    min-height: 36px;
  }

  .pagination.single-page {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .pagination-current {
    align-self: center;
  }

  .order-modal-panel-host {
    padding: 0;
    align-items: stretch;
  }

  .order-modal-panel {
    width: 100%;
    height: 100svh;
    max-height: 100svh;
    padding: 0;
    border: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .order-modal-panel > .modal-head {
    min-height: 66px;
    margin: 0;
    padding: 12px 14px;
    flex: 0 0 auto;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.98);
    z-index: 4;
  }

  .order-modal-panel > .modal-head h2 {
    margin: 0;
    font-size: 19px;
  }

  .order-modal-panel > .modal-head p {
    margin: 3px 0 0;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .order-modal-panel .modal-close {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .order-form {
    min-height: 0;
    padding: 10px 10px 0;
    display: block;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .order-form-section {
    margin-bottom: 9px;
    border-radius: 12px;
  }

  .order-form-section > summary {
    min-height: 58px;
    padding: 9px 10px;
    grid-template-columns: 34px minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  .order-form-section-icon {
    width: 34px;
    height: 34px;
  }

  .order-form-section-copy strong {
    font-size: 13px;
  }

  .order-form-section-copy small {
    font-size: 9.5px;
  }

  .order-form-section-body {
    padding: 11px;
  }

  .order-form-section-body .form-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-form-section-body .field.span-2,
  .order-form-section-body .saved-files.span-2 {
    grid-column: 1 / -1;
  }

  .order-form-section-body .field span {
    font-size: 11px;
  }

  .order-form-section-body .field input,
  .order-form-section-body .field select,
  .order-form-section-body .field textarea {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .order-form-section-body .invoice-description-field textarea {
    min-height: 190px;
  }

  .order-form-section-body .order-note-field textarea {
    min-height: 82px;
  }

  .order-upload-field {
    padding: 10px;
  }

  .order-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 0 -10px;
    padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: minmax(96px, 0.7fr) minmax(0, 1.3fr);
    gap: 8px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.07);
  }

  .order-form-actions .btn {
    width: 100%;
    min-height: 42px;
  }

  .detail-list-section,
  .client-recent-orders {
    padding: 12px;
  }

  .modal-panel .pagination {
    gap: 8px;
  }

  .modal-panel .pagination > label,
  .modal-panel .pagination > div {
    width: 100%;
  }

  .modal-panel .pagination > div .btn {
    flex: 1;
  }
}

@media (max-width: 360px) {
  .main {
    padding-inline: 9px;
  }

  .topbar {
    margin-inline: -9px;
    padding-inline: 9px;
  }

  .topbar-title {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .mobile-header-actions {
    gap: 4px;
  }

  .mobile-account-menu > summary,
  .mobile-tools-toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .toolbar-account-row {
    display: none;
  }

  .mobile-section-body {
    padding: 9px;
  }

  .mobile-metric-body .stat-card strong,
  .mobile-metric-body .workspace-stat-card > strong,
  .mobile-metric-body .report-stat-card > strong {
    font-size: 16px;
  }

  .mobile-order-card-head {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .mobile-order-card-head > .badge {
    grid-column: 2;
    justify-self: start;
  }

  .mobile-order-amounts strong {
    font-size: 13px;
  }

  .mobile-order-card-foot > span {
    display: none;
  }

  .mobile-order-card-foot {
    justify-content: flex-end;
  }

  .client-contact-list,
  .client-report-grid {
    grid-template-columns: 1fr;
  }

  .client-contact-list > div.wide {
    grid-column: auto;
  }

  .notification-page .mobile-original-header .operations-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .brand-assets-grid {
    grid-template-columns: 1fr;
  }

  .media-upload {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 12px;
  }

  .media-upload-preview {
    width: 72px;
    height: 64px;
  }

  .media-upload.media-upload-icon .media-upload-preview,
  .media-upload.media-upload-avatar .media-upload-preview {
    width: 64px;
    height: 64px;
  }

  .client-avatar-upload {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}
/* 中文注释：Joesan-DNN 样式入口，具体样式拆分在 assets/css/ 目录。 */

/* 中文注释：登录页最终覆盖层，放在所有通用样式之后，确保紧凑布局不会被组件样式覆盖。 */
.login-shell .login-card {
  padding: 20px;
}

.login-shell .login-card-head {
  gap: 9px;
  margin-bottom: 14px;
}

.login-shell .login-card .logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 15px;
}

.login-shell .login-card h2 {
  font-size: 23px;
  line-height: 1.18;
}

.login-shell .login-card p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.42;
}

.login-shell .login-card .form-stack {
  gap: 10px;
}

.login-shell .login-row-field {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 9px;
}

.login-shell .login-row-field span {
  font-size: 12px;
}

.login-shell .login-row-field input {
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 14px;
}

.login-shell .login-lang-toggle {
  min-width: 44px;
  min-height: 30px;
  border-radius: 9px;
  font-size: 12px;
}

.login-shell .captcha-row {
  grid-template-columns: 1fr 38px;
  gap: 7px;
}

.login-shell .captcha-row strong {
  min-height: 38px;
  border-radius: 9px;
  font-size: 16px;
}

.login-shell .captcha-row .icon-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
}

.login-shell .login-card .btn.wide {
  min-height: 41px;
  border-radius: 10px;
}
