  /* ================= 全局基础 ================= */
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { height: 100%; }
  body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: #1f2937;
    background: #f4f6f9;
  }
  .hidden { display: none !important; }
  a { text-decoration: none; color: inherit; }
  ul { list-style: none; }

  /* ================= 通用组件 ================= */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent;
    font-size: 13px; cursor: pointer; transition: all .15s; white-space: nowrap;
    background: #fff; color: #374151; border-color: #d1d5db;
  }
  .btn:hover { border-color: #3b82f6; color: #2563eb; }
  .btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
  .btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
  .btn-danger { color: #dc2626; border-color: #fca5a5; }
  .btn-danger:hover { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
  .btn-success { color: #16a34a; border-color: #86efac; }
  .btn-success:hover { background: #f0fdf4; border-color: #16a34a; color: #16a34a; }
  .btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 5px; }
  .btn-text { border: none; background: transparent; color: #2563eb; padding: 0 6px; height: auto; }
  .btn-text.danger { color: #dc2626; }
  .btn-text:hover { text-decoration: underline; color: #1d4ed8; }
  .btn-text:disabled { color: #9ca3af; cursor: not-allowed; text-decoration: none; }

  .form-item { display: flex; flex-direction: column; gap: 6px; }
  .form-item label { font-size: 13px; color: #374151; font-weight: 500; }
  .form-item label .req { color: #dc2626; margin-right: 2px; }
  .form-item .tip { font-size: 12px; color: #9ca3af; font-weight: 400; }
  .input, .select, .textarea {
    height: 34px; padding: 0 10px; border: 1px solid #d1d5db; border-radius: 6px;
    font-size: 13px; color: #1f2937; background: #fff; outline: none; width: 100%;
    transition: border-color .15s, box-shadow .15s; font-family: inherit;
  }
  .input:focus, .select:focus, .textarea:focus {
    border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12);
  }
  .textarea { height: 68px; padding: 8px 10px; resize: vertical; }
  .input:disabled, .select:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }
  /* 行内编辑：校验错误标红 + 行级错误提示 */
  .input.input-error, .select.input-error { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,.10) !important; }
  .row-error-tip td { background: #fef2f2 !important; color: #b91c1c; font-size: 12px; padding: 8px 12px !important; white-space: normal; }
  .who-note { color: #9ca3af; font-size: 12px; margin-left: 3px; }
  .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
  .detail-grid .dg-item { font-size: 13px; color: #111827; }
  .detail-grid .dg-item label { display: block; color: #9ca3af; font-size: 12px; margin-bottom: 3px; }
  .detail-grid .dg-item span { color: #111827; }
  .detail-grid .dg-full { grid-column: 1 / -1; }
  .acct-balance, .acct-balance-flow { font-weight: 600; cursor: default; white-space: nowrap; }
  .acct-balance.neg, .acct-balance-flow.neg { color: #dc2626; }
  .calc-note { color: #9ca3af; font-size: 11px; font-weight: 400; margin-left: 3px; cursor: help; }

  /* ================= 菜单管理：可拖拽树 ================= */
  .mtree { padding: 4px 2px; }
  .mtree-row {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 4px 0;
    border: 1px solid #eef0f3; border-radius: 8px; background: #fff; cursor: grab;
    transition: border-color .12s, box-shadow .12s, background .12s;
  }
  .mtree-row:hover { border-color: #c7d6f5; }
  .mtree-row.dragging { opacity: .35; }
  .mtree-row.drop-child { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 2px rgba(37,99,235,.15); }
  .mtree-row.drop-before { box-shadow: 0 -3px 0 #2563eb; }
  .mtree-row.drop-after { box-shadow: 0 3px 0 #2563eb; }
  .mtree-toggle { width: 16px; text-align: center; color: #6b7280; cursor: pointer; font-size: 12px; user-select: none; flex-shrink: 0; }
  .mtree-name { font-size: 13.5px; color: #1f2937; font-weight: 500; }
  .mtree-node.is-group > .mtree-row .mtree-name { font-weight: 600; }
  .mtree-actions { margin-left: auto; display: flex; gap: 2px; align-items: center; flex-shrink: 0; }
  .mtree-children { margin-left: 26px; border-left: 1px dashed #e5e7eb; padding-left: 8px; }

  /* 状态标签 */
  .tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; font-weight: 500; }
  .tag-pending { background: #fef3c7; color: #b45309; }
  .tag-approved { background: #dcfce7; color: #15803d; }
  .tag-rejected { background: #fee2e2; color: #b91c1c; }
  .tag-reversed { background: #ede9fe; color: #6d28d9; }
  .tag-closed { background: #dbeafe; color: #1d4ed8; }
  .tag-migrated { background: #e5e7eb; color: #4b5563; }
  .tag-in { background: #ecfdf5; color: #059669; border: 1px solid #a7f3d0; }
  .tag-out { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
  .dot { width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; display: inline-block; }

  /* 卡片 */
  .card {
    background: #fff; border-radius: 10px; border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
  }
  .card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid #f0f1f3;
  }
  .card-head h3 { font-size: 15px; font-weight: 600; color: #111827; }
  .card-head .sub { font-size: 12px; color: #9ca3af; margin-left: 10px; font-weight: 400; }
  .card-body { padding: 18px; }

  /* 表格 */
  table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
  .tbl th {
    background: #f8f9fb; color: #6b7280; font-weight: 500; text-align: left;
    padding: 10px 12px; border-bottom: 1px solid #e5e7eb; white-space: nowrap;
  }
  .tbl td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; color: #374151; white-space: nowrap; }
  .tbl tbody tr:hover { background: #f8faff; }
  .tbl .num { font-variant-numeric: tabular-nums; font-family: "JetBrains Mono", Consolas, monospace; }
  .tbl .money-in { color: #059669; font-weight: 600; }
  .tbl .money-out { color: #e11d48; font-weight: 600; }
  .tbl .diff-bad { background: #fef2f2 !important; color: #b91c1c; font-weight: 600; }
  .tbl-center { text-align: center; }
  .tbl-center th { text-align: center; }

  /* 弹窗 */
  .modal-mask {
    position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100;
    display: flex; align-items: center; justify-content: center;
  }
  .modal {
    background: #fff; border-radius: 12px; width: 520px; max-width: 92vw;
    box-shadow: 0 20px 50px rgba(15,23,42,.25); animation: pop .18s ease;
  }
  @keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #f0f1f3; }
  .modal-head h3 { font-size: 15px; font-weight: 600; }
  .modal-close { border: none; background: none; font-size: 20px; color: #9ca3af; cursor: pointer; line-height: 1; }
  .modal-close:hover { color: #374151; }
  .modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
  .modal-foot { padding: 14px 20px; border-top: 1px solid #f0f1f3; display: flex; justify-content: flex-end; gap: 10px; }

  /* 分页 */
  .pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; font-size: 13px; color: #6b7280; }
  .page-btns { display: flex; gap: 6px; }
  .page-btn {
    min-width: 30px; height: 30px; border-radius: 6px; border: 1px solid #d1d5db; background: #fff;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-size: 13px; color: #374151;
  }
  .page-btn.active { background: #2563eb; border-color: #2563eb; color: #fff; }
  .page-btn:hover:not(.active):not(:disabled) { border-color: #3b82f6; color: #2563eb; }
  .page-btn:disabled { color: #d1d5db; cursor: not-allowed; }

  /* Toast */
  #toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%) translateY(-80px);
    background: #111827; color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13px;
    z-index: 200; transition: transform .25s ease; box-shadow: 0 8px 24px rgba(15,23,42,.3);
    display: flex; align-items: center; gap: 8px;
  }
  #toast.show { transform: translateX(-50%) translateY(0); }
  #toast .ico { color: #34d399; }

  /* ================= 登录页 ================= */
  .login-page {
    position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  }
  .login-deco { position: absolute; border-radius: 50%; background: rgba(255,255,255,.06); }
  .login-deco.d1 { width: 420px; height: 420px; top: -140px; right: -100px; }
  .login-deco.d2 { width: 300px; height: 300px; bottom: -100px; left: -80px; }
  .login-box {
    position: relative; width: 400px; background: #fff; border-radius: 14px;
    padding: 40px 36px 34px; box-shadow: 0 24px 60px rgba(15,23,42,.35);
  }
  .login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; }
  .login-logo .mark {
    width: 52px; height: 52px; border-radius: 12px; background: linear-gradient(135deg, #2563eb, #3b82f6);
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; font-weight: 700;
  }
  .login-logo h1 { font-size: 20px; color: #111827; letter-spacing: 1px; }
  .login-logo p { font-size: 12px; color: #9ca3af; }
  .login-form { display: flex; flex-direction: column; gap: 16px; }
  .login-extra { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #6b7280; }
  .login-extra label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
  .login-extra a { color: #2563eb; }
  .login-btn { height: 40px; font-size: 14px; border-radius: 8px; }
  .login-foot { margin-top: 22px; text-align: center; font-size: 12px; color: #c7cbd4; }
  .login-banner {
    position: absolute; left: 10%; top: 50%; transform: translateY(-50%);
    color: #fff; max-width: 420px; display: none;
  }
  .login-banner h2 { font-size: 30px; line-height: 1.5; margin-bottom: 14px; }
  .login-banner p { font-size: 14px; opacity: .8; line-height: 1.8; }
  @media (min-width: 1100px) { .login-banner { display: block; } }

  /* ================= 应用框架 ================= */
  .app { display: flex; height: 100vh; overflow: hidden; }
  .sidebar {
    width: 220px; background: #16213a; color: #cbd5e1; display: flex; flex-direction: column;
    flex-shrink: 0;
  }
  .side-logo {
    height: 60px; display: flex; align-items: center; gap: 10px; padding: 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.08); color: #fff;
  }
  .side-logo .mark {
    width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #2563eb, #3b82f6);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0;
  }
  .side-logo .name { font-size: 14px; font-weight: 600; letter-spacing: .5px; }
  .side-logo .name small { display: block; font-size: 10px; font-weight: 400; color: #64748b; letter-spacing: 1px; }
  .side-menu { flex: 1; padding: 12px 10px; overflow-y: auto; }
  .menu-group-title { font-size: 11px; color: #475569; padding: 12px 10px 6px; letter-spacing: 1px; }
  .menu-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
    font-size: 13.5px; cursor: pointer; margin-bottom: 2px; transition: background .15s, color .15s;
    position: relative;
  }
  .menu-item .ico { width: 18px; text-align: center; font-size: 15px; opacity: .85; }
  .menu-item:hover { background: rgba(255,255,255,.06); color: #fff; }
  .menu-item.active { background: #2563eb; color: #fff; font-weight: 500; }
  .menu-item .badge {
    margin-left: auto; background: #ef4444; color: #fff; font-size: 11px; min-width: 18px; height: 18px;
    border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
  }
  .menu-item .sub-arrow { margin-left: auto; font-size: 10px; opacity: .7; }
  .submenu { display: none; margin: 0 0 4px; }
  .submenu.open { display: block; }
  .sub-item {
    font-size: 12.5px; color: #94a3b8; padding: 7px 10px 7px 42px; cursor: pointer;
    border-radius: 6px; margin-bottom: 1px; transition: background .15s, color .15s;
  }
  .sub-item:hover { color: #fff; background: rgba(255,255,255,.06); }
  .sub-item.active { color: #fff; background: rgba(37,99,235,.35); }
  .side-user {
    padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; gap: 10px;
  }
  .avatar {
    width: 34px; height: 34px; border-radius: 50%; background: #334155; color: #93c5fd;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0;
  }
  .side-user .info { font-size: 13px; color: #e2e8f0; line-height: 1.4; }
  .side-user .info small { color: #64748b; font-size: 11px; display: block; }
  .side-user .logout { margin-left: auto; color: #64748b; cursor: pointer; font-size: 16px; background: none; border: none; }
  .side-user .logout:hover { color: #f87171; }

  .main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  .topbar {
    height: 60px; background: #fff; border-bottom: 1px solid #e5e7eb;
    display: flex; align-items: center; padding: 0 24px; gap: 8px; flex-shrink: 0;
  }
  .crumb { font-size: 13px; color: #9ca3af; display: flex; align-items: center; gap: 8px; }
  .crumb .cur { color: #111827; font-weight: 600; }
  .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
  .topbar-right .env-tag {
    font-size: 11px; color: #d97706; background: #fef3c7; border: 1px solid #fde68a;
    padding: 2px 10px; border-radius: 10px;
  }
  .icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; cursor: pointer; position: relative; font-size: 15px; }
  .icon-btn:hover { border-color: #3b82f6; }
  .icon-btn .red-dot { position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

  .content { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
  .page { display: none; }
  .page.active { display: block; animation: fadein .2s ease; }
  @keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  .page-title-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .page-title-bar h2 { font-size: 18px; color: #111827; }
  .page-title-bar .desc { font-size: 12px; color: #9ca3af; margin-top: 4px; }

  /* ================= 工作台 ================= */
  .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
  .stat-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; }
  .stat-card .label { font-size: 13px; color: #6b7280; display: flex; align-items: center; gap: 6px; }
  .stat-card .value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
  .stat-card .foot { font-size: 12px; color: #9ca3af; }
  .stat-card .corner { position: absolute; right: -18px; top: -18px; width: 76px; height: 76px; border-radius: 50%; opacity: .08; }
  .v-blue { color: #2563eb; } .v-green { color: #059669; } .v-red { color: #e11d48; } .v-amber { color: #d97706; }
  .bg-blue { background: #2563eb; } .bg-green { background: #059669; } .bg-red { background: #e11d48; } .bg-amber { background: #d97706; }
  .work-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
  .todo-list li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px dashed #f0f1f3; font-size: 13px; }
  .todo-list li:last-child { border-bottom: none; }
  .todo-list .t-time { color: #9ca3af; font-size: 12px; margin-left: auto; flex-shrink: 0; }
  .quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .quick-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px;
    border: 1px solid #eef0f3; border-radius: 10px; cursor: pointer; transition: all .15s; background: #fafbfc;
  }
  .quick-item:hover { border-color: #3b82f6; background: #f0f6ff; transform: translateY(-2px); }
  .quick-item .qi { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
  .quick-item span { font-size: 12.5px; color: #374151; }

  /* ================= 录入 / 筛选表单区 ================= */
  .form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .form-grid-4 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: end; }
  .form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 4px; }
  .tabs { display: flex; gap: 4px; background: #f3f4f6; padding: 4px; border-radius: 9px; width: fit-content; }
  .tab {
    padding: 7px 22px; border-radius: 7px; font-size: 13.5px; cursor: pointer; color: #6b7280;
    border: none; background: transparent; transition: all .15s; display: flex; align-items: center; gap: 6px;
  }
  .tab.active { background: #fff; color: #111827; font-weight: 600; box-shadow: 0 1px 3px rgba(16,24,40,.1); }
  .tab .t-dot { width: 8px; height: 8px; border-radius: 50%; }
  /* 收支方向分段按钮：选中/未选中高对比（选中=实色底+白字+加粗+描边阴影；未选中=浅灰底+灰字+半透明圆点） */
  .ed-dir {
    padding: 5px 14px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer;
    border: 1.5px solid #e5e7eb; background: #f9fafb; color: #9ca3af; transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
  }
  .ed-dir .t-dot { width: 8px; height: 8px; border-radius: 50%; opacity: .45; }
  .ed-dir:hover { border-color: #cbd5e1; color: #6b7280; }
  .ed-dir.active { color: #fff; font-weight: 700; font-size: 13.5px; }
  .ed-dir.active .t-dot { opacity: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.55); }
  .ed-dir-in.active { background: #059669; border-color: #047857; box-shadow: 0 1px 4px rgba(5,150,105,.4); }
  .ed-dir-out.active { background: #e11d48; border-color: #be123c; box-shadow: 0 1px 4px rgba(225,29,72,.4); }

  /* ================= 月末结账 ================= */
  .check-list { display: flex; flex-direction: column; gap: 10px; }
  .check-item {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 8px;
    border: 1px solid #e5e7eb; font-size: 13px;
  }
  .check-item.ok { border-color: #a7f3d0; background: #f0fdf4; }
  .check-item.bad { border-color: #fecaca; background: #fef2f2; }
  .check-item .ck { font-size: 15px; margin-top: 1px; }
  .check-item b { display: block; margin-bottom: 2px; color: #111827; font-size: 13px; }
  .check-item small { color: #6b7280; line-height: 1.5; }
  .lock-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #1d4ed8; }
  .period-closed-list li {
    display: flex; align-items: center; justify-content: space-between; padding: 10px 4px;
    border-bottom: 1px dashed #f0f1f3; font-size: 13px;
  }
  .period-closed-list li:last-child { border-bottom: none; }

  /* ================= 报表中心 ================= */
  .matrix th.group, .matrix td.group { border-left: 1px solid #e5e7eb; }
  .bar-chart { display: flex; flex-direction: column; gap: 12px; }
  .bar-row { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; font-size: 12.5px; }
  .bar-row .b-label { color: #374151; text-align: right; }
  .bar-track { background: #f3f4f6; border-radius: 5px; height: 18px; overflow: hidden; }
  .bar-fill { height: 100%; border-radius: 5px; min-width: 4px; }
  .bar-row .b-val { color: #6b7280; font-variant-numeric: tabular-nums; }
  .legend { display: flex; gap: 18px; font-size: 12px; color: #6b7280; }
  .legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

  /* ================= 字典 / 用户管理 Tab ================= */
  .nav-tabs { display: flex; gap: 0; border-bottom: 2px solid #e5e7eb; margin-bottom: 18px; }
  .nav-tab {
    padding: 10px 20px; font-size: 14px; color: #6b7280; cursor: pointer; border: none; background: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s;
  }
  .nav-tab:hover { color: #111827; }
  .nav-tab.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 600; }
  .tab-pane { display: none; }
  .tab-pane.active { display: block; }

  .search-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .search-bar .input, .search-bar .select { width: 170px; }
  .toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .toolbar .left { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .toolbar .right { display: flex; gap: 10px; }

  .checkbox { width: 15px; height: 15px; accent-color: #2563eb; cursor: pointer; }

  .filter-tag { font-size: 12px; color: #2563eb; background: #eff6ff; border: 1px solid #bfdbfe; padding: 2px 8px; border-radius: 4px; }

  /* 空态/提示条 */
  .notice {
    display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: 8px;
    font-size: 12.5px; line-height: 1.6; margin-bottom: 16px;
  }
  .notice-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
  .notice-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

  /* 滚动条 */
  ::-webkit-scrollbar { width: 8px; height: 8px; }
  ::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
  ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

  /* ---------- 收支类别：模糊查询下拉（combobox） ---------- */
  .bizcat-combo { position: relative; width: 100%; }
  .bizcat-combo .input { padding-right: 30px; }
  .bizcat-clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; line-height: 15px; text-align: center;
    font-size: 14px; color: #9ca3af; cursor: pointer; border-radius: 50%;
    display: none; user-select: none;
  }
  .bizcat-clear:hover { background: #f3f4f6; color: #6b7280; }
  .bizcat-combo.has-value .bizcat-clear { display: block; }
  .bizcat-opt-list {
    position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px);
    max-height: 232px; overflow-y: auto; background: #fff;
    border: 1px solid #e5e7eb; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .12);
    padding: 4px; display: none;
  }
  .bizcat-opt-list.open { display: block; }
  .bizcat-opt {
    padding: 7px 10px; border-radius: 6px; font-size: 13px; color: #1f2937;
    cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .bizcat-opt:hover, .bizcat-opt.active { background: #eff6ff; color: #1d4ed8; }
  .bizcat-opt .hit { color: #e11d48; font-weight: 600; }
  .bizcat-opt .dir { font-size: 11px; color: #9ca3af; margin-left: 6px; }
  .bizcat-empty {
    padding: 10px; font-size: 12px; color: #9ca3af; text-align: center;
  }
  .bizcat-hint {
    position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px);
    background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .12);
    padding: 8px 10px; font-size: 12px; color: #b45309; line-height: 1.5;
  }
  .bizcat-hint b { color: #92400e; }

/* ================= 前端真实接入补充（第一批） ================= */
/* 注意：以上样式沿用原型，以下为对接真实 API 后的少量补充，不改动原型视觉基调 */

.btn:disabled { opacity: .55; cursor: not-allowed; }

/* 侧边栏：未上线/无权限菜单项置灰 */
.menu-item.disabled { opacity: .38; cursor: not-allowed; }
.menu-item.disabled:hover { background: transparent; color: #cbd5e1; }
.menu-item.menu-parent { opacity: .78; font-weight: 500; cursor: default; }
.menu-item.menu-sub { padding-left: 40px; font-size: 13px; }
.acct-combo { display: flex; flex-direction: column; gap: 6px; }
.acct-combo .hidden { display: none; }
.menu-item .soon-tag {
  margin-left: auto; font-size: 10px; line-height: 1;
  color: #94a3b8; border: 1px solid #334155; border-radius: 8px; padding: 3px 6px;
  background: rgba(148,163,184,.08); white-space: nowrap;
}
.menu-item.active .soon-tag { color: #dbeafe; border-color: rgba(255,255,255,.5); }
.sub-item.disabled { opacity: .38; cursor: not-allowed; }

/* Toast 错误态 */
#toast.toast-error .ico { color: #f87171; }
#toast.toast-success .ico { color: #34d399; }

/* 表格：允许长文本换行（摘要 / 备注） */
.tbl td.wrap { white-space: normal; max-width: 260px; word-break: break-word; }
.tbl td.nowrap { white-space: nowrap; }

/* 行操作按钮组 */
.cell-actions { white-space: nowrap; display: inline-flex; gap: 2px; }
.cell-actions .btn-text:disabled { color: #cbd5e1; }

/* 已结账锁定行 */
.tbl tr.row-locked td:first-child::before { content: "🔒 "; font-size: 11px; }

/* 空态 / 加载 */
.empty-state {
  padding: 34px 16px; text-align: center; color: #9ca3af; font-size: 13px;
}
.empty-state .ico { display: block; font-size: 26px; margin-bottom: 8px; opacity: .7; }
.loading-inline { color: #9ca3af; font-size: 13px; padding: 18px; text-align: center; }

/* 登录页：错误提示条 */
.login-error {
  background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px; line-height: 1.5;
}
.login-ok {
  background: #f0fdf4; color: #15803d; border: 1px solid #a7f3d0; border-radius: 8px;
  padding: 9px 12px; font-size: 12.5px; line-height: 1.5;
}

/* 结账核对表：人工盘点余额输入 */
.recon-input { width: 130px; text-align: right; font-variant-numeric: tabular-nums; }
.recon-input.input-error { border-color: #dc2626; }

/* 页面小节提示 */
.section-hint { font-size: 12px; color: #9ca3af; margin-top: 6px; }

/* 窄屏兜底（保持可用） */
@media (max-width: 900px) {
  .sidebar { width: 180px; }
  .form-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
}
