html, body { height: 100%; margin: 0; overflow: hidden; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 10px; }

.top-page-tab {
  position: relative; display: flex; align-items: center; gap: 8px; height: 34px; box-sizing: border-box;
  padding: 0 20px; border-radius: 16px 16px 0 0; cursor: pointer; min-width: max-content;
  font-size: 14px; line-height: 34px; flex-shrink: 0;
}
.top-page-tab > a, .top-page-tab > span {
  display: flex; align-items: center; height: 34px; line-height: 34px;
  color: inherit; text-decoration: none; white-space: nowrap;
}
.top-page-tabs { display: flex; align-items: flex-end; gap: 4px; height: 34px; min-width: 0; overflow: hidden; }
.tab-active-curve::before {
  content: ""; position: absolute; bottom: 0; left: -16px; width: 16px; height: 16px;
  background: radial-gradient(circle at 0% 0%, transparent 16px, #eef4ff 16px); pointer-events: none;
}
.tab-active-curve::after {
  content: ""; position: absolute; bottom: 0; right: -16px; width: 16px; height: 16px;
  background: radial-gradient(circle at 100% 0%, transparent 16px, #eef4ff 16px); pointer-events: none;
}

.menu-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 10px 16px; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: #4b5563; transition: background .15s, color .15s;
}
.menu-item-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
/* 二级：图标与一级文字左对齐（16 + 16 + 8 = 40） */
.menu-item.menu-depth-1 { padding-left: 40px; }
/* 三级及以上：纯文字，与二级文字左对齐（40 + 16 + 8 = 64） */
.menu-item.menu-depth-2,
.menu-item.menu-depth-3,
.menu-item.menu-depth-4 { padding-left: 64px; }
.menu-spacer { width: 16px; height: 16px; flex-shrink: 0; }
.menu-item:hover { background: #f9fafb; }
.menu-item.parent-expanded { color: #1890ff; }
.menu-item.active { background: #eef4ff; color: #1890ff; font-weight: 500; }
.menu-item .menu-icon { color: #9ca3af; flex-shrink: 0; }
.menu-item.parent-expanded .menu-icon, .menu-item.active .menu-icon { color: #1890ff; }
.menu-children { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.menu-branch.is-collapsed > .menu-children { display: none; }
.menu-branch > .menu-item { cursor: pointer; user-select: none; }
.menu-toggle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: transparent; padding: 6px; cursor: pointer;
  flex-shrink: 0; color: inherit; min-width: 28px; min-height: 28px;
  border-radius: 4px; transition: background .12s;
}
.menu-toggle-btn:hover { background: rgba(24, 144, 255, 0.08); }
.menu-toggle-btn svg { transition: transform .15s ease; }
.menu-branch.is-expanded > .menu-item .menu-toggle-btn svg { transform: rotate(180deg); }
a.menu-item-left { text-decoration: none; color: inherit; width: 100%; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; color: #6b7280; transition: color .15s; border: none; background: transparent; cursor: pointer; }
.icon-btn:hover { color: #374151; }

.chip {
  padding: 6px 12px; font-size: 12px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 4px;
  border: none; outline: none; box-shadow: none; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.chip:focus, .chip:focus-visible, .chip:active { outline: none; box-shadow: none; border: none; }
.chip-inactive { background: #f7f7fa; color: #666; }
.chip-active { background: #eef4ff; color: #1890ff; font-weight: 500; }

.filter-chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; font-size: 12px; border-radius: 6px; border: none;
  background: #f7f7fa; color: #666; cursor: pointer; transition: background .15s, color .15s;
  white-space: nowrap;
}
.filter-chip:hover { color: #1890FF; }
.filter-chip-active { background: #eef4ff; color: #1890FF; font-weight: 500; }
.filter-chip-count { font-variant-numeric: tabular-nums; color: #999; }
.filter-chip-count.is-active { color: rgba(24, 144, 255, 0.8); }

.toolbar-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px; border: none; border-radius: 6px; background: #f7f7fa;
  color: #999; cursor: pointer; transition: background .15s, color .15s;
}
.toolbar-icon-btn:hover { background: #ebebeb; color: #666; }

/* ── 主控台仪表盘（network-yongpeng Dashboard） ── */
.dash-seg-btn {
  padding: 6px 12px; font-size: 12px; border-radius: 6px; border: none; background: transparent;
  color: #8c8c8c; cursor: pointer; transition: background .15s, color .15s;
}
.dash-seg-btn:hover { color: #1a1a1a; }
.dash-seg-btn.is-active { background: #fff; color: #1a1a1a; }
.dash-pill {
  display: inline-block; padding: 2px 8px; font-size: 12px; border-radius: 4px; border: 1px solid;
  white-space: nowrap;
}
.dash-tag-warn { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); background: #fff; }
.dash-tag-blue { color: #1890FF; border-color: rgba(24, 144, 255, 0.3); background: #fff; }
.dash-tag-gray { color: #999; border-color: rgba(153, 153, 153, 0.3); background: #fff; }
.dash-tag-red { color: #f43f5e; border-color: rgba(244, 63, 94, 0.3); background: #fff; }
.dash-status-green { color: #10b981; border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.05); }
.dash-status-blue { color: #1890FF; border-color: rgba(24, 144, 255, 0.3); background: rgba(24, 144, 255, 0.05); }
.dash-status-red { color: #f43f5e; border-color: rgba(244, 63, 94, 0.3); background: rgba(244, 63, 94, 0.05); }
.dash-status-pink { color: #e853b0; border-color: rgba(232, 83, 176, 0.3); background: rgba(232, 83, 176, 0.05); }
.dash-status-warn { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); background: rgba(245, 158, 11, 0.05); }
.dash-rank-1 { background: #fff7e6; color: #fa8c16; }
.dash-rank-2 { background: #f5f5f5; color: #8c8c8c; }
.dash-rank-3 { background: #fff1f0; color: #ff4d4f; }
.dash-rank-n { background: transparent; color: #8c8c8c; }
.dash-staff-bar {
  background: linear-gradient(90deg, #1890ff 0%, rgba(24, 144, 255, 0.6) 100%);
  border-radius: 6px;
}

.brand-tab {
  display: inline-flex; align-items: center; padding: 10px 20px;
  font-size: 13px; line-height: 1; border-radius: 8px 8px 0 0;
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
  background: #F2F3F5; color: #1a1a1a; border: 1px solid transparent;
  white-space: nowrap;
}
.brand-tab:hover { background: #e8e9eb; color: #1a1a1a; }
.brand-tab-active {
  background: #fff; color: #1890FF; font-weight: 500;
  border-color: #f0f0f0; border-bottom-color: #fff;
  margin-bottom: -1px; position: relative; z-index: 10;
}

.btn-toolbar {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  font-size: 13px; border-radius: 6px; cursor: pointer; transition: all .15s; white-space: nowrap;
  border: 1px solid #d9d9d9; background: #fff; color: #333;
}
.btn-toolbar:hover { border-color: #1890ff; color: #1890ff; }
.btn-toolbar-primary { background: #1890ff; color: #fff; border-color: #1890ff; }
.btn-toolbar-primary:hover { background: #40a9ff; border-color: #40a9ff; color: #fff; }
.btn-toolbar-danger { color: #cf1322; border-color: #ffa39e; }
.btn-toolbar-danger:hover { background: #fff1f0; }

.page-toolbar { flex-wrap: nowrap; }
.page-toolbar-left {
  display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; flex-wrap: nowrap; overflow: hidden;
}
.toolbar-date-range {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 0 10px; height: 32px; background: #f7f7fa; border-radius: 6px; font-size: 12px; color: #666;
}
.toolbar-date-range-label { white-space: nowrap; color: #666; }
.toolbar-date-input {
  width: 118px; height: 26px; padding: 0 8px; border: 1px solid #e8e8e8; border-radius: 4px;
  font-size: 12px; color: #333; background: #fff; outline: none;
}
.toolbar-date-input:focus { border-color: #91caff; }
.toolbar-date-sep { color: #999; }

.page-hint-bar {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 12px; padding: 10px 16px; flex-shrink: 0;
  background: #f0f5ff; border: 1px solid #d6e4ff; border-radius: 8px;
  font-size: 12px; color: #0958d9; line-height: 1.625;
}
.page-hint-body { min-width: 0; }
.page-hint-title { margin-bottom: 6px; font-weight: 500; color: #003a8c; font-size: 12px; }
.page-hint-text { margin: 0; }

.expense-grid-wrap { border-radius: 4px; background: #fff; overflow: hidden; }
.expense-grid-table {
  width: 100%; border-collapse: collapse; border-spacing: 0;
  font-size: 12px; text-align: center; table-layout: auto;
  border-top: 1px solid #e8e8e8; border-left: 1px solid #e8e8e8;
}
.expense-grid-table th, .expense-grid-table td {
  border-right: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
  padding: 10px 8px; color: #333; vertical-align: middle; line-height: 1.4; white-space: nowrap;
}
.expense-grid-table thead th {
  background: #f5f5f5; color: #333; font-weight: 500; position: sticky; top: 0; z-index: 2;
}
.expense-grid-table tbody tr.row-detail { background: #fff; cursor: pointer; }
.expense-grid-table tbody tr.row-detail:nth-child(even) { background: #fafafa; }
.expense-grid-table tbody tr.row-detail:hover { background: #e6f4ff !important; }
.expense-grid-table tbody tr.row-selected { background: #eef4ff !important; }
.expense-grid-table tbody tr.row-summary { background: #fafafa; font-weight: 600; }
.expense-grid-table tbody tr.row-summary td { background: #fafafa; }
.expense-grid-table .col-num { text-align: center; font-variant-numeric: tabular-nums; }
.expense-grid-table .cell-muted { color: #666; }
.expense-grid-table .cell-income { color: #389e0d; }
.expense-grid-table .cell-expense { color: #cf1322; }
.expense-grid-table .cell-link { color: #1890ff; }

.tag {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px;
  border: 1px solid; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.tag-green { border-color: #b7eb8f; background: #f6ffed; color: #389e0d; }
.tag-orange { border-color: #ffd591; background: #fff7e6; color: #d46b08; }
.tag-gray { border-color: #d9d9d9; background: #fafafa; color: #8c8c8c; }
.tag-blue { border-color: #91caff; background: #e6f4ff; color: #0958d9; }
.tag-cyan { border-color: #87e8de; background: #e6fffb; color: #08979c; }
.tag-purple { border-color: #d3adf7; background: #f9f0ff; color: #722ed1; }
.tag-red { border-color: #ffa39e; background: #fff1f0; color: #cf1322; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-card {
  padding: 16px 18px; border-radius: 8px; background: #fff;
  border: 1px solid #f0f0f0;
}
.metric-card-label { font-size: 12px; color: #666; margin-bottom: 8px; }
.metric-card-value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-card-value.income { color: #389e0d; }
.metric-card-value.expense { color: #cf1322; }
.metric-card-value.primary { color: #1890ff; }
.metric-card-value.warning { color: #d46b08; }

.quick-links { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-link {
  padding: 8px 14px; font-size: 13px; border-radius: 6px;
  background: #f7f7fa; color: #1890ff; text-decoration: none; border: 1px solid #e8e8e8;
}
.quick-link:hover { background: #eef4ff; border-color: #91caff; }

/* 全屏遮罩：盖住侧栏 + 顶栏，点击空白区关闭（对齐 YONGPENG 管理弹窗） */
#page-drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; visibility: hidden; }
#page-drawer.open { pointer-events: auto; visibility: visible; }
#page-drawer .drawer-mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; cursor: pointer; }
#page-drawer.open .drawer-mask { opacity: 1; }
#page-drawer .drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(960px, 96vw);
  background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,.12);
}
#page-drawer .drawer-panel-wide { width: min(1200px, 96vw); }
#page-drawer .drawer-panel-maximized { width: 100vw !important; max-width: 100vw; }
#page-drawer.open .drawer-panel { transform: translateX(0); }

/* 配置新增 · 居中弹窗（对齐 1.0 收入明细审核表 · 新增收入） */
#page-drawer.is-center-modal.open {
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
#page-drawer.is-center-modal .config-form-backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .45);
  opacity: 0; transition: opacity .25s; cursor: pointer;
}
#page-drawer.is-center-modal.open .config-form-backdrop { opacity: 1; }
#page-drawer.is-center-modal .config-form-dialog {
  position: relative; z-index: 1; width: min(640px, 96vw); max-height: 90vh;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 48px rgba(0, 0, 0, .12);
  display: flex; flex-direction: column;
  transform: scale(.96); opacity: 0; transition: transform .22s ease, opacity .22s ease;
}
#page-drawer.is-center-modal.open .config-form-dialog { transform: scale(1); opacity: 1; }
.config-form-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
}
.config-form-title { font-size: 16px; font-weight: 600; color: #333; margin: 0; line-height: 1.4; }
.config-form-body {
  flex: 1; min-height: 0; overflow-y: auto; padding: 20px;
}
.config-form-tip {
  margin-bottom: 16px; padding: 8px 12px; border-radius: 6px; border: 1px solid #d6e4ff;
  background: #f0f5ff; font-size: 12px; color: #0958d9; line-height: 1.5;
}
.config-form-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 8px;
  padding: 12px 20px; border-top: 1px solid #f0f0f0; flex-shrink: 0;
  background: #fafafa; border-radius: 0 0 12px 12px;
}
.btn-modal {
  min-width: 72px; height: 32px; padding: 0 16px; font-size: 13px;
  border-radius: 6px; cursor: pointer; transition: all .15s;
}
.btn-modal-cancel { border: 1px solid #d9d9d9; background: #fff; color: #333; }
.btn-modal-cancel:hover { border-color: #1890ff; color: #1890ff; }
.btn-modal-primary { border: none; background: #1890ff; color: #fff; }
.btn-modal-primary:hover { background: #40a9ff; }
#page-drawer.is-center-modal .drawer-section-title { margin-top: 4px; }
#page-drawer.is-center-modal .drawer-section-title:first-child { margin-top: 0; }

.drawer-summary-section {
  flex-shrink: 0; background: #fff; padding: 16px 20px;
}
/* 摘要区在 drawer-body 内时，抵消 body 左右 padding，与下方 section 同宽 */
.drawer-body > .drawer-summary-section {
  margin-left: -20px;
  margin-right: -20px;
}
.drawer-summary-section .drawer-rule-hint { margin-top: 0; margin-bottom: 12px; }
.drawer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 8px; }
.drawer-stats-4 { grid-template-columns: repeat(4, 1fr); }
.drawer-stat {
  padding: 14px 16px; border-radius: 8px; background: #fafafa; border: 1px solid #f0f0f0;
}
.drawer-stat--paytype .drawer-stat-label { color: #0958d9; font-weight: 500; }
.drawer-stat-label { font-size: 12px; color: #666; margin-bottom: 6px; }
.drawer-stat-value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.drawer-stat-value.income { color: #389e0d; }
.drawer-stat-value.expense { color: #cf1322; }
.drawer-stat-value.balance { color: #1890ff; }
.drawer-stat-value.amount { color: #d46b08; }
.drawer-stat-value.negative { color: #cf1322; }
.drawer-stat-value.paytype { font-size: 16px; font-weight: 600; }
.drawer-stat-value .tag { font-size: 13px; font-weight: 500; vertical-align: middle; }
.drawer-stat-value:has(.tag) { font-size: 14px; font-weight: 400; line-height: 1.5; }

.expense-grid-table td .tag { vertical-align: middle; }
.expense-grid-table th.col-expense-item,
.expense-grid-table td.col-expense-item {
  min-width: 140px;
  white-space: normal;
  word-break: keep-all;
  line-height: 1.45;
}
.drawer-date-filter {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px;
  padding-top: 12px;
}
.drawer-date-label { font-size: 13px; color: #666; white-space: nowrap; }
.drawer-date-input {
  height: 32px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 6px;
  font-size: 13px; color: #333; background: #fff; min-width: 132px;
}
.drawer-date-input:focus { outline: none; border-color: #1890ff; box-shadow: 0 0 0 2px rgba(24,144,255,.1); }
.drawer-date-sep { font-size: 13px; color: #999; }
.btn-drawer-search {
  height: 32px; padding: 0 16px; font-size: 13px; background: #1890ff; color: #fff;
  border: none; border-radius: 6px; cursor: pointer; transition: background .15s;
}
.btn-drawer-search:hover { background: #40a9ff; }
.btn-drawer-link {
  height: 32px; padding: 0 8px; font-size: 13px; background: transparent; color: #1890ff;
  border: none; cursor: pointer;
}
.btn-drawer-link:hover { color: #40a9ff; }
.drawer-filter-hint {
  margin: 0 0 0 auto; font-size: 12px; color: #1890ff; line-height: 32px;
  white-space: nowrap; flex-shrink: 0;
}
.drawer-filter-error { margin: 8px 0 0; font-size: 12px; color: #ff4d4f; line-height: 1.4; }
.drawer-body:has(.drawer-nav-wrap) { padding-top: 14px; }
.drawer-nav-wrap {
  flex-shrink: 0;
  background: #fff;
  padding: 0 0 16px;
}
/* nav 在 drawer-body 外时，与 body 内容区（含 section-title）左对齐 */
.drawer-panel > .drawer-nav-wrap {
  padding-left: 20px;
  padding-right: 20px;
}
.drawer-nav {
  display: flex; align-items: stretch; gap: 6px; flex-shrink: 0;
  height: 35px; box-sizing: border-box;
  padding: 0; overflow-x: auto;
}
.drawer-nav-divider {
  height: 1px; background: #f0f0f0;
}
.drawer-tab {
  display: inline-flex; align-items: center; padding: 10px 20px;
  font-size: 13px; line-height: 1; border-radius: 8px 8px 0 0;
  border: 1px solid transparent;
  background: #F2F3F5; color: #1a1a1a;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.drawer-tab:hover { background: #e8e9eb; color: #1a1a1a; }
.drawer-tab.active {
  background: #fff; color: #1890FF; font-weight: 500;
  border-color: #f0f0f0; border-bottom-color: #fff;
  margin-bottom: -1px; position: relative; z-index: 10;
}
.drawer-section-title .section-count { font-size: 12px; font-weight: 400; color: #999; }
.drawer-form-value.is-tag { background: transparent; border-color: transparent; padding-left: 0; }
.drawer-table-wrap { border: 1px solid #f0f0f0; border-radius: 8px; overflow: hidden; background: #fff; }
.drawer-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; min-width: max-content; }
.drawer-table th, .drawer-table td {
  padding: 10px 8px; color: #333; vertical-align: middle; line-height: 1.4;
  border-bottom: 1px solid #f0f0f0; white-space: nowrap;
}
.drawer-table th { background: #fafafa; font-weight: 500; color: #666; position: sticky; top: 0; z-index: 1; }
.drawer-table tbody tr:last-child td { border-bottom: none; }
.drawer-table tbody tr:hover { background: #fafafa; }
.drawer-table .col-num { text-align: center; font-variant-numeric: tabular-nums; }
.drawer-table .cell-muted { color: #666; }
.drawer-table .cell-link { color: #1890ff; }
.drawer-table .cell-remark { min-width: 120px; text-align: left; white-space: normal; }
.drawer-empty { padding: 48px 16px; text-align: center; color: #999; font-size: 13px; }
.tag-alipay { border-color: #91d5ff; background: #e6f7ff; color: #1677ff; }
.tag-wechat { border-color: #b7eb8f; background: #f6ffed; color: #389e0d; }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 50px; box-sizing: border-box;
  padding: 0 20px; border-bottom: 1px solid #f0f0f0; flex-shrink: 0;
  background: #fafafa;
}
.drawer-header-title { font-size: 16px; font-weight: 600; color: #333; line-height: 1; }
.drawer-header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.drawer-header-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; background: transparent;
  color: #8c8c8c; border-radius: 4px; cursor: pointer;
}
.drawer-header-btn:hover { background: #f0f0f0; color: #333; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.drawer-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500; color: #333; margin: 0 0 12px;
}
.drawer-section-title::before {
  content: ""; width: 3px; height: 14px; background: #1890ff; border-radius: 2px;
}
.drawer-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px;
  border: none; background: transparent; margin-bottom: 20px; overflow: visible;
  grid-auto-rows: min-content; align-items: start;
}
.drawer-form--stack {
  grid-template-columns: 1fr;
  gap: 12px;
}
.drawer-form--stack .drawer-input-field--full {
  grid-column: auto;
}
.drawer-form-row {
  display: flex; align-items: flex-start; min-height: 44px;
  padding: 6px 16px 6px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px;
}
.drawer-form-row:last-child { border-bottom: none; }
.drawer-form-label {
  width: 120px; flex-shrink: 0; color: #666; line-height: 32px;
  text-align: right; padding-right: 12px;
}
.drawer-form-value {
  flex: 1; min-width: 0; color: #333; line-height: 22px;
  padding: 5px 12px; background: #fafafa; border: 1px solid #f0f0f0;
  border-radius: 6px; word-break: break-all;
}
.drawer-rule-hint {
  padding: 10px 12px; margin-bottom: 16px; background: #fff7e6;
  border: 1px solid #ffd591; border-radius: 6px; font-size: 12px; color: #d46b08; line-height: 1.5;
}
.drawer-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 10px 20px; border-top: 1px solid #f0f0f0; flex-shrink: 0; background: #fafafa;
}
.btn-drawer {
  min-width: 72px; height: 32px; padding: 0 16px; font-size: 13px;
  border-radius: 6px; cursor: pointer; transition: all .15s;
}
.btn-drawer-cancel { border: 1px solid #d9d9d9; background: #fff; color: #333; }
.btn-drawer-cancel:hover { border-color: #1890ff; color: #1890ff; }
.btn-drawer-primary { border: none; background: #1890ff; color: #fff; }
.btn-drawer-primary:hover { background: #40a9ff; }
.btn-drawer-danger { border: 1px solid #ffa39e; background: #fff; color: #cf1322; }
.btn-drawer-danger:hover { background: #fff1f0; }

/* 应收统计详情 · 对齐 1.0 订单/运单财务审核表、收入明细审核表 */
.drawer-summary-stats { display: flex; flex-direction: column; gap: 12px; }
.drawer-summary-stats .drawer-stats { margin-bottom: 0; }
.drawer-summary-table-wrap { margin-top: 0; overflow: visible; }
.drawer-summary-table-wrap .drawer-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 11px; }
.drawer-summary-table-wrap .drawer-table th,
.drawer-summary-table-wrap .drawer-table td { padding: 8px 4px; white-space: nowrap; line-height: 1.35; }
.drawer-form--fee-base { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.drawer-form--fee-base .drawer-input-label { width: 72px; font-size: 12px; }
.drawer-input-field { display: flex; align-items: flex-start; gap: 8px; min-width: 0; font-size: 13px; min-height: 0; }
.drawer-input-field--full { grid-column: 1 / -1; }
.drawer-input-field--upload:not(.drawer-input-field--upload-compact) {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.drawer-input-field--upload-compact {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
}
.drawer-input-field--upload.drawer-input-field--upload-compact .drawer-input-label {
  width: 112px;
  flex-shrink: 0;
  text-align: right;
  line-height: 32px;
  padding-right: 4px;
  white-space: nowrap;
}
.drawer-input-field--upload.drawer-input-field--upload-compact .drawer-input-control {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}
.drawer-input-field--upload:not(.drawer-input-field--upload-compact) .drawer-input-label {
  width: auto;
  text-align: left;
  line-height: 1.5;
  padding-right: 0;
}
.drawer-input-field--upload:not(.drawer-input-field--upload-compact) .drawer-input-control {
  display: block;
  min-width: 0;
  flex: none;
}
.drawer-input-label {
  width: 112px; flex-shrink: 0; line-height: 32px; color: #666;
  text-align: right; padding-right: 4px; white-space: nowrap;
}
.drawer-input-control { flex: 1; min-width: 0; }
.drawer-input-row { display: flex; align-items: center; gap: 8px; }
.drawer-input {
  flex: 1; min-width: 0; width: 100%; height: 32px; padding: 0 10px;
  border: 1px solid #ebebeb; border-radius: 6px; font-size: 13px; color: #333;
  background: #fff; box-sizing: border-box; outline: none; font-family: inherit;
}
.drawer-input[readonly] { cursor: default; background: #fff; }
.drawer-input.is-red { color: #cf1322; font-weight: 500; }
.drawer-input-unit { flex-shrink: 0; color: #666; line-height: 32px; min-width: 16px; }
.drawer-input-box {
  flex: 1; min-width: 0; min-height: 32px; padding: 4px 10px;
  border: 1px solid #ebebeb; border-radius: 6px; background: #fff;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}
.drawer-input-tag {
  flex: 1; min-width: 0; min-height: 32px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
}
.drawer-input--editable { background: #fafafa; cursor: text; }
.drawer-input--editable:focus { border-color: #1890ff; background: #fff; box-shadow: 0 0 0 2px rgba(24,144,255,.1); }
.drawer-textarea {
  width: 100%; min-height: 72px; padding: 8px 10px; border: 1px solid #ebebeb;
  border-radius: 6px; font-size: 13px; color: #333; background: #fafafa;
  resize: vertical; font-family: inherit; box-sizing: border-box; outline: none;
}
.drawer-textarea:focus { border-color: #1890ff; background: #fff; }
.drawer-textarea[readonly] { background: #fff; cursor: default; resize: none; }
.drawer-textarea--editable { background: #fff; cursor: text; }

/* 详情页内 · 审核操作板块（替代底部审核按钮） */
.drawer-audit-panel { margin-top: 4px; margin-bottom: 8px; }
.drawer-audit-panel .drawer-form--stack { margin-bottom: 0; }
.drawer-audit-toggle {
  display: inline-flex; align-items: stretch;
}
.drawer-audit-toggle-btn {
  min-width: 88px; height: 32px; padding: 0 16px; font-size: 13px;
  border: 1px solid #d9d9d9; background: #fff; color: #666; cursor: pointer;
  transition: all .15s; line-height: 30px; box-sizing: border-box;
}
.drawer-audit-toggle-btn:first-child { border-radius: 6px 0 0 6px; }
.drawer-audit-toggle-btn:last-child { border-radius: 0 6px 6px 0; }
.drawer-audit-toggle-btn + .drawer-audit-toggle-btn { margin-left: -1px; }
.drawer-audit-toggle-btn.is-active {
  border-color: #1890ff; color: #1890ff; background: #e6f7ff; position: relative; z-index: 1;
}
.drawer-audit-toggle-btn[data-audit-result="reject"].is-active {
  border-color: #ff4d4f; color: #cf1322; background: #fff1f0;
}
/* 多级审核 · 审核操作（与 drawer-input-field 标签/控件列对齐） */
.drawer-audit-operation { margin-top: 8px; margin-bottom: 16px; }
.drawer-audit-operation .drawer-audit-timeline {
  padding: 4px 0 0;
}
.drawer-audit-operation .drawer-audit-panel {
  margin-top: 12px; margin-bottom: 0; padding: 0; border-top: none;
}
.drawer-audit-operation .drawer-audit-panel .drawer-form--stack { margin-bottom: 0; }
.drawer-audit-timeline {
  display: flex; flex-direction: column; gap: 0;
}
.drawer-audit-timeline-item {
  display: flex; gap: 8px; align-items: flex-start;
}
.drawer-audit-timeline-item:last-child .drawer-audit-timeline-line { display: none; }
.drawer-audit-timeline-item:last-child .drawer-audit-timeline-content { padding-bottom: 0; }
.drawer-audit-timeline-axis {
  display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0;
  width: 112px; padding-top: 6px; padding-right: 4px; box-sizing: border-box;
}
.drawer-audit-timeline-node {
  width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; line-height: 1; font-weight: 600; color: #999; background: #f5f5f5; border: 1px solid #e8e8e8;
}
.drawer-audit-timeline-item--current .drawer-audit-timeline-node {
  color: #fff; background: #1890ff; border-color: #1890ff;
}
.drawer-audit-timeline-item--done .drawer-audit-timeline-node {
  color: #666; background: #fafafa; border-color: #d9d9d9;
}
.drawer-audit-timeline-line {
  flex: 1; width: 1px; min-height: 16px; background: #e8e8e8;
  margin: 4px 9px 0 0; align-self: flex-end;
}
.drawer-audit-timeline-content {
  flex: 1; min-width: 0; padding-bottom: 14px; text-align: left;
}
.drawer-audit-timeline-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 4px;
}
.drawer-audit-timeline-title {
  font-size: 14px; font-weight: 500; color: #333; line-height: 22px;
}
.drawer-audit-timeline-status .tag { font-size: 12px; }
.drawer-audit-timeline-item--current .drawer-audit-timeline-title { color: #1890ff; }
.drawer-audit-timeline-time {
  font-size: 12px; color: #999; line-height: 18px;
}
.drawer-select {
  width: 100%; height: 32px; padding: 0 10px; border: 1px solid #ebebeb;
  border-radius: 6px; font-size: 13px; color: #333; background: #fafafa;
  outline: none; font-family: inherit; box-sizing: border-box;
}
.drawer-select:focus { border-color: #1890ff; background: #fff; }
.drawer-checkbox-group {
  display: flex; flex-wrap: wrap; gap: 12px 16px; min-height: 32px; align-items: center;
}
.drawer-checkbox-item {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #333; cursor: pointer;
}
.drawer-checkbox-item input { width: 14px; height: 14px; margin: 0; cursor: pointer; accent-color: #1890ff; }
.drawer-upload-zone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; box-sizing: border-box;
  border: 1px dashed #d9d9d9; border-radius: 8px; padding: 20px 16px; text-align: center;
  background: #fafafa; cursor: pointer; transition: border-color .15s, background .15s;
}
.drawer-upload-zone:hover { border-color: #1890ff; background: #f0f7ff; }
.drawer-upload-zone--compact {
  width: 72px;
  height: 72px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 6px;
}
.drawer-upload-zone--compact .drawer-upload-zone__icon {
  margin-bottom: 0;
}
.drawer-upload-zone__icon {
  display: flex; align-items: center; justify-content: center;
  color: #999; margin-bottom: 8px; line-height: 1;
}
.drawer-upload-zone__icon svg,
.drawer-upload-zone__icon i {
  width: 20px; height: 20px; display: block;
}
.drawer-upload-zone__text { font-size: 13px; color: #666; line-height: 1.5; }
.drawer-upload-zone__hint { font-size: 12px; color: #999; margin-top: 4px; line-height: 1.4; }
.drawer-upload-zone input[type="file"] { display: none; }
.drawer-upload-preview { margin-top: 8px; font-size: 12px; color: #1890ff; }
.drawer-image-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-image-item {
  width: 72px; height: 72px; border-radius: 6px; border: 1px solid #f0f0f0;
  background: #f5f5f5; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #999; overflow: hidden;
}
.drawer-image-item img { width: 100%; height: 100%; object-fit: cover; }
.drawer-image-item--add { border-style: dashed; cursor: pointer; color: #1890ff; }
.btn-drawer-save { border: none; background: #52c41a; color: #fff; }
.btn-drawer-save:hover { background: #73d13d; }
.btn-drawer-secondary { border: 1px solid #d9d9d9; background: #fff; color: #333; }
.btn-drawer-secondary:hover { border-color: #1890ff; color: #1890ff; }
.drawer-fee-block { margin-bottom: 20px; }
.drawer-fee-detail { margin-top: 8px; }
.drawer-fee-detail-title { font-size: 12px; font-weight: 500; color: #666; margin-bottom: 8px; padding-left: 2px; }
.detail-amount-red { color: #cf1322; font-weight: 500; }
.drawer-table .cell-highlight { color: #cf1322; font-weight: 500; }
.drawer-table .row-summary-lite { background: #fafafa; font-weight: 500; }
.recv-image-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.recv-image-card {
  border: 1px solid #f0f0f0; border-radius: 8px; overflow: hidden; background: #fff;
}
.recv-image-card img { width: 100%; height: 120px; object-fit: cover; display: block; background: #f5f5f5; }
.recv-image-card .recv-image-meta { padding: 8px 10px; font-size: 11px; color: #666; line-height: 1.45; }
.recv-image-card .recv-image-cat {
  position: absolute; left: 8px; top: 8px; padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px;
}
.recv-image-media { position: relative; }

.toast {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.75); color: #fff; padding: 10px 20px; border-radius: 6px;
  font-size: 13px; z-index: 200; opacity: 0; transition: opacity .25s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── 切换系统弹窗 ── */
.system-switch-modal {
  position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: 24px; pointer-events: none; visibility: hidden;
}
.system-switch-modal.open { pointer-events: auto; visibility: visible; }
.system-switch-mask {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45);
  opacity: 0; transition: opacity .2s;
}
.system-switch-modal.open .system-switch-mask { opacity: 1; }
.system-switch-dialog {
  position: relative; width: min(720px, 100%); background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18); padding: 24px 24px 20px;
  transform: translateY(12px) scale(0.98); opacity: 0; transition: transform .22s ease, opacity .22s ease;
}
.system-switch-modal.open .system-switch-dialog { transform: translateY(0) scale(1); opacity: 1; }
.system-switch-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.system-switch-title { font-size: 18px; font-weight: 600; color: #1f2937; line-height: 1.3; }
.system-switch-subtitle { margin-top: 6px; font-size: 13px; color: #9ca3af; }
.system-switch-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: none; background: transparent; color: #9ca3af;
  border-radius: 8px; cursor: pointer; flex-shrink: 0;
}
.system-switch-close:hover { background: #f3f4f6; color: #4b5563; }
.system-switch-search-wrap {
  display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 40px;
  border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; margin-bottom: 20px;
}
.system-switch-search-wrap:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(24, 144, 255, 0.12); }
.system-switch-search {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 14px; color: #374151;
}
.system-switch-search::placeholder { color: #9ca3af; }
.system-switch-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; min-height: 132px;
}
.system-switch-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 118px; padding: 18px 12px; border: 1px solid #e5e7eb; border-radius: 12px;
  background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s;
  text-align: center;
}
.system-switch-card:hover:not(.is-disabled) { border-color: #93c5fd; background: #f8fbff; }
.system-switch-card.is-selected {
  border-color: #1890ff; background: #f0f7ff; box-shadow: 0 0 0 1px rgba(24, 144, 255, 0.15);
}
.system-switch-card.is-disabled {
  cursor: not-allowed; opacity: 0.55; background: #fafafa;
}
.system-switch-card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; background: #f3f4f6; color: #6b7280;
}
.system-switch-card.is-selected .system-switch-card-icon { background: #e6f4ff; color: #1890ff; }
.system-switch-card-name { font-size: 14px; font-weight: 600; color: #1f2937; }
.system-switch-card-desc { font-size: 12px; color: #9ca3af; line-height: 1.4; }
.system-switch-empty {
  grid-column: 1 / -1; padding: 36px 16px; text-align: center; color: #9ca3af; font-size: 13px;
}
.system-switch-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid #f3f4f6;
}
.system-switch-recent {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #1890ff;
}
.system-switch-actions { display: flex; align-items: center; gap: 10px; }
.system-switch-btn {
  min-width: 88px; height: 36px; padding: 0 18px; border-radius: 8px; font-size: 14px;
  cursor: pointer; transition: all .15s;
}
.system-switch-btn-cancel {
  border: 1px solid #e5e7eb; background: #fff; color: #4b5563;
}
.system-switch-btn-cancel:hover { border-color: #d1d5db; color: #1f2937; }
.system-switch-btn-primary {
  border: none; background: #1890ff; color: #fff;
}
.system-switch-btn-primary:hover { background: #40a9ff; }
@media (max-width: 640px) {
  .system-switch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .system-switch-footer { flex-direction: column; align-items: stretch; }
  .system-switch-actions { justify-content: flex-end; }
}
