/* 云会计记账系统 - 全局样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f0f2f5; color: #333; font-size: 14px;
  cursor: default;
  -webkit-user-select: none; -moz-user-select: none; user-select: none;
  caret-color: transparent !important;
}
/* 非输入区域：不出现 I 型鼠标光标、不出现插入光标 */
body, body * {
  caret-color: transparent !important;
}
body *:not(input):not(textarea):not(select):not([contenteditable="true"]) {
  cursor: default;
}
a, button, .btn, .chip, .series-check, .ultra-radio, .acc-search-item, .acc-cat,
.menu-group-title, .help-tip, .help-tip-icon, .acc-search-btn, .purpose-search-btn,
.trad-del, .simple-del, .del, label.ultra-radio, [role="button"] {
  cursor: pointer !important;
}
*:focus:not(input):not(textarea):not(select):not([contenteditable="true"]) {
  outline: none;
  caret-color: transparent !important;
}
input, textarea, select,
[contenteditable="true"],
.allow-select {
  -webkit-user-select: text; -moz-user-select: text; user-select: text;
}
input:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([readonly]),
textarea,
[contenteditable="true"] {
  caret-color: auto !important;
  cursor: text !important;
}
input[readonly] {
  caret-color: transparent !important;
  cursor: default !important;
}
/* 传统金额格：未聚焦时不显示插入光标 */
.mg-input { caret-color: transparent !important; cursor: text !important; }
.mg-input:focus { caret-color: #1677ff !important; }
select, input[type="checkbox"], input[type="radio"], input[type="button"], input[type="submit"], button {
  cursor: pointer !important;
  caret-color: transparent !important;
}
a { color: var(--theme-primary, #0d9488); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 登录页 */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1677ff 0%, #4096ff 100%); }
.auth-box { width: 380px; background: #fff; padding: 36px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.12); }
.auth-box h1 { font-size: 22px; text-align: center; margin-bottom: 6px; color: #1677ff; }
.auth-box .sub { text-align: center; color: #999; margin-bottom: 24px; }
.auth-box .form-item { margin-bottom: 16px; }
.auth-box label { display: block; margin-bottom: 6px; color: #555; }
.auth-box input { width: 100%; padding: 10px 12px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; }
.auth-box input:focus { border-color: #1677ff; outline: none; }
:root {
  --mint: #0d9488;
  --mint-soft: #ccfbf1;
  --mint-bg: #f0fdfa;
  --ink: #134e4a;
  --muted: #5b7c78;
  --line: #d8eee9;
  --theme-primary: #0d9488;
  --theme-primary-hover: #0f766e;
}
.btn { display: inline-block; padding: 8px 18px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; transition: .2s; text-decoration: none; line-height: 1.2; box-sizing: border-box; }
.btn-primary { background: var(--theme-primary, #0d9488) !important; color: #fff !important; border: none !important; }
.btn-primary:hover { background: var(--theme-primary-hover, #0f766e) !important; color: #fff !important; }
.btn.is-perm-disabled,
button.is-perm-disabled,
a.is-perm-disabled {
  opacity: .45 !important;
  filter: grayscale(.35);
  cursor: not-allowed !important;
  pointer-events: none;
}
.btn-danger { background: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #ff7875; }
.btn-default { background: #fff !important; color: #333 !important; border: 1px solid #d9d9d9 !important; }
.btn-default:hover { border-color: var(--theme-primary, #0d9488) !important; color: var(--theme-primary, #0d9488) !important; }
.btn-block { width: 100%; padding: 10px; font-size: 15px; }

/* 弹窗内外主按钮：跟界面主题色走，勿写死青绿 */
.btn.invc-btn-main,
.btn.ov-btn-main,
.btn.att-btn-main,
.btn.vch-btn-main,
.modal-mask .btn-primary,
.modal-card .btn-primary,
.ca-tip-mask .btn-primary,
.ca-tip-card .btn-primary {
  background: var(--theme-primary, #0d9488) !important;
  color: #fff !important;
  border: none !important;
}
.btn.invc-btn-main:hover,
.btn.ov-btn-main:hover,
.btn.att-btn-main:hover,
.btn.vch-btn-main:hover,
.modal-mask .btn-primary:hover,
.modal-card .btn-primary:hover,
.ca-tip-mask .btn-primary:hover,
.ca-tip-card .btn-primary:hover {
  background: var(--theme-primary-hover, #0f766e) !important;
  color: #fff !important;
}
.btn.invc-btn-soft,
.btn.ov-btn-soft,
.btn.att-btn-soft {
  background: var(--theme-soft, #ccfbf1) !important;
  color: var(--theme-ink, #134e4a) !important;
  border: 1px solid var(--theme-line, #d8eee9) !important;
}
.btn.invc-btn-soft:hover,
.btn.ov-btn-soft:hover,
.btn.att-btn-soft:hover {
  border-color: var(--theme-primary, #0d9488) !important;
  color: var(--theme-primary, #0d9488) !important;
}
.btn.invc-btn-ghost,
.btn.ov-btn-ghost,
.btn.att-btn-ghost {
  background: #fff !important;
  color: var(--theme-ink, #134e4a) !important;
  border: 1px solid var(--theme-line, #d8eee9) !important;
}
.btn.invc-btn-ghost:hover,
.btn.ov-btn-ghost:hover,
.btn.att-btn-ghost:hover {
  border-color: var(--theme-primary, #0d9488) !important;
  color: var(--theme-primary, #0d9488) !important;
}
.modal-mask .btn:disabled,
.modal-card .btn:disabled,
.ca-tip-card .btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.auth-box .switch { text-align: center; margin-top: 16px; color: #666; }

/* 管理后台布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #fff; flex-shrink: 0; position: relative; z-index: 40; overflow: visible; }
.sidebar .logo {
  padding: 18px 12px; font-size: 16px; font-weight: bold; border-bottom: 1px solid #1f3a56;
  text-align: center; line-height: 1.35; word-break: break-all;
  max-height: 4.2em; overflow: hidden;
}
.sidebar .menu { padding: 8px 0; overflow: visible; }
.sidebar .menu a { display: block; padding: 12px 20px; color: #a6b3c2; }
.sidebar .menu a:hover, .sidebar .menu a.active { background: #1677ff; color: #fff; text-decoration: none; }
.menu-group { position: relative; }
.menu-group-title {
  width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left;
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #a6b3c2; font-size: 14px;
}
.menu-group-title:hover,
.menu-group.is-flyout > .menu-group-title,
.menu-group.has-active > .menu-group-title { color: #fff; }
.menu-arrow {
  margin-left: auto; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; opacity: .7;
}
.menu-group.is-flyout > .menu-group-title .menu-arrow { transform: rotate(-45deg); opacity: 1; }
.menu-group-body {
  display: none; position: absolute; left: calc(100% - 2px); top: 0; z-index: 80;
  width: max-content; max-width: min(94vw, calc(100vw - 210px));
  height: auto; max-height: none;
  overflow: visible;
  padding: 20px 22px; margin: 0;
  background: #0b1e33; border: 1px solid #1f3a56; border-radius: 14px;
  box-shadow: 8px 12px 28px rgba(0,0,0,.28);
  box-sizing: border-box;
}
.menu-group-body::before {
  content: ''; position: absolute; left: -14px; top: 0; bottom: 0; width: 16px;
}
.menu-group.is-flyout > .menu-group-body {
  display: flex; flex-direction: row; flex-wrap: nowrap;
  align-items: flex-start; gap: 12px 18px;
}
.menu-group-body > a {
  display: block; margin: 2px 0; border-radius: 8px; padding: 10px 14px !important;
  white-space: nowrap; flex: 0 0 auto; min-width: 156px;
}
.menu-sub {
  margin: 0; flex: 0 0 auto; min-width: 168px; max-width: 240px;
  display: flex; flex-direction: column;
}
.menu-sub-title {
  width: 100%; border: 0; background: transparent; cursor: default; text-align: left;
  display: flex; align-items: center; gap: 8px;
  padding: 2px 12px 8px; font-size: 12px; font-weight: 600; color: #7f8fa3; letter-spacing: .02em;
  pointer-events: none; white-space: nowrap;
}
.menu-sub-title .menu-arrow { display: none; }
.menu-sub-body { display: flex; flex-direction: column; gap: 2px; }
.menu-sub a {
  padding: 9px 14px !important; margin: 0; border-radius: 8px; font-size: 13px;
  white-space: nowrap;
}
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; height: 100vh; }
.topbar { height: 56px; flex-shrink: 0; background: #fff; border-bottom: 1px solid #e8e8e8; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.topbar .title { font-size: 16px; font-weight: 600; display: flex; align-items: center; height: 100%; }
.topbar .title-sep {
  flex: 0 0 auto; width: 1px; height: 16px;
  background: #e4eaf2; margin: 0 12px 0 0; border-radius: 1px;
}
.topbar .title-text {
  font-size: 12.5px; font-weight: 500; line-height: 1; color: #64748b;
  background: #f4f7fb; border: 1px solid #e8eef6;
  padding: 5px 12px; border-radius: 999px;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 多标签栏 */
.page-tabs {
  display: flex; align-items: stretch; gap: 2px; flex-shrink: 0;
  background: #eef1f6; border-bottom: 1px solid #dde2ea;
  padding: 6px 8px 0; min-height: 38px; overflow-x: auto; overflow-y: hidden;
}
.page-tab {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 168px; padding: 7px 10px; margin-bottom: -1px;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 8px 8px 0 0; background: transparent;
  color: #5b6575; font-size: 13px; cursor: pointer; user-select: none;
  white-space: nowrap;
}
.page-tab:hover { background: rgba(255,255,255,.7); color: #1f2937; }
.page-tab.active {
  background: #fff; color: #111827; font-weight: 600;
  border-color: #dde2ea; box-shadow: 0 1px 0 #fff;
}
.page-tab-title { overflow: hidden; text-overflow: ellipsis; }
.page-tab-close {
  border: none; background: transparent; color: #9aa3b2;
  width: 18px; height: 18px; line-height: 16px; border-radius: 4px;
  padding: 0; cursor: pointer; font-size: 14px; flex-shrink: 0;
}
.page-tab-close:hover { background: #fee2e2; color: #dc2626; }
.page-tabs-actions {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: auto; padding: 0 4px 6px; flex-shrink: 0;
}
.page-tabs-btn {
  border: 1px solid #d5dbe5; background: #fff; color: #4b5563;
  border-radius: 6px; height: 26px; padding: 0 8px; font-size: 12px; cursor: pointer;
}
.page-tabs-btn:hover { border-color: #93c5fd; color: #1677ff; }
.tab-panes { flex: 1; min-height: 0; position: relative; background: #f5f7fb; }
.tab-pane { display: none; height: 100%; overflow: auto; }
.tab-pane.active { display: block; }
.tab-pane.is-native.active { display: block; }
.tab-iframe { width: 100%; height: 100%; border: 0; background: #f5f7fb; vertical-align: top; }

/* 标签内嵌页面：隐藏壳层 */
body.is-embed { background: #f5f7fb; }
body.is-embed .layout { display: block; min-height: 100%; }
body.is-embed .main { height: auto; min-height: 100vh; }
body.is-embed .embed-content { padding: 20px 24px 32px; }
body.is-embed .page-tabs,
body.is-embed .sidebar,
body.is-embed .topbar { display: none !important; }
.topbar .user { color: #666; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topbar .tab-mode-switch {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 0; padding: 2px 6px; border: 1px solid #e5e7eb; border-radius: 4px;
  background: #fafafa; font-size: 12px; color: #4b5563; cursor: pointer; user-select: none;
  white-space: nowrap; line-height: 1.2;
}
.topbar .tab-mode-switch:hover { border-color: #93c5fd; color: #1677ff; }
.topbar .tab-mode-switch input {
  width: 14px; height: 14px; margin: 0; accent-color: #1677ff; cursor: pointer; flex-shrink: 0;
}
.topbar .top-company { font-weight: 600; color: #1677ff; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.tabs-disabled .page-tabs { display: none !important; }
.topbar .top-username { position: relative; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #374151; font-size: 13px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.topbar .top-username:hover { color: #1677ff; background: #f0f7ff; }
.top-user-wrap { position: relative; display: inline-flex; align-items: center; }
.top-user-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 150px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 1200; padding: 6px 0;
}
.top-user-menu-item { display: block; padding: 9px 16px; font-size: 13px; color: #374151; text-decoration: none; white-space: nowrap; }
.top-user-menu-item:hover { background: #f8fafc; color: #1677ff; }
.top-version-panel { width: 380px; max-height: 480px; }
.ver-tabs { display: flex; gap: 6px; padding: 10px 12px 8px; border-bottom: 1px solid #f3f4f6; }
.ver-tab { flex: 1; border: 1px solid #e5e7eb; background: #fff; color: #4b5563; border-radius: 8px; height: 32px; font-size: 13px; cursor: pointer; }
.ver-tab.active { border-color: #1677ff; color: #1677ff; background: #eff6ff; font-weight: 600; }
.ver-body { padding: 6px 0; }
.ver-item { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; }
.ver-item:last-child { border-bottom: none; }
.ver-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.ver-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #eff6ff; color: #1677ff; font-size: 12px; font-weight: 600; }
.ver-date { color: #9ca3af; font-size: 12px; }
.ver-title { color: #111827; font-size: 14px; font-weight: 600; }
.ver-content { color: #4b5563; font-size: 13px; line-height: 1.6; margin-top: 4px; white-space: pre-wrap; }
.topbar .top-logout { color: #ef4444; text-decoration: none; font-size: 13px; }
.topbar .top-logout:hover { text-decoration: underline; }
.link-action { color: #1677ff; font-size: 13px; white-space: nowrap; text-decoration: none; padding-top: 8px; }
.link-action:hover { text-decoration: underline; }
.form-row-email { align-items: flex-start; }
.nav-badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px; padding: 0 5px;
  margin-left: 6px; border-radius: 8px; background: #ef4444; color: #fff;
  font-size: 11px; font-weight: 600; text-align: center; vertical-align: middle;
}
.top-notify { position: relative; }
.top-notify-btn {
  position: relative; border: 1px solid #e5e7eb; background: #fff; border-radius: 6px;
  height: 30px; padding: 0 10px; cursor: pointer; color: #374151; font-size: 13px;
}
.top-notify-btn:hover { border-color: #93c5fd; color: #1677ff; }
.top-notify-dot {
  position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px; border-radius: 8px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
}
.top-notify-panel {
  position: absolute; right: 0; top: 36px; width: 340px; max-height: 420px; overflow: auto;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 1200;
}
.top-notify-head { padding: 12px 14px; font-weight: 600; border-bottom: 1px solid #f3f4f6; }
.top-notify-body { padding: 8px 0; }
.top-notify-item {
  display: block; padding: 8px 14px; color: #111827; text-decoration: none; font-size: 13px;
}
.top-notify-item:hover { background: #f8fafc; }
.top-notify-item b { color: #ef4444; margin-right: 4px; }
.top-notify-sub { padding: 2px 14px 6px 28px; color: #6b7280; font-size: 12px; }
.top-notify-empty { padding: 18px 14px; color: #9ca3af; font-size: 13px; text-align: center; }
.top-notify-foot { padding: 8px 14px 12px; border-top: 1px solid #f3f4f6; text-align: right; }
.top-msg-panel { width: 380px; max-height: 480px; }
.top-notify-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.top-msg-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f3f4f6; }
.top-msg-item:hover { background: #f8fafc; }
.top-msg-item.is-unread { background: #f0f9ff; }
.top-msg-title { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.4; }
.top-msg-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444; margin-right: 6px; vertical-align: middle;
}
.top-msg-meta { font-size: 11px; color: #9ca3af; margin-top: 4px; }
.top-msg-preview { font-size: 12px; color: #6b7280; margin-top: 4px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 报表/账簿/税务表标准表格（屏幕） */
.rio-sheet,
table.rpt-table,
table.vat-table,
table.book-table,
#result table,
.tax-zoom-root table,
.rp-body table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.rio-sheet th, .rio-sheet td,
table.rpt-table th, table.rpt-table td,
table.vat-table th, table.vat-table td,
table.book-table th, table.book-table td,
#result table th, #result table td,
.tax-zoom-root table th, .tax-zoom-root table td,
.rp-body table th, .rp-body table td {
  border: 1px solid #c9cdd3;
  padding: 6px 8px;
  vertical-align: middle;
}
.rio-sheet thead th, table.rpt-table thead th, table.vat-table thead th,
table.book-table thead th, #result table thead th, .tax-zoom-root table thead th,
.rp-body table thead th {
  background: #f3f4f6;
  font-weight: 600;
  text-align: center;
  color: #1f2937;
}
.rio-sheet .money, table.rpt-table .money, table.vat-table .money,
table.book-table .money, #result table .money, .tax-zoom-root table .money,
.rp-body table .money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
@media print {
  .sidebar, .topbar, .page-tabs, .page-tabs-actions, .toolbar, .pagination, .menu, .btn,
  .no-print, .tax-zoom, .aging-tabs, .home-banner { display: none !important; }
  .layout, .main, .content, .tab-panes, .tab-pane { display: block !important; width: 100% !important; height: auto !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
  .tab-pane { display: none !important; }
  .tab-pane.active { display: block !important; }
  .card { border: none !important; box-shadow: none !important; }
  table, .rio-sheet, .rpt-table, .vat-table, .book-table {
    width: 100% !important; border-collapse: collapse !important;
  }
  th, td {
    border: 1px solid #000 !important;
    padding: 4px 6px !important;
    background: #fff !important;
    color: #000 !important;
  }
  thead th { background: #f2f2f2 !important; font-weight: 700 !important; }
  .money { text-align: right !important; }
  a { color: #000 !important; text-decoration: none !important; }
}
.btn-sm { padding: 2px 10px; font-size: 12px; height: 28px; line-height: 1.2; }
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow: auto; box-sizing: border-box;
}
.modal-card {
  background: #fff; border-radius: 8px; padding: 20px 24px; width: 100%;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  max-height: calc(100vh - 32px); overflow: auto;
  -webkit-overflow-scrolling: touch; box-sizing: border-box;
}
.modal-card h2 { margin: 0 0 8px; font-size: 18px; }
/* 底部操作行吸底，避免确认/取消被裁切 */
.modal-card > .form-row[style*="flex-end"],
.modal-card > .modal-actions,
.modal-card > .ultra-actions,
.modal-card > .invc-view-actions,
.modal-card > .ov-view-actions,
.modal-card > .att-preview-actions {
  position: sticky; bottom: 0; z-index: 8;
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, #fff 35%);
  padding-top: 12px; padding-bottom: 2px; margin-bottom: 0 !important;
}
.sub-hint { color: #888; font-size: 13px; margin: 0 0 12px; }
.ent-switch-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow: auto; }
.ent-item { border: 1px solid #e8e8e8; border-radius: 6px; padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.ent-item:hover { border-color: #1677ff; background: #f0f5ff; }
.ent-item.is-current { border-color: #1677ff; background: #e6f4ff; }
.ent-name { font-weight: 600; margin-bottom: 4px; }
.ent-meta { font-size: 12px; color: #888; }
.ent-empty { color: #999; padding: 20px; text-align: center; }
.bind-box { border-top: 1px solid #f0f0f0; margin-top: 8px; padding-top: 4px; }
.bind-box .form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bind-box input { padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; min-width: 140px; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 10px; background: #fff; font-size: 13px; color: #444; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.chip-check input { margin: 0; appearance: none; width: 16px; height: 16px; border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; cursor: pointer; flex-shrink: 0; }
.chip-check:hover { border-color: #1677ff; background: #f0f5ff; }
.chip-check input:checked { background: #1677ff; border-color: #1677ff; box-shadow: 0 0 0 3px rgba(22,119,255,.15); }
.chip-check input:checked + span { color: #1677ff; font-weight: 700; }
.ent-chip-box { min-height: 34px; }
.ent-accent-row #entHint { margin-left: 10px; white-space: nowrap; }
.content { padding: 24px; flex: 1; }

.card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 16px; }
.card h2 { font-size: 16px; margin-bottom: 16px; }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; text-align: left; }
th { background: #fafafa; font-weight: 600; color: #555; }
tr:hover td { background: #f5faff; }

/* 表单 */
.form-row { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.form-row label { min-width: 100px; padding-top: 8px; color: #555; }
.form-row input, .form-row select, .form-row textarea {
    padding: 7px 10px; border: 1px solid #d9d9d9; border-radius: 6px; font-size: 14px; min-width: 180px;
}
.form-row input:focus, .form-row select:focus { border-color: #1677ff; outline: none; }
/* 统一输入框高度 */
.form-row input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.form-row select { height: 34px; box-sizing: border-box; }
/* 输入框右侧的行内提示文字：与输入框垂直居中、行高对齐输入框高度（覆盖普通 span 与 sub-hint） */
.form-row > span,
.form-row > .form-hint,
.form-row span.sub-hint,
.form-row .form-hint {
    align-self: center;
}
.form-row > span,
.form-row span.sub-hint,
.form-row .form-hint {
    line-height: 34px;
    margin-top: 0;
    margin-bottom: 0;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-grid-2 .form-row { margin-bottom: 12px; }
.form-grid-2 .form-row label { min-width: 88px; }
.form-grid-2 .form-row input,
.form-grid-2 .form-row select { min-width: 0; flex: 1; width: 100%; }
.req { color: #cf1322; margin-right: 2px; }
.radio-inline { display: inline-flex; align-items: center; gap: 6px; min-width: auto !important; padding-top: 8px; margin-right: 18px; cursor: pointer; }
/* 表单行内的单选项与 34px 输入框垂直居中，避免 padding-top 造成错位 */
.form-row > .radio-inline,
.form-row > label.radio-inline { padding-top: 0; align-self: center; min-height: 34px; }
.radio-inline input { min-width: auto; margin: 0; }
.radio-inline.is-disabled { color: #bbb; cursor: not-allowed; }
.ledger-create-title { background: #1677ff; color: #fff; margin: -20px -24px 18px; padding: 14px 24px; border-radius: 8px 8px 0 0; font-size: 16px; font-weight: 600; }
@media (max-width: 720px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* 统计卡片 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.stat-card .label { color: #888; font-size: 13px; }
.stat-card .value { font-size: 28px; font-weight: bold; color: #1677ff; margin-top: 8px; }

/* 提示 */
.msg { padding: 10px 16px; border-radius: 6px; margin-bottom: 12px; }
.msg-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  margin: 0;
  min-width: 200px;
  max-width: min(90vw, 480px);
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  pointer-events: none;
}
.msg-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.msg-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }

/* 凭证录入（摘要/科目/存货/数量/单价/借贷/现金流/票据/删除） */
.entry-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.15fr) minmax(180px, 1.7fr) minmax(88px, 0.9fr) minmax(108px, 0.95fr) minmax(108px, 0.95fr) minmax(96px, 0.9fr) minmax(78px, 0.75fr) 34px;
  gap: 8px; margin-bottom: 8px; align-items: center;
}
.entry-row.has-inv-item {
  grid-template-columns: minmax(100px, 1fr) minmax(160px, 1.5fr) minmax(100px, 1.05fr) 68px 68px minmax(100px, 0.9fr) minmax(100px, 0.9fr) minmax(90px, 0.85fr) minmax(78px, 0.7fr) 34px;
}
.entry-row input, .entry-row select { padding: 7px 9px; border: 1px solid #d9d9d9; border-radius: 6px; width: 100%; font-size: 13px; box-sizing: border-box; }
.entry-row input.d, .entry-row input.c, .entry-row input.qty, .entry-row input.up {
  text-align: right; font-variant-numeric: tabular-nums;
}
.entry-row .cf-cell { min-width: 0; }
.entry-row select.cf { min-width: 0; background: #f8fffe; }
.entry-row .cf-cell.cf-cell-off {
  visibility: hidden; pointer-events: none;
}
.entry-row .ticket-cell {
  display: flex; flex-direction: column; gap: 3px; align-items: stretch; min-width: 0;
}
.entry-row .ticket-cell.ticket-cell-off {
  visibility: hidden; pointer-events: none;
}
.entry-row .ticket-chk {
  display: inline-flex; align-items: center; gap: 3px; margin: 0;
  font-size: 11px; color: #64748b; white-space: nowrap; cursor: pointer; user-select: none;
}
.entry-row .ticket-chk input { width: 13px; height: 13px; margin: 0; accent-color: #0d9488; flex-shrink: 0; }
.entry-row select.ticket-type { min-width: 0; padding: 3px 4px; font-size: 12px; background: #fffbeb; height: 28px; }
.entry-row .del { background: #ff4d4f; color: #fff; border: none; border-radius: 6px; cursor: pointer; height: 34px; }
.entry-head .h-dc-debit {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap;
}
.dc-guide-switch {
  display: inline-flex; align-items: center; gap: 3px;
  margin: 0; padding: 1px 6px; border: 1px solid #e5e7eb; border-radius: 999px;
  background: #fafafa; font-size: 11px; color: #6b7280; cursor: pointer; user-select: none;
  white-space: nowrap; line-height: 1.2; flex-shrink: 0; font-weight: 400;
}
.dc-guide-switch:hover { border-color: #93c5fd; color: #1677ff; }
.dc-guide-switch input {
  width: 12px; height: 12px; margin: 0; accent-color: #1677ff; cursor: pointer; flex-shrink: 0;
}
#modeModern.dc-guide-on .dc-guide-switch {
  border-color: #91caff; background: #e6f4ff; color: #0958d9;
}
.entry-row .dc-box {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative;
}
.entry-row .dc-hint {
  display: none; font-size: 11px; line-height: 1.2; font-weight: 600; padding: 0 2px;
}
.entry-row .dc-box.has-hint .dc-hint { display: block; }
.entry-row .dc-hint-up { color: #389e0d; }
.entry-row .dc-hint-down { color: #d46b08; }
.entry-row .dc-box.has-hint input.d,
.entry-row .dc-box.has-hint input.c {
  border-color: #91caff;
  background: #f0f7ff;
}
.entry-head {
  display: grid;
  grid-template-columns: minmax(110px, 1.15fr) minmax(180px, 1.7fr) minmax(88px, 0.9fr) minmax(108px, 0.95fr) minmax(108px, 0.95fr) minmax(96px, 0.9fr) minmax(78px, 0.75fr) 34px;
  gap: 8px; margin-bottom: 8px; color: #888; font-size: 12px; align-items: center;
}
.entry-head.show-qty-up {
  grid-template-columns: minmax(100px, 1fr) minmax(160px, 1.5fr) minmax(100px, 1.05fr) 68px 68px minmax(100px, 0.9fr) minmax(100px, 0.9fr) minmax(90px, 0.85fr) minmax(78px, 0.7fr) 34px;
}
.entry-head .h-qty, .entry-head .h-up { display: none; }
.entry-head.show-qty-up .h-qty, .entry-head.show-qty-up .h-up { display: block; }
.entry-row .qty, .entry-row .up { display: none; }
.entry-row.has-inv-item .qty, .entry-row.has-inv-item .up { display: block; }
.entry-row .inv-wrap { min-width: 0; }
.entry-row .inv-wrap-off { color: #9ca3af; font-size: 12px; text-align: center; }
.entry-row .inv-wrap-on .inv-pick { display: block; }
.entry-row .inv-placeholder { display: block; text-align: center; color: #d1d5db; }
.modern-bind-gap { flex: 1; min-width: 8px; }
.bind-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 260px; padding: 4px 10px; border-radius: 999px;
  background: #e6f4ff; color: #0958d9; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bind-chip .bind-x {
  border: 0; background: transparent; color: #1677ff; cursor: pointer; padding: 0 2px; font-size: 14px; line-height: 1;
}
.bind-pick-list { min-height: 280px; max-height: min(420px, calc(100vh - 280px)); overflow: auto; border: 1px solid #e5e7eb; border-radius: 10px; }
.bind-pick-item {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid #f3f4f6; cursor: pointer; font-size: 13px;
}
.bind-pick-item:hover { background: var(--theme-hover-bg, #f5f8ff); }
.bind-pick-item.active,
.bind-pick-item.on {
  background: var(--theme-soft, #e8f1ff);
  outline: 1px solid color-mix(in srgb, var(--theme-primary, #1677ff) 40%, white);
}
.bind-pick-item .bp-main { color: #111827; }
.bind-pick-item .bp-sub { color: #9ca3af; font-size: 12px; margin-top: 2px; }
.bind-inv-parties {
  margin-top: 4px; font-size: 12px; color: var(--theme-ink, #374151); line-height: 1.45; word-break: break-all;
}
.bind-pick-empty { padding: 40px; text-align: center; color: #9ca3af; font-size: 13px; }
.aux-bind-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.aux-bind-tab {
  border: 1px solid #d1d5db; background: #fff; color: #4b5563;
  border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 12px;
}
.aux-bind-tab.active { background: #1677ff; border-color: #1677ff; color: #fff; }
.bind-aux-selected {
  display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; margin-top: 10px;
}
.bind-aux-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  border-radius: 999px; background: #e6f4ff; color: #0958d9; font-size: 12px;
}
.bind-aux-chip button {
  border: 0; background: transparent; color: #1677ff; cursor: pointer; padding: 0 2px; line-height: 1;
}
.bind-aux-empty { color: #9ca3af; font-size: 12px; }
.balance-ok { color: #389e0d; }
.balance-bad { color: #cf1322; font-weight: 600; }
.chip { display: inline-block; padding: 2px 8px; margin: 2px; background: #f0f5ff; border: 1px solid #adc6ff; border-radius: 4px; cursor: pointer; font-size: 12px; }
.chip:hover { background: #1677ff; color: #fff; }
.fav-star { cursor: pointer; color: #faad14; margin-left: 4px; }
@media (max-width: 1200px) {
  .entry-row, .entry-head {
    grid-template-columns: minmax(100px, 1fr) minmax(140px, 1.3fr) minmax(80px, 0.8fr) minmax(96px, 0.9fr) minmax(96px, 0.9fr) minmax(88px, 0.85fr) minmax(72px, 0.7fr) 34px;
  }
  .entry-row.has-inv-item, .entry-head.show-qty-up {
    grid-template-columns: minmax(90px, 0.95fr) minmax(130px, 1.2fr) minmax(90px, 0.95fr) 60px 60px minmax(90px, 0.85fr) minmax(90px, 0.85fr) minmax(80px, 0.8fr) minmax(70px, 0.65fr) 34px;
  }
  .entry-head .h-dc-debit {
    flex-wrap: wrap;
    white-space: normal;
    row-gap: 2px;
  }
}

/* 分页 */
.pagination { margin-top: 16px; text-align: center; }
.pagination button { padding: 4px 10px; margin: 0 4px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; cursor: pointer; }
.pagination button.active { background: var(--theme-primary, #0d9488); color: #fff; border-color: var(--theme-primary, #0d9488); }

.toolbar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.toolbar input, .toolbar select { padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 6px; }
.toolbar input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.toolbar select { height: 34px; box-sizing: border-box; }
.toolbar span.sub-hint { line-height: 34px; margin-top: 0; margin-bottom: 0; }

.chart-toolbar label { color: #666; margin-left: 4px; }
.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn { border-radius: 0; margin: 0; }
.btn-group .btn:first-child { border-radius: 6px 0 0 6px; }
.btn-group .btn:last-child { border-radius: 0 6px 6px 0; }
.btn-group .btn + .btn { border-left: none; }
.chart-wrap { position: relative; min-height: 360px; padding: 8px 4px 4px; }
.chart-pie-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 8px 0; }
.chart-pie-item h3 { text-align: center; font-size: 15px; margin-bottom: 12px; color: #555; }
@media (max-width: 900px) {
  .chart-pie-grid { grid-template-columns: 1fr; }
}

.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-draft { background: #f0f0f0; color: #666; }
.tag-audited { background: #e6f4ff; color: #1677ff; }
.tag-posted { background: #f6ffed; color: #389e0d; }
.tag-void { background: #fff2f0; color: #cf1322; }
.tag-trial { background: #fff7e6; color: #d46b08; }
.tag-accrued { background: #e6f4ff; color: #1677ff; }
.tag-paid { background: #f6ffed; color: #389e0d; }

.money { text-align: right; font-family: Consolas, monospace; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }

/* 登录页备案 */
.auth-page { flex-direction: column; gap: 16px; }
.auth-filing { color: rgba(255,255,255,.85); font-size: 12px; text-align: center; padding: 0 16px 20px; }
.auth-filing a { color: rgba(255,255,255,.9); }
.auth-filing-sep { margin: 0 8px; opacity: .7; }

/* ========== 客户端浅色主题（主色见 theme.css） ========== */
body.client-theme .menu-group-body {
  background: #fff; border: 1px solid #e8ecf2;
  box-shadow: 8px 16px 36px rgba(15,23,42,.12);
  padding: 20px 22px;
}
body.client-theme .menu-sub-title {
  padding: 2px 12px 8px; margin: 0; color: #9ca3af;
  width: 100%; font-size: 12px; font-weight: 600;
  border-radius: 0;
}
body.client-theme .menu-sub a {
  padding: 9px 14px; margin: 1px 0; font-size: 13px;
}
body.client-theme .menu-group-body > a {
  margin: 2px 0; padding: 10px 14px;
}
body.client-theme .feature-locked {
  text-align: center; padding: 64px 24px; color: #6b7280;
}
body.client-theme .feature-locked-icon {
  width: 56px; height: 56px; line-height: 56px; margin: 0 auto 16px;
  border-radius: 14px; background: #f3f4f6; color: #9ca3af; font-size: 22px; font-weight: 700;
}
body.client-theme .feature-locked h2 { margin: 0 0 8px; color: #111827; font-size: 18px; }
body.client-theme .feature-locked p { margin: 0; font-size: 14px; }
body.client-theme .voucher-entry-card { overflow-x: auto; }

/* 简易录入：借/贷分录 */
.simple-entry-card { overflow-x: auto; }
.simple-side {
  margin-top: 14px; border: 1px solid #e8edf3; border-radius: 10px; overflow: hidden;
  background: #fff;
}
.simple-side-debit { border-left: 3px solid #1677ff; }
.simple-side-credit { border-left: 3px solid #52c41a; }
.simple-side-head {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #f8fafc; border-bottom: 1px solid #eef2f7;
}
.simple-side-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; border-radius: 6px; font-weight: 700; font-size: 14px; color: #fff;
}
.simple-side-tag.debit { background: #1677ff; }
.simple-side-tag.credit { background: #52c41a; }
.simple-side-sum { color: #6b7280; font-size: 13px; flex: 1; }
.simple-side-sum b { color: #111827; margin-left: 4px; font-variant-numeric: tabular-nums; }
.simple-side-cols {
  display: grid; grid-template-columns: 1.55fr 132px 1.15fr 86px 40px; gap: 8px;
  padding: 6px 14px; color: #9aa3af; font-size: 12px;
}
.simple-side-body { padding: 0 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.simple-line {
  display: flex; flex-direction: column; gap: 6px;
}
.simple-line-main {
  display: grid; grid-template-columns: 1.55fr 132px 1.15fr 86px 40px; gap: 8px; align-items: center;
}
.simple-line .ticket-cell { gap: 1px; }
.simple-line .ticket-cell.ticket-cell-off { visibility: hidden; pointer-events: none; }
.simple-line .ticket-chk { font-size: 11px; }
.simple-line select.ticket-type { height: 28px; padding: 0 4px; font-size: 12px; }
.simple-line select, .simple-line input {
  width: 100%; height: 36px; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 0 10px; background: #fff; font-size: 13px; box-sizing: border-box;
}
.simple-line select:focus, .simple-line input:focus {
  border-color: #1677ff; outline: none; box-shadow: 0 0 0 2px rgba(22,119,255,.12);
}
.simple-line .money-inp { text-align: right; font-variant-numeric: tabular-nums; }
.simple-inv-wrap.inv-wrap-on {
  display: grid !important;
  grid-template-columns: 1.6fr 90px 90px;
  gap: 8px;
  padding: 0 0 2px 0;
}
.simple-inv-wrap.inv-wrap-on .inv-pick {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 4px;
}
.trad-inv-wrap.inv-wrap-on {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 6px;
}
.trad-inv-wrap.inv-wrap-on .inv-pick {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.trad-inv-wrap .qty, .trad-inv-wrap .up {
  height: 28px; font-size: 12px; padding: 0 6px;
  border: 1px solid #e5e7eb; border-radius: 4px; width: 100%; box-sizing: border-box;
}
.simple-del {
  width: 36px; height: 36px; border: 0; background: transparent;
  color: #9ca3af; cursor: pointer; font-size: 16px; border-radius: 6px;
}
.simple-del:hover { color: #ef4444; background: #fff1f0; }
@media (max-width: 720px) {
  .simple-side-cols, .simple-line-main { grid-template-columns: 1fr; }
  .simple-side-cols .c-op { display: none; }
  .simple-inv-wrap.inv-wrap-on { grid-template-columns: 1fr; }
}

/* 凭证录入方式切换 + 传统凭证 */
.voucher-entry-wrap { display: flex; flex-direction: column; gap: 12px; }
.voucher-mode-bar { margin-bottom: 0; flex-wrap: wrap; }
.voucher-mode-bar .mode-label { color: #6b7280; font-size: 13px; }
.modern-sum-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-top: 10px;
}
.modern-sum-item {
  display: inline-flex; align-items: center; gap: 8px;
}
.modern-sum-lab {
  color: #555; font-size: 13px; white-space: nowrap; line-height: 1;
  padding: 0; margin: 0; min-width: 0;
}
.modern-sum-item input {
  width: 140px; height: 34px; box-sizing: border-box;
  border: 1px solid #d9d9d9; border-radius: 6px;
  padding: 0 10px; font-size: 14px; font-variant-numeric: tabular-nums;
  background: #fafafa; color: #111827; text-align: right;
}
.modern-sum-row .balance-ok,
.modern-sum-row .balance-bad {
  line-height: 34px; font-size: 13px;
}

/* 超易自动录入弹窗 */
.ultra-auto-modal {
  width: min(760px, 96vw); max-height: min(92vh, 920px);
  overflow: auto; padding: 22px 24px 18px;
}
.ultra-entry-card { padding: 20px 24px 24px; }
.ultra-hero h2 { margin: 0 0 6px; font-size: 22px; color: #111827; }
.ultra-hero p { margin: 0 0 18px; color: #6b7280; font-size: 14px; line-height: 1.6; }
.ultra-form { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.ultra-q-lab {
  display: block; font-size: 15px; font-weight: 600; color: #1f2937; margin-bottom: 8px;
}
.ultra-must {
  display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 4px;
  background: #fff1f0; color: #cf1322; font-size: 12px; font-weight: 600;
}
.ultra-q input[type="date"],
.ultra-q input[type="number"],
.ultra-q input[type="text"],
.ultra-q select {
  width: 100%; max-width: 360px; height: 40px; border: 1px solid #d9d9d9;
  border-radius: 8px; padding: 0 12px; font-size: 15px; box-sizing: border-box;
}
.ultra-q input[type="text"] { max-width: 520px; }
.ultra-q input:focus, .ultra-q select:focus {
  border-color: #1677ff; outline: none; box-shadow: 0 0 0 2px rgba(22,119,255,.12);
}
.ultra-amt-wrap { display: flex; align-items: center; gap: 8px; max-width: 360px; }
.ultra-amt-wrap input { flex: 1; max-width: none; }
.ultra-amt-wrap span { color: #6b7280; }
.ultra-radios { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.ultra-radio {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px;
  border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; cursor: pointer;
  font-size: 14px; color: #374151;
}
.ultra-radio:has(input:checked) {
  border-color: #91caff; background: #e6f4ff; color: #0958d9;
}
.ultra-hint { margin: 8px 0 0; color: #9ca3af; font-size: 12px; line-height: 1.5; }
.ultra-preview {
  margin-top: 20px; border: 1px dashed #c5d4ea; border-radius: 12px;
  background: #f8fbff; padding: 16px 18px; min-height: 120px;
}
.ultra-preview-empty { color: #9ca3af; font-size: 14px; padding: 18px 4px; }
.ultra-preview-title { font-weight: 600; color: #1f2937; margin-bottom: 12px; font-size: 14px; }
.ultra-entry-text { display: flex; flex-direction: column; gap: 8px; }
.ultra-line {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid #e8eef6;
  font-size: 14px;
}
.ultra-line em {
  font-style: normal; font-weight: 700; text-align: center; border-radius: 4px; padding: 2px 0;
}
.ultra-line.debit em { color: #1677ff; background: #e6f4ff; }
.ultra-line.credit em { color: #52c41a; background: #f6ffed; }
.ultra-line b { font-variant-numeric: tabular-nums; color: #111827; }
.ultra-preview-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; color: #6b7280; font-size: 13px;
}
.ultra-preview-meta .ok { color: #389e0d; }
.ultra-preview-meta .warn { color: #d46b08; }
.ultra-preview-note { margin: 10px 0 0; color: #9ca3af; font-size: 12px; line-height: 1.5; }
.ultra-actions {
  display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px;
}
.purpose-picker {
  position: relative; width: 100%;
}
.purpose-picker select {
  width: 100% !important; max-width: none !important; padding-right: 78px !important;
  box-sizing: border-box;
}
.purpose-search-btn {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  z-index: 2; border: 0; background: transparent; color: #1677ff;
  font-size: 12px; padding: 0; cursor: pointer; line-height: 1; white-space: nowrap;
}
.purpose-search-btn:hover { color: #0958d9; text-decoration: underline; }
.ultra-purpose-cats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px;
}
.ultra-purpose-cats .ultra-cat {
  border: 1px solid #e5e7eb; background: #fff; color: #4b5563;
  border-radius: 999px; padding: 6px 12px; font-size: 12px; cursor: pointer;
}
.ultra-purpose-cats .ultra-cat.active {
  border-color: #91caff; background: #e6f4ff; color: #0958d9; font-weight: 600;
}
.ultra-purpose-chips {
  display: flex; flex-wrap: wrap; gap: 8px; max-width: 720px;
}
.ultra-chip {
  border: 1px solid #e5e7eb; background: #fff; color: #374151;
  border-radius: 10px; padding: 8px 12px; font-size: 13px; cursor: pointer;
  line-height: 1.3; text-align: left;
}
.ultra-chip:hover { border-color: #91caff; background: #f0f7ff; }
.ultra-chip.active {
  border-color: #1677ff; background: #e6f4ff; color: #0958d9; font-weight: 600;
  box-shadow: 0 0 0 2px rgba(22,119,255,.12);
}
.ultra-inv-row {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 520px;
}
.ultra-inv-row select { flex: 1; min-width: 200px; max-width: none !important; }
.ultra-preview-empty a { color: #1677ff; }

/* 顶部帮助 ? */
.help-tip {
  position: relative; display: inline-flex; align-items: center; cursor: default;
  margin-left: 4px; outline: none;
}
.help-tip-icon {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid #91caff; background: #e6f4ff; color: #1677ff;
  font-size: 12px; font-weight: 700; line-height: 16px; text-align: center;
}
.help-tip-pop {
  display: none; position: absolute; left: 50%; top: calc(100% + 8px);
  transform: translateX(-50%); z-index: 50; width: max-content; max-width: 380px;
  padding: 10px 12px; border-radius: 8px; background: #111827; color: #fff;
  font-size: 12px; line-height: 1.6; box-shadow: 0 8px 20px rgba(0,0,0,.18);
  white-space: normal; pointer-events: none;
}
.help-tip-pop::before {
  content: ''; position: absolute; left: 50%; top: -5px; transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px; background: #111827;
}
.help-tip:hover .help-tip-pop, .help-tip:focus .help-tip-pop { display: block; }

/* 科目选择：下拉 + 搜索科目 */
.acc-picker {
  position: relative; width: 100%; min-width: 0;
}
.acc-picker .acc-sel {
  width: 100%; padding-right: 72px !important; box-sizing: border-box;
}
.acc-picker .acc-search-btn {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  z-index: 2; border: 0; background: transparent; color: #1677ff;
  font-size: 12px; padding: 0; cursor: pointer; line-height: 1; white-space: nowrap;
}
.acc-picker .acc-search-btn:hover { color: #0958d9; text-decoration: underline; }
.entry-row .acc-picker, .simple-line .acc-picker, .trad-table .acc-picker { width: 100%; }
.trad-table .col-acc .acc-picker .acc-sel {
  width: 100%; height: 100%; min-height: 34px; border: 0; outline: none;
  background: transparent; padding: 0 72px 0 8px !important; font-size: 13px;
}
.simple-line .acc-picker .acc-sel {
  height: 36px; border: 1px solid #e5e7eb; border-radius: 6px;
}

/* 搜索科目弹窗 */
.acc-search-modal {
  max-width: 760px; width: 100%;
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}
.acc-search-kw {
  width: 100%; height: 38px; border: 1px solid #d9d9d9; border-radius: 8px;
  padding: 0 12px; margin: 8px 0 12px; font-size: 14px; box-sizing: border-box;
  flex-shrink: 0;
}
.acc-search-kw:focus { border-color: #1677ff; outline: none; box-shadow: 0 0 0 2px rgba(22,119,255,.12); }
.acc-search-body {
  display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0;
  border: 1px solid #e5e7eb; border-radius: 10px;
  min-height: 280px;
  height: min(420px, calc(100vh - 260px));
  max-height: min(420px, calc(100vh - 260px));
  overflow: hidden;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
}
.acc-search-cats {
  background: #f8fafc; border-right: 1px solid #eef2f7;
  display: flex; flex-direction: column; padding: 8px;
  overflow: auto; min-height: 0; min-width: 0;
}
.acc-cat {
  border: 0; background: transparent; text-align: left; padding: 10px 12px;
  border-radius: 8px; color: #4b5563; cursor: pointer; font-size: 13px;
  flex: 0 0 auto;
}
.acc-cat:hover { background: #eef5ff; color: #1677ff; }
.acc-cat.active { background: #e8f1ff; color: #1677ff; font-weight: 600; }
.acc-search-list {
  overflow-x: hidden; overflow-y: scroll; padding: 6px; background: #fff;
  min-height: 0; min-width: 0; height: 100%;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  touch-action: pan-y;
}
.acc-search-item {
  display: grid; grid-template-columns: 88px 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.acc-search-item:hover { background: #f5f8ff; }
.acc-search-item.active { background: #e8f1ff; outline: 1px solid #91caff; }
.acc-search-item .acc-code { color: #1677ff; font-variant-numeric: tabular-nums; font-weight: 600; }
.acc-search-item .acc-name { color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-search-item .acc-cat-tag { color: #9ca3af; font-size: 12px; }
.acc-search-empty { padding: 40px; text-align: center; color: #9ca3af; font-size: 13px; }
.trad-paper {
  background: #fff; border: 1px solid #d6e0ea; border-radius: 8px;
  padding: 18px 20px 16px; box-shadow: 0 4px 16px rgba(15,23,42,.04);
  overflow-x: auto;
}
.trad-title {
  text-align: center; font-size: 26px; font-weight: 700; color: #1f2937;
  letter-spacing: .2em; margin: 0;
}
.trad-period { text-align: center; color: #6b7280; font-size: 13px; margin: 4px 0 14px; }
.trad-meta {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap; font-size: 13px; color: #4b5563;
}
.trad-meta label { margin: 0 4px 0 10px; }
.trad-meta-left, .trad-meta-right { display: flex; align-items: center; gap: 6px; }
.trad-meta select, .trad-meta input[type="date"], .trad-meta input[type="number"], .trad-meta .trad-no {
  height: 30px; border: 1px solid #d1d5db; border-radius: 4px; padding: 0 8px; background: #fff;
}
.trad-no { width: 64px; text-align: center; background: #f9fafb !important; }
.trad-att { width: 56px; text-align: center; }
.trad-clip { font-size: 16px; opacity: .55; cursor: default; }
.trad-table-wrap { min-width: 980px; }
.trad-table {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  border: 1.5px solid #5b8fd9; font-size: 13px; color: #1f2937;
}
.trad-table th, .trad-table td {
  border: 1px solid #9ec0e8; padding: 0; text-align: center; vertical-align: middle;
  height: 36px;
}
.trad-table thead th {
  background: #f7fafc; font-weight: 600; color: #374151; height: 30px;
}
.trad-table .col-no { width: 44px; }
.trad-table .col-sum { width: 18%; }
.trad-table .col-acc { width: 22%; }
.trad-table .col-deb { border-bottom: none; color: #1d4ed8; }
.trad-table .col-cred { border-bottom: none; color: #1d4ed8; border-left: 2px solid #3b82f6; }
.trad-units th {
  width: 22px; font-size: 11px; font-weight: 500; color: #6b7280; height: 24px;
  background: #f3f7fc;
}
.trad-units th:nth-child(9),
.trad-units th:nth-child(20) { border-right: 2px solid #ef4444; } /* 元|角 */
.trad-units th:nth-child(4),
.trad-units th:nth-child(8),
.trad-units th:nth-child(15),
.trad-units th:nth-child(19) { border-right: 1.5px solid #60a5fa; }
.trad-units th:nth-child(12) { border-left: 2px solid #3b82f6; }
.trad-table .col-op { width: 32px; border-left: 1px solid #9ec0e8; }
.trad-table .col-sum input,
.trad-table .col-acc select {
  width: 100%; height: 100%; min-height: 34px; border: 0; outline: none;
  background: transparent; padding: 0 8px; font-size: 13px; box-sizing: border-box;
}
.trad-table .col-sum input { text-align: left; }
.trad-table .col-acc select { text-align: left; }
.trad-money-cell { padding: 0 !important; position: relative; }
.mg { position: relative; height: 36px; }
.mg-input {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%;
  border: 0; outline: none; background: transparent; color: transparent;
  caret-color: transparent; text-align: right; padding: 0 4px; font-size: 13px;
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.mg-input:focus { background: rgba(22,119,255,.06); color: #111827; caret-color: #1677ff !important; }
.mg:focus-within .mg-digits { opacity: 0; }

/* 凭证纯文字分录预览 */
.entry-text-preview {
  margin-top: 16px; border: 1px dashed #c5d4ea; border-radius: 10px;
  background: #f8fbff; padding: 14px 16px;
}
.common-entry-panel {
  margin-top: 4px; padding: 16px 18px 18px;
  background: #fff; border: 1px solid #e8edf3; border-radius: 12px;
}
.common-entry-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.common-entry-head h3 {
  margin: 0 0 4px; font-size: 15px; font-weight: 600; color: #111827;
}
.common-entry-head p {
  margin: 0; font-size: 12px; color: #9ca3af;
}
.common-entry-tabs {
  display: inline-flex; align-items: center; gap: 0;
  margin: 0 0 12px; padding: 3px; border-radius: 8px;
  background: #f3f4f6; border: 1px solid #e5e7eb;
}
.common-entry-tab {
  border: 0; background: transparent; color: #6b7280;
  border-radius: 6px; padding: 5px 14px; cursor: pointer;
  font-size: 13px; line-height: 1.2; transition: background .15s, color .15s;
}
.common-entry-tab:hover { color: #1677ff; }
.common-entry-tab.active {
  background: #fff; color: #1677ff; font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}
.common-entry-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.common-entry-card {
  text-align: left; cursor: pointer;
  border: 1px solid #e5e7eb; border-radius: 10px;
  background: #fafbfc; padding: 12px 14px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.common-entry-card:hover {
  border-color: #91caff; background: #f0f7ff;
  box-shadow: 0 2px 8px rgba(22, 119, 255, .08);
}
.common-entry-card:active { transform: translateY(1px); }
.common-entry-card .ce-name {
  font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 6px;
}
.common-entry-card .ce-lines {
  display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #6b7280;
  line-height: 1.45;
}
.common-entry-card .ce-lines .ce-d { color: #1677ff; }
.common-entry-card .ce-lines .ce-c { color: #389e0d; }
.common-entry-card .ce-tag {
  display: inline-block; margin-top: 8px; font-size: 11px;
  color: #8c8c8c; background: #f3f4f6; border-radius: 4px; padding: 1px 6px;
}
.common-entry-card.is-tpl .ce-tag { color: #0958d9; background: #e6f4ff; }
.common-entry-empty {
  grid-column: 1 / -1; padding: 20px; text-align: center;
  color: #9ca3af; font-size: 13px;
}
.entry-text-preview-title { font-weight: 600; color: #1f2937; margin-bottom: 10px; font-size: 13px; }
.entry-text-preview-empty { color: #9ca3af; font-size: 13px; padding: 8px 0; }
.entry-text-preview-line {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; margin-bottom: 6px; border-radius: 8px; background: #fff;
  border: 1px solid #e8eef6; font-size: 13px;
}
.entry-text-preview-line em {
  font-style: normal; font-weight: 700; text-align: center; border-radius: 4px; padding: 2px 0;
}
.entry-text-preview-line.debit em { color: #1677ff; background: #e6f4ff; }
.entry-text-preview-line.credit em { color: #52c41a; background: #f6ffed; }
.entry-text-preview-line b { font-variant-numeric: tabular-nums; }
.entry-text-preview-sum { margin-top: 8px; color: #6b7280; font-size: 12px; }
.mg-digits {
  position: absolute; inset: 0; z-index: 1; display: grid;
  grid-template-columns: repeat(11, 1fr); pointer-events: none;
  font-variant-numeric: tabular-nums; font-family: Consolas, "Courier New", monospace;
  font-size: 14px; font-weight: 600; color: #111827;
}
.mg-digits i {
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid #c5daf3; height: 100%;
}
.mg-digits i:last-child { border-right: none; }
.mg-digits i.after-yuan { border-right: 2px solid #ef4444; }
.mg-digits i.after-group { border-right: 1.5px solid #60a5fa; }
.trad-total td { background: #fffbe6; height: 40px; }
.trad-total-label {
  text-align: left !important; padding-left: 16px !important;
  font-weight: 600; color: #374151;
}
.trad-total .mg-digits { position: relative; }
.trad-del {
  border: 0; background: transparent; color: #9ca3af; cursor: pointer;
  font-size: 16px; line-height: 1; width: 100%; height: 100%;
}
.trad-del:hover { color: #ef4444; background: #fff1f0; }
.trad-actions {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
}
.trad-hint { color: #9ca3af; font-size: 12px; }
.balance-bad { color: #ff4d4f; }
body.client-theme .mi {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
body.client-theme .mi.c1 { background: #1677ff; }
body.client-theme .mi.c2 { background: #13c2c2; }
body.client-theme .mi.c3 { background: #52c41a; }
body.client-theme .mi.c4 { background: #faad14; }
body.client-theme .mi.c5 { background: #722ed1; }
body.client-theme .mi.c6 { background: #eb2f96; }
body.client-theme .mi.c7 { background: #2f54eb; }
body.client-theme .mi.c8 { background: #fa541c; }
body.client-theme .mi.c9 { background: #08979c; }
/* topbar / content / card 主色样式由 theme.css 接管 */

/* 首页 */
.home-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(105deg, #fffaf0 0%, #fff7e6 55%, #fff1eb 100%);
  border: 1px solid #ffe2b8;
  color: #9a3412; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px;
  box-shadow: 0 6px 18px rgba(251, 146, 60, .08);
}
.home-banner > span { flex: 1; min-width: 0; line-height: 1.5; color: #9a3412; }
a.home-banner-btn,
.home-banner-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  height: 34px; padding: 0 16px; border-radius: 999px;
  border: none !important;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #fff !important;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  box-shadow: 0 6px 14px rgba(234, 88, 12, .28);
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
a.home-banner-btn:hover,
.home-banner-btn:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%) !important;
  color: #fff !important;
  filter: brightness(1.03);
  box-shadow: 0 8px 18px rgba(234, 88, 12, .34);
  transform: translateY(-1px);
  text-decoration: none !important;
}
a.home-banner-btn:active,
.home-banner-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(234, 88, 12, .22);
}
.home-section { margin-bottom: 18px; }
.home-section-title, .home-card-title {
  font-size: 15px; font-weight: 600; color: #1f2937; margin-bottom: 12px;
}
.home-quick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px;
  background: #fff; border: 1px solid #eef0f4; border-radius: 12px; padding: 16px;
  box-shadow: 0 4px 16px rgba(15,23,42,.04);
}
.home-quick {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #4b5563; font-size: 12px; text-decoration: none; padding: 6px 0;
}
.home-quick:hover { color: #1677ff; text-decoration: none; }
.hq-ico {
  width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 6px 14px rgba(22,119,255,.18);
}
.hq-ico.c-blue { background: linear-gradient(135deg,#1677ff,#69b1ff); }
.hq-ico.c-cyan { background: linear-gradient(135deg,#13c2c2,#36cfc9); }
.hq-ico.c-green { background: linear-gradient(135deg,#52c41a,#95de64); }
.hq-ico.c-orange { background: linear-gradient(135deg,#fa8c16,#ffc069); }
.hq-ico.c-purple { background: linear-gradient(135deg,#722ed1,#b37feb); }
.hq-ico.c-pink { background: linear-gradient(135deg,#eb2f96,#ff85c0); }
.hq-ico.c-teal { background: linear-gradient(135deg,#08979c,#5cdbd3); }

.home-mid-grid {
  display: grid; grid-template-columns: 240px 340px 1fr; gap: 16px; margin-bottom: 16px;
}
.home-voucher-card {
  border-radius: 14px; padding: 22px 18px; color: #fff;
  background: linear-gradient(145deg, #4c8dff 0%, #1677ff 55%, #0958d9 100%);
  box-shadow: 0 10px 24px rgba(22,119,255,.28); display: flex; flex-direction: column;
}
.home-voucher-label { opacity: .9; font-size: 14px; }
.home-voucher-num { font-size: 48px; font-weight: 700; line-height: 1.1; margin-top: 8px; }
.home-voucher-unit { opacity: .85; margin-bottom: 18px; }
.home-voucher-actions { display: flex; gap: 8px; margin-top: auto; }
.home-voucher-actions .btn { flex: 1; text-align: center; text-decoration: none; }
.home-voucher-actions .btn-default { background: #fff; color: #1677ff; border: none; }
.home-voucher-actions .btn-primary { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.55); }
.home-fund-card { margin-bottom: 0; }
.home-fund-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.home-fund-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.home-fund-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.home-fund-item .lab { color: #6b7280; }
.home-fund-item .amt { font-weight: 600; color: #111827; font-variant-numeric: tabular-nums; min-width: 84px; text-align: right; display: inline-block; }

/* 待办事项 */
.home-todo-card { margin-bottom: 0; }
.home-todo-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.home-todo-head h3 { margin: 0; font-size: 15px; color: #111827; }
.home-todo-badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.home-todo-list { display: flex; flex-direction: column; gap: 6px; }
.home-todo-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #eef2f7; border-radius: 10px; background: #fff; color: #374151; font-size: 13px; text-decoration: none; }
.home-todo-item:hover { border-color: #d6dbe1; background: #f8fafc; }
.home-todo-item b { color: #111827; }
.home-todo-item .dot { width: 6px; height: 6px; border-radius: 50%; background: #ef4444; flex-shrink: 0; }
.home-todo-empty { color: #9ca3af; font-size: 13px; padding: 14px; text-align: center; }

.home-bottom-grid {
  display: grid; grid-template-columns: 1.4fr .9fr; gap: 16px;
}
.home-chart-card, .home-tax-card { margin-bottom: 0; min-height: 420px; }
.chart-series-row {
  display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 2px 0 10px; align-items: center;
}
.series-check {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  color: #6b7280; font-size: 13px; user-select: none;
}
.series-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.series-check i {
  width: 16px; height: 16px; border: 1.5px solid #c5cdd8; border-radius: 3px;
  background: #fff; box-sizing: border-box; position: relative; flex-shrink: 0;
}
.series-check.on { color: #111827; }
.series-check.on i {
  border-color: #1677ff; background: #1677ff;
}
.series-check.on i::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.home-chart-summary {
  display: flex; flex-wrap: wrap; gap: 16px 24px; color: #6b7280; font-size: 13px; margin: 4px 0 8px;
}
.home-chart-summary b { color: #111827; margin-left: 4px; }
.home-tax-list { display: flex; flex-direction: column; gap: 12px; }
.home-tax-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; background: #f8fafc; border-radius: 10px; border: 1px solid #eef2f7;
}
.home-tax-item span { color: #4b5563; }
.home-tax-item b { color: #111827; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .home-mid-grid, .home-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body.client-theme .sidebar { width: 160px; }
  .home-quick-grid { grid-template-columns: repeat(4, 1fr); }
}

/* 通用拖拽上传：透明 file 只盖提示区，列表在上层才能点 X 删除 */
.ca-drop {
  flex: 1; position: relative; min-width: 0;
  display: flex; flex-direction: column;
}
.ca-drop input[type=file] {
  position: absolute; left: 0; right: 0; top: 0; bottom: auto;
  height: 100%; max-height: 120px; opacity: 0; cursor: pointer; z-index: 2;
}
.ca-drop-hint {
  position: relative; z-index: 1;
  border: 1.5px dashed #d8eee9; border-radius: 14px; padding: 28px 16px;
  text-align: center; color: #134e4a; font-size: 14px; background: linear-gradient(180deg,#fafefd 0%,#f3fffb 100%);
  line-height: 1.65; transition: border-color .15s, background .15s, box-shadow .15s;
}
.ca-drop-hint strong { display: block; font-size: 15px; margin-bottom: 4px; }
.ca-drop-hint span { display: block; margin-top: 4px; font-size: 12px; color: #94a3b8; }
.ca-drop.dragover .ca-drop-hint {
  border-color: #0d9488; background: #f0fdfa; box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.ca-drop-list {
  position: relative; z-index: 5;
  margin-top: 10px; max-height: 160px; overflow: auto;
  border: 1px solid #e8f5f1; border-radius: 10px; background: #fff;
  pointer-events: auto;
}
.ca-drop-item {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 8px 12px; font-size: 13px; border-bottom: 1px solid #f0f7f5; color: #134e4a;
}
.ca-drop-item:last-child { border-bottom: 0; }
.ca-drop-item .rm {
  border: 0; background: transparent; color: #94a3b8; cursor: pointer;
  font-size: 18px; line-height: 1; padding: 2px 8px; position: relative; z-index: 6;
}
.ca-drop-item .rm:hover { color: #dc2626; }
.ca-drop-empty { padding: 10px 12px; color: #94a3b8; font-size: 12px; }

.ca-tip-mask {
  position: fixed; inset: 0; z-index: 12000; background: rgba(15,23,42,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ca-tip-card {
  width: min(440px, 94vw); background: #fff; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15,23,42,.22); padding: 22px 22px 18px; border: 1px solid #e8f5f1;
}
.ca-tip-card h3 { margin: 0 0 10px; font-size: 17px; color: #134e4a; }
.ca-tip-card p { margin: 0 0 8px; color: #475569; font-size: 14px; line-height: 1.7; }
.ca-tip-card .ca-tip-list { margin: 10px 0 0; padding: 0; list-style: none; max-height: 180px; overflow: auto; }
.ca-tip-card .ca-tip-list li {
  padding: 8px 10px; margin-bottom: 6px; border-radius: 8px; background: #fffbeb;
  border: 1px solid #fde68a; color: #92400e; font-size: 13px;
}
.ca-tip-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ca-tip-actions .btn-primary {
  background: var(--theme-primary, #0d9488) !important;
  color: #fff !important;
  border: none !important;
  min-width: 88px;
}

/* 顶部导轨导航（会计 / 进销存 / 员工管理） */
.top-rails { display: inline-flex; gap: 0; height: 56px; margin-right: 12px; align-items: center; }
.top-rail-btn {
  position: relative;
  height: 56px;
  padding: 0 20px;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: #6b7280;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.4px;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.top-rail-btn:hover { color: var(--theme-primary, #1677ff); background: rgba(0,0,0,0.02); }
.top-rail-btn.active { color: var(--theme-primary, #1677ff); font-weight: 600; border-bottom-color: var(--theme-primary, #1677ff); background: rgba(0,0,0,0.01); }

/* 右上角统一按钮样式（与“消息”按钮一致） */
.top-notify-btn { height: 30px; padding: 0 10px; border-radius: 6px; border: 1px solid #e5e7eb; background: #fff; color: #374151; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.top-notify-btn:hover { border-color: #93c5fd; color: #1677ff; background: #f8fafc; }
.top-logout.top-notify-btn { color: #ef4444; }
.top-logout.top-notify-btn:hover { color: #dc2626; background: #fef2f2; border-color: #fecaca; }

.d-none { display: none !important; }
