/* 配件进销存系统 - 移动端风格 (参考手机端工作台/库存预警界面) */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #1f2937; font-size: 14px; line-height: 1.5; }
a { color: #2563eb; text-decoration: none; }
button { font-family: inherit; }

/* ===== 顶部导航栏 ===== */
.top-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 48px; background: linear-gradient(90deg, #2563eb, #3b82f6); color: #fff; display: flex; align-items: center; padding: 0 8px; box-shadow: 0 2px 8px rgba(37, 99, 235, .28); }
.nav-burger { background: none; border: none; color: #fff; font-size: 22px; width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: 0 0 auto; }
.nav-burger:active { background: rgba(255,255,255,.15); }
.nav-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-right { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.nav-bell { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; border-radius: 8px; }
.nav-bell:active { background: rgba(255,255,255,.15); }
.nav-bell i { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; background: #ef4444; color: #fff; font-style: normal; font-size: 10px; line-height: 16px; text-align: center; border-radius: 8px; font-weight: 600; }
.nav-spacer { width: 40px; }

/* ===== 侧滑菜单 ===== */
.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 150; display: none; }
.drawer-mask.show { display: block; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; max-width: 82%; background: #fff; z-index: 200; transform: translateX(-100%); transition: transform .22s ease; display: flex; flex-direction: column; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
.drawer.open { transform: translateX(0); }
.drawer-user { padding: 18px 16px 14px; background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; }
.drawer-user .du-name { font-size: 15px; font-weight: 600; }
.drawer-user .du-role { display: inline-block; margin-top: 6px; background: rgba(255,255,255,.22); border-radius: 10px; padding: 2px 10px; font-size: 11px; }
.drawer nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.drawer nav a { display: flex; align-items: center; gap: 10px; padding: 13px 18px; color: #374151; font-size: 14px; border-bottom: 1px solid #f3f4f6; }
.drawer nav a.on { color: #2563eb; font-weight: 600; background: #eff6ff; border-left: 3px solid #2563eb; }
.drawer-foot { padding: 12px 18px; border-top: 1px solid #f3f4f6; font-size: 13px; color: #6b7280; display: flex; gap: 16px; }

/* ===== 主内容 ===== */
.main { padding: 58px 12px 78px; max-width: 640px; margin: 0 auto; }
.topbar { display: none; }
.flash { padding: 10px 12px; border-radius: 10px; margin-bottom: 12px; font-size: 13px; }
.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: #eff6ff; color: #166534; border: 1px solid #bfdbfe; }

/* ===== 统计卡片 ===== */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.card { background: #fff; border-radius: 12px; padding: 14px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-label { color: #6b7280; font-size: 12px; margin-bottom: 6px; }
.card-val { font-size: 21px; font-weight: 700; line-height: 1.2; word-break: break-all; }
.card-sub { color: #9ca3af; font-size: 12px; margin-top: 4px; }
.card-sale .card-val { color: #2563eb; } .card-order .card-val { color: #2563eb; }
.card-alert .card-val { color: #dc2626; } .card-receivable .card-val { color: #d97706; }
.card-payable .card-val { color: #db2777; } .card-money .card-val { color: #7c3aed; }
.card-stock .card-val { color: #1d4ed8; }

/* ===== 面板/区块 ===== */
.grid2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.panel { background: #fff; border-radius: 12px; padding: 13px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 12px; }
.panel h3 { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: #111827; }
.fr { float: right; font-size: 12px; }

/* ===== 表格 ===== */
.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05); margin-bottom: 12px; }
.tbl th, .tbl td { padding: 8px 8px; border-bottom: 1px solid #f0f2f5; text-align: left; font-size: 12px; vertical-align: middle; }
.tbl th { background: #f8fafc; color: #6b7280; font-weight: 600; font-size: 11px; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }
.empty { text-align: center; color: #9ca3af; padding: 22px !important; }
.danger { color: #dc2626; font-weight: 700; }
.income { color: #2563eb; font-weight: 600; }
.expense { color: #dc2626; font-weight: 600; }
.unread-row td { background: #eff6ff; }

/* ===== 标签 ===== */
.tag { display: inline-block; background: #f3f4f6; color: #374151; border-radius: 10px; padding: 1px 8px; font-size: 11px; }
.tag-blue { background: #d1fae5; color: #065f46; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-orange { background: #ffedd5; color: #9a3412; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5e7eb; background: #fff; color: #374151; padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 13px; min-height: 38px; }
.btn:active { background: #f3f4f6; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:active { background: #1d4ed8; }
.btn-danger { border-color: #fecaca; color: #dc2626; }
.btn-danger:active { background: #fef2f2; }
.btn-sm { padding: 5px 12px; font-size: 12px; min-height: 30px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ===== 工具栏/搜索 ===== */
.toolbar { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.toolbar .inline-form { margin-bottom: 0; }
.op-btns { display: flex; flex-wrap: wrap; gap: 6px; white-space: nowrap; }
.op-btns form { display: inline; }
.row-dim td { color: #9ca3af; background: #fafafa; }
.pager { display: flex; align-items: center; gap: 10px; color: #6b7280; font-size: 13px; padding: 6px 0; }
.pager .btn-sm { padding: 3px 12px; }

/* ===== 表单 ===== */
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.inline-form input, .inline-form select { padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; background: #fff; min-height: 38px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }
.form-grid input, .form-grid select { padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; background: #fff; min-height: 38px; width: 100%; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #6b7280; }
.full { grid-column: 1 / -1; }
.chk { display: inline-flex; align-items: center; gap: 5px; margin: 0 10px 6px 0; font-size: 13px; }

/* 新增/编辑表单 */
.add-form { display: grid; grid-template-columns: 1fr; gap: 12px 14px; }
.add-form label { display: block; font-size: 13px; color: #374151; font-weight: 500; }
.add-form label .req { color: #dc2626; margin-right: 3px; }
.add-form label .opt { color: #9ca3af; font-weight: 400; }
.add-form input, .add-form select, .add-form textarea { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 9px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; background: #fff; min-height: 38px; }
.add-form input:focus, .add-form select:focus, .add-form textarea:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-btns { display: flex; gap: 10px; margin-top: 2px; }

/* ===== 弹窗(移动端底部抽屉) ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: flex-end; justify-content: center; z-index: 300; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-width: 640px; max-height: 88vh; overflow: auto; padding: 18px 14px 0; animation: sheet-in .22s ease; }
.modal-box h3 { font-size: 15px; margin-bottom: 14px; color: #111827; }
.modal-box .add-form { max-width: none; }
.modal-box .form-btns { position: sticky; bottom: 0; background: #fff; padding: 12px 0 14px; z-index: 6; }
.modal-box .form-btns .btn { flex: 1; }
.modal-close { float: right; width: 30px; height: 30px; line-height: 28px; text-align: center; border: none; background: #f3f4f6; color: #6b7280; border-radius: 50%; font-size: 16px; cursor: pointer; margin-top: -4px; }
@keyframes sheet-in { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }

/* 适配机型多选 */
.model-pick { margin-top: 8px; }
.model-pick .mp-search { width: 100%; padding: 9px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 14px; background: #fff; }
.mp-cands { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; max-height: 220px; overflow: auto; -webkit-overflow-scrolling: touch; }
.mp-cand { padding: 8px 10px; border: 1px solid #e2e6ec; border-radius: 8px; font-size: 13px; background: #fafbfc; color: #374151; cursor: pointer; line-height: 1.5; text-align: left; }
.mp-cand:active { border-color: #2563eb; color: #2563eb; background: #eff6ff; }
.mp-selected { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mp-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 14px; border-radius: 10px; background: #2563eb; color: #fff; font-size: 13px; }
.mp-tag button { border: none; background: none; color: rgba(255,255,255,.85); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 3px; }
.mp-empty { color: #9ca3af; font-size: 12px; padding: 4px 2px; }

/* ===== 开销售单明细 ===== */
.row-item { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 8px 0; padding: 8px; background: #f8fafc; border: 1px solid #eef0f3; border-radius: 10px; }
.row-item input[type=number] { padding: 7px 6px; border: 1px solid #d9dde3; border-radius: 6px; font-size: 13px; width: 56px; }
.row-item .sku-pick { width: 110px; font-size: 13px; padding: 7px 6px; border: 1px solid #d9dde3; border-radius: 6px; }
.row-cell { flex: 1; min-width: 52px; background: #fff; border: 1px solid #eef0f3; border-radius: 6px; padding: 4px 6px; text-align: left; }
.row-cell b { display: block; font-size: 10px; color: #9ca3af; font-weight: 500; }
.row-cell span { display: block; font-size: 12px; color: #111827; font-weight: 600; }
.row-head { display: none; }
#rows-sale .row-cell { flex: 1; min-width: 52px; background: transparent; border: none; padding: 4px 6px; }
#rows-sale .row-cell b { display: none; }

/* ===== 结算卡片 ===== */
.pay-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.pay-card { background: #fff; border: 1px solid #eef0f3; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.pay-card span { font-size: 11px; color: #6b7280; font-weight: 500; }
.pay-card input, .pay-card select { width: 100%; padding: 7px 8px; border: 1px solid #d9dde3; border-radius: 6px; font-size: 14px; height: 34px; }
.pay-card-total { background: #fffbeb; border-color: #fde68a; }
.pay-card-total b { font-size: 20px; color: #d97706; font-weight: 700; line-height: 1.1; }
.settle-block { margin-top: 14px; border-top: 2px dashed #eef0f3; padding-top: 12px; }
.settle-panel { border-top: 3px solid #2563eb; }
.settle-panel:last-child { border-top-color: #2563eb; }
.settle-sub { color: #9ca3af; font-size: 12px; margin: -4px 0 14px; }
.settle-form label { display: block; font-size: 13px; color: #374151; font-weight: 500; margin-bottom: 12px; }
.settle-form input, .settle-form select { width: 100%; padding: 8px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; margin-top: 6px; min-height: 38px; }

/* ===== 快捷入口 ===== */
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qb { display: flex; align-items: center; justify-content: center; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 14px 8px; text-align: center; color: #1d4ed8; font-weight: 600; font-size: 13px; min-height: 46px; }
.qb:active { background: #dbeafe; }

/* ===== 页签 ===== */
.tabs { display: flex; overflow-x: auto; margin-bottom: 12px; gap: 4px; }
.tab { border: 1px solid #e5e7eb; background: #fff; padding: 8px 14px; border-radius: 10px 10px 0 0; cursor: pointer; font-size: 13px; white-space: nowrap; }
.tab.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.tabpage { background: #fff; padding: 12px; border-radius: 0 12px 12px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px; }

/* ===== 其他 ===== */
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 10px 0; }
.search-hits { position: absolute; top: 100%; left: 0; right: 0; z-index: 999; max-height: 220px; overflow-y: auto; border: 1px solid #d1d5db; border-radius: 10px; display: none; background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.search-hits.up { top: auto; bottom: 100%; margin-bottom: 4px; }
.sku-pick { position: relative; z-index: 70; }
.search-hits .hit { padding: 12px 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.search-hits .hit:active { background: #eff6ff; }
.row-item { position: relative; }
.rs-top { position: relative; }
.hint { color: #6b7280; font-size: 12px; margin: 8px 0; }
.inv-total { font-size: 15px; font-weight: 700; margin: 8px 0; color: #1d4ed8; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ===== 底部导航 ===== */
.bottom-tab { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: #fff; border-top: 1px solid #eef0f3; display: flex; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 8px rgba(0,0,0,.05); }
.bottom-tab a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 7px 0 6px; color: #9ca3af; font-size: 10px; }
.bottom-tab a svg { width: 22px; height: 22px; }
.bottom-tab a.on { color: #2563eb; font-weight: 600; }
.bottom-tab a.on svg { stroke: #2563eb; }

/* ===== 登录页 ===== */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #1d4ed8 0%, #3b82f6 55%, #60a5fa 100%); padding: 20px; }
.login-box { background: #fff; border-radius: 16px; padding: 30px 24px; width: 100%; max-width: 380px; box-shadow: 0 16px 40px rgba(29, 78, 216, .25); }
.login-box h1 { font-size: 20px; margin-bottom: 4px; text-align: center; color: #111827; }
.login-sub { text-align: center; color: #6b7280; margin-bottom: 18px; font-size: 13px; }
.login-box input { width: 100%; padding: 12px 12px; margin-bottom: 12px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 15px; background: #f8fafc; }
.login-box input:focus { border-color: #2563eb; outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.login-box button { width: 100%; padding: 12px; background: linear-gradient(90deg, #2563eb, #3b82f6); color: #fff; border: 0; border-radius: 10px; font-size: 15px; cursor: pointer; font-weight: 600; }
.login-box button:active { opacity: .9; }
.login-tip { text-align: center; color: #9ca3af; font-size: 12px; margin-top: 14px; }

/* ===== 桌面端适配 ===== */
@media (min-width: 720px) {
  .main { max-width: 900px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .grid2 { grid-template-columns: 1fr 1fr; }
  .add-form { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .modal-overlay { align-items: flex-start; padding: 60px 16px; }
  .modal-box { border-radius: 14px; width: 720px; }
  .quick { grid-template-columns: repeat(3, 1fr); }
  .bottom-tab { max-width: 640px; margin: 0 auto; border-radius: 14px 14px 0 0; }
}

/* ===== 返回按钮 / 汉堡图标 ===== */
.nav-back { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #fff; border-radius: 8px; flex: 0 0 auto; }
.nav-back svg, .nav-burger svg { width: 24px; height: 24px; }
.nav-burger svg { stroke-width: 2; }
.nav-back:active { background: rgba(255,255,255,.15); }

/* ===== 底部 Tab 图标与角标 ===== */
.tab-ico { position: relative; display: inline-flex; }
.tab-badge { position: absolute; top: -6px; right: -12px; min-width: 16px; height: 16px; padding: 0 4px; background: #ef4444; color: #fff; font-style: normal; font-size: 10px; line-height: 16px; text-align: center; border-radius: 8px; font-weight: 600; }

/* ===== 工作台:蓝色个人信息卡 ===== */
.hero-card { background: linear-gradient(135deg, #2563eb, #3b82f6); border-radius: 14px; padding: 16px; color: #fff; margin-bottom: 14px; box-shadow: 0 6px 18px rgba(37,99,235,.25); }
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex: 0 0 auto; border: 2px solid rgba(255,255,255,.5); }
.hero-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.hero-role { display: inline-block; background: rgba(255,255,255,.25); border-radius: 10px; padding: 2px 10px; font-size: 11px; font-weight: 400; }
.hero-slogan { font-size: 12px; opacity: .92; margin-top: 3px; }
.hero-meta { display: flex; gap: 8px; margin-top: 14px; }
.hero-meta .hm { flex: 1; background: rgba(255,255,255,.14); border-radius: 10px; padding: 8px 10px; }
.hero-meta .hm b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-meta .hm span { font-size: 10px; opacity: .85; }

/* ===== 工作台:功能宫格 ===== */
.sect-title { font-size: 14px; font-weight: 600; color: #111827; margin: 0 2px 10px; display: flex; align-items: center; justify-content: space-between; }
.sect-title a { font-size: 12px; color: #9ca3af; font-weight: 400; }
.func-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; background: #fff; border-radius: 14px; padding: 14px 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px; }
.func-item { display: flex; flex-direction: column; align-items: center; gap: 7px; color: #374151; font-size: 12px; padding: 6px 0; position: relative; }
.func-ico { width: 44px; height: 44px; border-radius: 12px; background: #eff6ff; display: flex; align-items: center; justify-content: center; color: #2563eb; }
.func-ico svg { width: 22px; height: 22px; }
.func-item:active .func-ico { background: #dbeafe; }
.func-badge { position: absolute; top: -2px; left: 50%; margin-left: 8px; min-width: 16px; height: 16px; padding: 0 4px; background: #ef4444; color: #fff; font-style: normal; font-size: 10px; line-height: 16px; text-align: center; border-radius: 8px; font-weight: 600; }

/* ===== 工作台:数据总览 ===== */
.data-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; background: #fff; border-radius: 14px; padding: 14px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px; }
.data-item { padding: 4px 2px; }
.data-item b { display: block; font-size: 19px; font-weight: 700; color: #111827; }
.data-item span { font-size: 12px; color: #6b7280; }
.data-item.blue b { color: #2563eb; } .data-item.orange b { color: #d97706; } .data-item.purple b { color: #7c3aed; }

/* ===== 工作台:设置入口 ===== */
.setting-card { background: #fff; border-radius: 14px; padding: 4px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.setting-link { display: flex; align-items: center; gap: 10px; padding: 13px 0; color: #374151; font-size: 14px; border-bottom: 1px solid #f3f4f6; }
.setting-link:last-child { border-bottom: none; }
.setting-link .s-ico { width: 34px; height: 34px; border-radius: 10px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #4b5563; }
.setting-link .s-ico svg { width: 18px; height: 18px; }
.setting-link .s-arrow { margin-left: auto; color: #c4c9d1; font-size: 16px; }

/* ===== 库存查询:搜索栏 ===== */
.search-bar { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 4px 12px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.search-bar svg { width: 18px; height: 18px; color: #9ca3af; flex: 0 0 auto; }
.search-bar input { flex: 1; border: none; outline: none; padding: 11px 0; font-size: 14px; background: transparent; min-width: 0; }
.search-bar button { border: none; background: #2563eb; color: #fff; border-radius: 9px; padding: 8px 16px; font-size: 13px; }

/* ===== 库存查询:统计卡 ===== */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat-card { background: #fff; border-radius: 12px; padding: 12px 10px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card b { display: block; font-size: 19px; font-weight: 700; color: #111827; }
.stat-card span { font-size: 11px; color: #6b7280; }
.stat-card.blue b { color: #2563eb; } .stat-card.red b { color: #dc2626; }

/* ===== 库存查询:筛选标签 ===== */
.filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; overflow-x: auto; }
.ftag { border: 1px solid #e5e7eb; background: #fff; color: #374151; border-radius: 16px; padding: 6px 14px; font-size: 13px; white-space: nowrap; }
.ftag.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.ftag-select { border: 1px solid #e5e7eb; background: #fff; color: #374151; border-radius: 16px; padding: 6px 12px; font-size: 13px; margin-left: auto; }

/* ===== 库存查询:商品卡片 ===== */
.inv-card { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.inv-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.inv-name { font-size: 14px; font-weight: 600; color: #111827; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-st { font-size: 11px; padding: 2px 9px; border-radius: 10px; flex: 0 0 auto; }
.inv-st.ok { background: #d1fae5; color: #065f46; }
.inv-st.low { background: #fee2e2; color: #991b1b; }
.inv-st.over { background: #ffedd5; color: #9a3412; }
.inv-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: #6b7280; margin-bottom: 10px; }
.inv-meta b { color: #374151; font-weight: 600; }
.inv-grid3 { display: flex; gap: 8px; }
.inv-grid3 > div { flex: 1; min-width: 0; background: #f8fafc; border-radius: 8px; padding: 8px 6px; text-align: center; }
.inv-grid3 .inv-cost { font-size: 11px; }
.inv-grid3 .inv-qty { font-size: 15px; }
.inv-foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #f3f4f6; padding-top: 10px; }
.inv-cost { font-size: 13px; color: #6b7280; }
.inv-qty { font-size: 15px; font-weight: 700; color: #2563eb; }
.inv-qty small { font-size: 11px; font-weight: 400; color: #6b7280; }
.inv-btn { background: #2563eb; color: #fff; border: none; border-radius: 9px; padding: 7px 14px; font-size: 13px; }
.inv-btn:active { background: #1d4ed8; }

/* ===== 开销售单:大按钮 / 大表单 / 大输入 ===== */
.btn-big { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 52px; font-size: 17px; font-weight: 600; border-radius: 12px; margin-top: 12px; }
.add-row-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; border: 1.5px dashed #93c5fd; background: #eff6ff; color: #2563eb; font-size: 15px; font-weight: 600; border-radius: 12px; margin: 10px 0; }
.add-row-btn:active { background: #dbeafe; }

.sell-card { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 12px; }
.sell-field { margin-bottom: 12px; }
.sell-field:last-child { margin-bottom: 0; }
.sell-field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 5px; }
.sell-field select, .sell-field input { width: 100%; height: 46px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 12px; font-size: 16px; background: #fff; box-sizing: border-box; appearance: none; -webkit-appearance: none; }
.sell-field select { background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px; }
.sell-field select:focus, .sell-field input:focus { border-color: #2563eb; outline: none; }
.pay-total-card { background: linear-gradient(135deg, #2563eb, #3b82f6); border-radius: 12px; padding: 12px 16px; color: #fff; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; box-shadow: 0 4px 12px rgba(37,99,235,.22); }
.pay-total-card span { font-size: 13px; opacity: .92; }
.pay-total-card b { font-size: 26px; font-weight: 700; }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* 商品行:大输入框与大删除按钮 */
.row-item input[type=number] { height: 44px; padding: 0 8px; border-radius: 10px; font-size: 16px; box-sizing: border-box; }
.row-item input.qty-in { width: 70px; flex: 0 0 auto; }
.row-item input.price-in { width: 96px; flex: 0 0 auto; }
.row-item .sku-pick { width: auto; flex: 1; min-width: 0; height: 46px; padding: 0 12px; font-size: 15px; border-radius: 10px; box-sizing: border-box; }
.row-item .btn-sm { min-width: 44px; height: 44px; font-size: 16px; padding: 0; }
.row-item .row-cell { font-size: 12px; }

/* ===== 开销售单:重新规划布局(三段卡片 + 底部悬浮操作栏) ===== */
.card-title { font-size: 13px; font-weight: 700; color: #111827; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
.mini-add { border: none; background: #2563eb; color: #fff; border-radius: 8px; padding: 8px 14px; font-size: 13px; }
.mini-add:active { background: #1d4ed8; }

/* 商品明细行:两行式卡片 */
.rs-item { flex-wrap: wrap; }
.rs-top { display: flex; gap: 8px; width: 100%; align-items: center; }
.rs-top .sku-pick { flex: 1; min-width: 0; }
.rs-top .btn-sm { min-width: 44px; height: 44px; padding: 0; }
.rs-mid { display: flex; gap: 8px; width: 100%; margin-top: 8px; align-items: flex-end; }
.rs-field { flex: 1; min-width: 0; }
.rs-field label { display: block; font-size: 11px; color: #9ca3af; margin-bottom: 3px; }
.rs-field input { width: 100%; box-sizing: border-box; }
.rs-amt { flex: 0 0 96px; text-align: right; padding-bottom: 6px; }
.rs-amt label { display: block; font-size: 11px; color: #9ca3af; margin-bottom: 3px; }
.rs-amt b { font-size: 16px; color: #111827; font-weight: 700; }
.rs-info { display: flex; flex-wrap: wrap; gap: 4px 14px; width: 100%; margin-top: 6px; font-size: 11px; color: #9ca3af; }
.rs-info i { font-style: normal; }
.rs-info b { color: #374151; font-weight: 600; }
.rs-item .row-sn { width: 100%; }

/* 底部悬浮操作栏(固定在底部导航上方) */
.submit-bar { position: fixed; left: 0; right: 0; bottom: 47px; background: #fff; border-top: 1px solid #eef0f3; padding: 10px 14px; display: flex; align-items: center; gap: 12px; z-index: 80; box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
.sb-total { flex: 0 0 auto; text-align: right; }
.sb-total span { display: block; font-size: 11px; color: #6b7280; }
.sb-total b { font-size: 20px; color: #2563eb; font-weight: 700; }
.submit-bar .btn-big { margin: 0; height: 48px; font-size: 16px; flex: 1; }
#p-new { padding-bottom: 90px; }
@media (min-width: 641px) {
  .submit-bar { max-width: 640px; left: 50%; right: auto; width: 100%; transform: translateX(-50%); }
}

/* ===== 往来管理:挂账明细行 ===== */
.mini-row { padding: 10px 14px; border-bottom: 1px solid #f3f4f6; }
.mini-row:last-child { border-bottom: none; }
.mr-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.mr-top b { font-size: 14px; color: #111827; }
.mr-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* ===== 往来管理:卡片内嵌核销表单 ===== */
.settle-inline { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px dashed #e5e7eb; margin-top: 10px; padding-top: 10px; }
.settle-inline input[type=number] { flex: 1 1 100%; height: 50px; border: 1px solid #2563eb; border-radius: 12px; padding: 0 10px; font-size: 19px; font-weight: 700; text-align: center; min-width: 0; box-sizing: border-box; background: #fff; color: #2563eb; }
.settle-inline input[type=date] { flex: 1 1 45%; height: 46px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 10px; font-size: 15px; min-width: 0; box-sizing: border-box; background: #fff; }
.settle-inline select { flex: 1 1 45%; height: 46px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 10px; font-size: 15px; min-width: 0; box-sizing: border-box; background: #fff; }
.settle-inline .btn { flex: 1 1 100%; height: 48px; font-size: 16px; }

/* ===== 往来明细:单位卡 ===== */
.unit-head { background: linear-gradient(135deg, #2563eb, #3b82f6); border-radius: 14px; padding: 14px 16px; color: #fff; margin-bottom: 12px; box-shadow: 0 4px 12px rgba(37,99,235,.2); }
.unit-head .inv-name { color: #fff; }
.unit-head .inv-st { background: rgba(255,255,255,.25); color: #fff; }
.uh-meta { font-size: 12px; opacity: .9; margin-top: 4px; }

/* ===== 往来明细:生成对账单 ===== */
.detail-gen { display: flex; gap: 8px; margin-bottom: 10px; }
.detail-gen input[type=date] { flex: 1; height: 46px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 10px; font-size: 15px; min-width: 0; box-sizing: border-box; background: #fff; }
.detail-gen .btn { height: 46px; white-space: nowrap; }
.mr-op { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.mr-op .btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }

/* ===== 对账单管理中心 ===== */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-bar select, .filter-bar input { flex: 1 1 110px; height: 44px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 10px; font-size: 14px; min-width: 0; box-sizing: border-box; background: #fff; }
.filter-bar .btn { height: 44px; }
.batch-form { display: flex; gap: 8px; flex-wrap: wrap; }
.batch-form input[type=month] { flex: 1 1 130px; height: 46px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 10px; font-size: 15px; min-width: 0; box-sizing: border-box; background: #fff; }
.batch-form select { flex: 1 1 120px; height: 46px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 10px; font-size: 14px; min-width: 0; box-sizing: border-box; background: #fff; }
.batch-form .btn { height: 46px; white-space: nowrap; }

/* ===== 对账单:分页与导出 ===== */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; }
.exp-btns { display: flex; gap: 8px; }
.exp-btns .btn { height: 38px; padding: 0 14px; font-size: 13px; background: #2563eb; color: #fff; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.exp-btns .btn + .btn { background: #dc2626; }
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 14px 0 6px; }
.pager .btn-sm { height: 34px; padding: 0 12px; font-size: 12px; background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.pager-info { font-size: 13px; color: #6b7280; }

/* ===== 往来明细:账单两区表格 ===== */
.bill-sec { background:#fff; border-radius:12px; padding:12px; margin-bottom:12px; box-shadow:0 1px 3px rgba(0,0,0,.06); }
.bill-head { font-weight:600; font-size:15px; padding:4px 0 8px; }
.bill-head-row { display:grid; grid-template-columns:52px 66px 1fr 30px 42px 46px; gap:4px; padding:7px 10px; border:1px solid #e2e8f0; border-radius:8px; background:#f1f5f9; font-size:11px; color:#64748b; font-weight:600; margin-bottom:6px; }
.bill-row { display:grid; grid-template-columns:52px 66px 1fr 30px 42px 46px; gap:4px; padding:8px 10px; border:1px solid #e2e8f0; border-radius:8px; margin-bottom:6px; font-size:12px; align-items:center; background:#fff; }
.bill-row .bp { font-size:13px; }
.bill-row .bt-sale { color:#2563eb; font-size:11px; white-space:nowrap; }
.bill-row .bt-pay { color:#2563eb; font-size:11px; white-space:nowrap; }
.bill-row .bd { color:#6b7280; font-size:11px; white-space:nowrap; }
.bill-time { font-size:12px; color:#6b7280; margin:2px 2px 10px; }
.bill-filter { margin:0 0 10px; }
.bf-form { display:flex; flex-direction:column; gap:6px; }
.bf-row { display:flex; gap:6px; align-items:center; }
.bf-form input[type=date] { flex:1; height:44px; border:1px solid #d1d5db; border-radius:10px; padding:0 10px; font-size:14px; min-width:0; box-sizing:border-box; background:#fff; }
.bf-tilde { color:#9ca3af; font-size:13px; }
.bf-btn { height:44px; white-space:nowrap; }
.bill-row .bn { color:#374151; font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bill-row .bp { color:#111; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bill-row .bq, .bill-row .bq2 { text-align:right; font-weight:600; }
.bill-row .bq3 { text-align:right; font-weight:700; color:#111; }
.bill-row .bq3.neg { color:#dc2626; }
.bill-empty { padding:12px; text-align:center; font-size:12px; color:#9ca3af; border:1px dashed #d1d5db; border-radius:8px; background:#fafafa; }
.bill-sum { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; padding-top:10px; }
.bill-sum div { text-align:center; }
.bill-sum b { display:block; font-size:14px; color:#111; }
.bill-sum span { font-size:11px; color:#9ca3af; }
.bill-sum .red b { color:#dc2626; }

/* ===== 单位对账单:导出栏 ===== */
.exp-bar { display: flex; gap: 8px; margin: -4px 0 12px; }
.exp-bar .btn { height: 40px; padding: 0 16px; font-size: 13px; background: #2563eb; color: #fff; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.exp-bar .btn.red { background: #dc2626; }

/* ===== 开单快速新增 ===== */
.hit-add { color:#2563eb; font-weight:600; }
.quick-add { padding:10px; display:flex; flex-direction:column; gap:8px; }
.quick-add input { height:44px; border:1px solid #d1d5db; border-radius:10px; padding:0 12px; font-size:15px; box-sizing:border-box; width:100%; }
.qa-save { height:44px; border:none; border-radius:10px; background:#2563eb; color:#fff; font-size:15px; font-weight:600; }

/* ===== 日常收支(记账表单) ===== */
.book-head { font-size:17px; font-weight:700; color:#111; padding:4px 2px 10px; }
.book-head .book-sub { font-size:12px; font-weight:400; color:#9ca3af; margin-left:6px; }
.book-grid { display:flex; flex-wrap:wrap; background:#fff; border:1px solid #eef0f3; border-radius:14px; padding:8px 16px 4px; }
.bg-cell { flex:1 1 42%; min-width:0; padding:16px 8px 18px; box-sizing:border-box; }
.bg-full { flex:1 1 100%; }
.bg-cell label { display:block; font-size:13px; color:#9ca3af; margin-bottom:9px; }
.bg-cell label i { color:#dc2626; font-style:normal; margin-right:2px; }
.bg-cell input[type=text], .bg-cell input[type=number], .bg-cell input[type=date], .bg-cell input[type=search], .bg-cell select, .bg-cell textarea {
  width:100%; height:44px; border:1px solid #e5e7eb; border-radius:10px; padding:0 12px; font-size:15px; box-sizing:border-box; background:#fff; color:#111;
}
.bg-cell textarea { height:auto; padding:11px 12px; resize:vertical; }
.bg-cell select { height:44px !important; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23c3c8d0'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; padding-right:28px; }
.bg-cell input:focus, .bg-cell select:focus, .bg-cell textarea:focus { outline:none; border-color:#1677ff; }
.bg-opts { display:flex; gap:10px; }
.bg-opts .opt { flex:1; display:flex; align-items:center; justify-content:center; height:44px; border:1px solid #e5e7eb; border-radius:10px; font-size:15px; color:#374151; background:#fff; }
.bg-opts .opt input { margin-right:6px; }
.bg-opts .opt.on { border-color:#1677ff; color:#1677ff; background:#eff6ff; font-weight:500; }

.photo-grid { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.photo-grid img { width:64px; height:64px; object-fit:cover; border-radius:10px; border:1px solid #e5e7eb; }
.photo-upload { border:1.5px dashed #d1d5db; border-radius:12px; display:flex; align-items:center; justify-content:center; padding:14px; background:#fafafa; min-height:52px; }
.photo-upload b { font-size:26px; color:#9ca3af; font-weight:400; line-height:1; }
.book-save { width:100%; height:46px; margin:14px 0 18px; font-size:16px; }
.bf-amount { font-size:26px !important; font-weight:700; padding:14px 14px !important; letter-spacing:.5px; }

/* 内容摘要输入框放大(强制) */
.bg-cell input.bf-summary { height:44px !important; min-height:44px !important; font-size:15px !important; padding:0 12px !important; line-height:44px !important; }
.of-type-sticky { position:sticky; top:0; z-index:20; background:#fff; padding-bottom:4px; box-shadow:0 2px 6px rgba(0,0,0,.05); border-radius:12px; }
.book-grid .bg-cell textarea { height:44px !important; min-height:44px !important; max-height:44px !important; resize:none !important; padding:13px 12px 11px !important; line-height:20px !important; }

/* ===== 经营报表 ===== */
.rp-sum { display:flex; gap:8px; margin:10px 0; }
.rp-card { flex:1; background:#fff; border:1px solid #eef0f3; border-radius:12px; padding:14px 10px; text-align:center; }
.rp-label { font-size:12px; color:#9ca3af; }
.rp-val { font-size:18px; font-weight:700; color:#111; margin-top:6px; }
.rp-val.inc { color:#2563eb; }
.rp-val.exp { color:#dc2626; }
.rp-owe { display:flex; gap:8px; margin:10px 0; }
.owe-card { flex:1; border-radius:12px; padding:16px 12px; color:#fff; }
.owe-card:first-child { background:linear-gradient(135deg,#1677ff,#3b9bff); }
.owe-card:last-child { background:linear-gradient(135deg,#f59e0b,#fbbf24); }
.owe-label { font-size:12px; opacity:.9; }
.owe-val { font-size:22px; font-weight:700; margin:6px 0 2px; }
.owe-sub { font-size:11px; opacity:.85; }
.rp-sec { font-size:14px; font-weight:600; color:#111; margin:14px 2px 8px; }
.rp-month td { text-align:right; }
.rp-month td:first-child { text-align:left; }
.rp-month .inc { color:#2563eb; }
.rp-month .exp { color:#dc2626; }

/* 经营报表增强 */
.rp-quick { display:flex; gap:6px; margin-bottom:8px; }
.rp-quick a { flex:1; text-align:center; font-size:13px; }
.rp-quick a.on { background:#1677ff; color:#fff; border-color:#1677ff; }
.rp-bal { display:flex; flex-wrap:wrap; gap:8px; }
.bal-item { flex:1 1 40%; background:#fff; border:1px solid #eef0f3; border-radius:12px; padding:12px; display:flex; justify-content:space-between; align-items:center; }
.bal-item span { font-size:12px; color:#6b7280; }
.bal-item b { font-size:16px; color:#111; }

/* ===== 经营报表图形化 ===== */
.rp-ring-wrap { display:flex; justify-content:center; padding:8px 0 0; }
.rp-ring { width:190px; height:190px; }
.ring-num { font-size:22px; font-weight:700; fill:#111; }
.ring-lab { font-size:11px; fill:#9ca3af; }
.ring-legend { display:flex; gap:16px; justify-content:center; align-items:center; font-size:12px; color:#374151; margin:6px 0 4px; }
.lg-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:4px; vertical-align:-1px; }
.lg-dot.blue { background:#2563eb; }
.lg-dot.red { background:#dc2626; }
.hint-inline { color:#9ca3af; font-size:11px; }
.rp-bars { display:flex; gap:6px; align-items:flex-end; height:150px; padding:8px 6px 0; overflow-x:auto; }
.bar-col { flex:1 0 30px; display:flex; flex-direction:column; align-items:center; height:100%; }
.bar-stack { flex:1; width:100%; display:flex; flex-direction:column-reverse; gap:2px; }
.bar-inc { width:100%; background:#2563eb; border-radius:3px 3px 0 0; min-height:2px; }
.bar-exp { width:100%; background:#dc2626; border-radius:3px 3px 0 0; min-height:2px; }
.bar-lab { font-size:10px; color:#6b7280; margin-top:4px; white-space:nowrap; }
.rp-rows { display:flex; flex-direction:column; gap:10px; padding:4px 2px; }
.rp-row { display:flex; align-items:center; gap:8px; }
.row-name { flex:0 0 42%; font-size:12px; color:#374151; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row-track { flex:1; height:14px; background:#f3f4f6; border-radius:7px; overflow:hidden; }
.row-fill { height:100%; border-radius:7px; min-width:4px; }
.row-fill.blue { background:#1677ff; }
.row-fill.orange { background:#f59e0b; }
.row-fill.gray { background:#9ca3af; }
.row-fill.inc { background:#2563eb; }
.row-val { flex:0 0 auto; font-size:12px; font-weight:600; color:#111; white-space:nowrap; }

/* 应收应付醒目大卡 */
.rp-owe2 { display:flex; gap:10px; margin:4px 0 8px; }
.owe2 { flex:1; border-radius:14px; padding:16px 14px; color:#fff; box-shadow:0 2px 10px rgba(0,0,0,.10); }
.owe2.blue { background:linear-gradient(135deg,#1677ff,#4aa3ff); }
.owe2.orange { background:linear-gradient(135deg,#f59e0b,#fbbf24); }
.owe2 .t { font-size:13px; font-weight:600; opacity:.92; }
.owe2 .v { font-size:26px; font-weight:800; margin:8px 0 4px; letter-spacing:.5px; }
.owe2 .s { font-size:11px; opacity:.88; }

.row-fill.red { background:#dc2626; }

.op-exp { flex:0 0 auto; font-size:11px; color:#1677ff; border:1px solid #1677ff; border-radius:6px; padding:3px 8px; text-decoration:none; white-space:nowrap; }

.mine-quick { display:flex; align-items:center; justify-content:space-between; background:linear-gradient(135deg,#2563eb,#60a5fa); color:#fff; border-radius:14px; padding:16px; margin-bottom:12px; box-shadow:0 2px 10px rgba(37,99,235,.25); }
.mq-title { font-size:16px; font-weight:700; }
.mq-sub { font-size:12px; opacity:.92; margin-top:4px; }
.mq-arrow { font-size:26px; opacity:.9; }

.mine-type { display:flex; gap:6px; margin:0 0 10px; }
.mt-btn { flex:1; text-align:center; font-size:13px; padding:8px 0; border:1px solid #e5e7eb; border-radius:8px; color:#374151; text-decoration:none; background:#fff; }
.mt-btn.on { background:#1677ff; color:#fff; border-color:#1677ff; }

/* 收支流水分页 */
.page-bar { display:flex; align-items:center; justify-content:center; gap:10px; padding:12px 4px 4px; }
.page-bar .pg { display:inline-flex; align-items:center; justify-content:center; height:34px; padding:0 14px; border:1px solid #e5e7eb; border-radius:8px; font-size:14px; color:#1677ff; background:#fff; }
.page-bar .pg-info { font-size:13px; color:#6b7280; }

/* 收支流水:手机端卡片式 */
.flows-cards { display:none; }
@media (max-width:480px){
  .flows-tbl-wrap { display:none; }
  .flows-cards { display:block; }
  .fc { background:#fff; border:1px solid #eef0f3; border-radius:12px; padding:11px 12px; margin-bottom:10px; }
  .fc-main { display:flex; align-items:center; gap:8px; }
  .fc-sum { flex:1; font-size:15px; color:#111; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
  .fc-amt { font-size:16px; font-weight:700; white-space:nowrap; }
  .fc-meta { margin-top:7px; font-size:12px; color:#9ca3af; }
  .fc-sub { margin-top:7px; display:flex; align-items:center; gap:8px; font-size:12px; color:#6b7280; min-width:0; }
  .fc-sub > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .fc-thumb img { height:30px; width:30px; object-fit:cover; border-radius:6px; border:1px solid #e5e7eb; display:block; flex:none; }
}

/* 经营报表:应收应付明细 */
.rp-owe-detail { display:flex; gap:10px; flex-wrap:wrap; }
.owe-col { flex:1 1 160px; min-width:0; background:#fff; border:1px solid #eef0f3; border-radius:12px; padding:10px 12px; box-sizing:border-box; }
.owe-col-title { font-size:13px; font-weight:600; margin-bottom:8px; }
.owe-col-title.blue { color:#1677ff; }
.owe-col-title.orange { color:#fa8c16; }
.owe-item { display:flex; justify-content:space-between; align-items:center; padding:9px 0; border-bottom:1px solid #f3f4f6; font-size:13px; color:#374151; text-decoration:none; }
.owe-item:last-child { border-bottom:none; }
.owe-item b { color:#111; font-weight:600; }
.owe-empty { font-size:12px; color:#9ca3af; padding:6px 0; }

/* 经营报表:日常收支分类 */
.rp-cat { display:flex; gap:10px; flex-wrap:wrap; }
.cat-col { flex:1 1 200px; min-width:0; background:#fff; border:1px solid #eef0f3; border-radius:12px; padding:10px 12px; box-sizing:border-box; }
.cat-title { font-size:13px; font-weight:600; margin-bottom:8px; }
.cat-title.red { color:#dc2626; }
.cat-title.blue { color:#2563eb; }

/* ===== 分类搜索下拉 ===== */
.cat-search-wrap { position:relative; display:inline-block; width:100%; }
.cat-search-input {
  width:100%; padding:8px 10px; border:1px solid #d1d5db; border-radius:8px;
  font-size:13px; background:#fff; cursor:pointer; box-sizing:border-box;
}
.cat-search-input:focus { outline:none; border-color:#1677ff; box-shadow:0 0 0 2px rgba(22,119,255,.1); }
.cat-search-wrap .cat-search-dropdown { display:none !important; }
.cat-float-dd {
  background:#fff; border:1px solid #e5e7eb; border-radius:8px;
  max-height:240px; overflow-y:auto; box-shadow:0 8px 24px rgba(0,0,0,.15);
}
.cat-float-dd .cat-option {
  padding:8px 12px; font-size:13px; color:#374151; cursor:pointer;
  border-bottom:1px solid #f3f4f6; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.cat-float-dd .cat-option:last-child { border-bottom:none; }
.cat-float-dd .cat-option:hover { background:#eff6ff; color:#1677ff; }
.cat-float-dd .cat-option.sub { padding-left:24px; color:#6b7280; font-size:12px; }
.cat-float-dd .cat-option.sub:hover { color:#1677ff; }

/* ===== 经营报表：利润表 ===== */
.rp-profit { background:#fff; border:1px solid #eef0f3; border-radius:12px; padding:6px 14px; }
.pf-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px dashed #f0f0f0; font-size:14px; }
.pf-row:last-child { border-bottom:none; }
.pf-label { color:#374151; }
.pf-val { font-weight:600; font-variant-numeric:tabular-nums; }
.pf-val.inc { color:#2563eb; }
.pf-val.exp { color:#dc2626; }
.pf-sub { background:#f8fafc; margin:0 -14px; padding:10px 14px; border-bottom:1px solid #eef0f3; }
.pf-sub .pf-label { font-weight:600; }
.pf-total { background:linear-gradient(135deg,#eff6ff,#ecfdf5); margin:0 -14px 0; padding:12px 14px; border-radius:0 0 12px 12px; border-bottom:none; }
.pf-total .pf-label { font-weight:700; color:#065f46; }
.pf-total .pf-val { font-size:18px; font-weight:800; }

/* ===== 销售记录：现代表格风格 ===== */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border-left: 4px solid; transition: transform .15s, box-shadow .15s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.stat-card .stat-label { font-size: 12px; color: #6b7280; margin-bottom: 8px; font-weight: 500; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-blue { border-left-color: #3b82f6; }
.stat-blue .stat-value { color: #1d4ed8; }
.stat-orange { border-left-color: #f59e0b; }
.stat-orange .stat-value { color: #b45309; }
.stat-purple { border-left-color: #8b5cf6; }
.stat-purple .stat-value { color: #6d28d9; }

/* 现代表格 */
.tbl-modern { border-radius: 14px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.tbl-modern thead th {
  position: sticky; top: 0; z-index: 2;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #475569; font-weight: 600; font-size: 12px;
  padding: 14px 12px; white-space: nowrap;
  border-bottom: 2px solid #e2e8f0;
}
.tbl-modern tbody td { padding: 13px 12px; font-size: 13px; color: #334155; border-bottom: 1px solid #f1f5f9; }
.tbl-modern tbody tr:nth-child(even) { background: #fafbfc; }
.tbl-modern tbody tr:hover { background: #eff6ff !important; }
.tbl-modern tbody tr:last-child td { border-bottom: none; }
.tbl-modern .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-modern td.num b { font-weight: 600; color: #0f172a; }
.tbl-modern td.num b.amt-ret { color: #dc2626; }

.tbl-modern tbody tr.row-returned { background: #fef2f2 !important; }
.tbl-modern tbody tr.row-returned:hover { background: #fee2e2 !important; }
.tbl-modern a { color: #2563eb; text-decoration: none; font-weight: 500; }
.tbl-modern a:hover { text-decoration: underline; }

.tbl-modern .col-customer { max-width: 130px; }
.tbl-modern .col-remark { max-width: 180px; }
.tbl-modern .col-customer span,
.tbl-modern .col-pname span,
.tbl-modern .col-remark span {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.tbl-modern .tag { padding: 4px 12px; font-size: 12px; border-radius: 20px; font-weight: 500; }
.tag-gray { background: #f1f5f9; color: #475569; }

.tbl-scroll { max-height: 620px; overflow: auto; border-radius: 14px; -webkit-overflow-scrolling: touch; }
.tbl-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.tbl-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.tbl-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.tbl-scroll::-webkit-scrollbar-track { background: #f1f5f9; }

/* ===== 销售记录：手机端卡片式列表 ===== */
.sale-cards-mobile { display: none; }
.sale-card {
  background: #fff; border-radius: 12px; padding: 14px 16px;
  margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #eef2f7;
}
.sale-card.has-return { border-left: 4px solid #f87171; background: #fffafa; }
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.sc-order { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.sc-order-no { font-size: 13px; font-weight: 600; color: #111827; }
.sc-amount { font-size: 18px; font-weight: 700; color: #111827; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.sc-amount-wrap { text-align: right; flex-shrink: 0; }
.sale-card.has-return .sc-amount { color: #dc2626; }
.sc-customer { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 4px; }
.sc-product { font-size: 13px; color: #374151; margin-bottom: 8px; line-height: 1.5; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sc-product .sc-prod-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-product .sc-sku { color: #6b7280; font-size: 12px; }
.sc-qty-price { font-size: 13px; color: #1d4ed8; font-weight: 600; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.sc-meta { font-size: 12px; color: #9ca3af; line-height: 1.6; padding-top: 8px; border-top: 1px solid #f5f7fa; }
.sc-meta .income { color: #2563eb; font-weight: 500; }
.sc-meta .expense { color: #dc2626; font-weight: 500; }
.sc-remark { font-size: 12px; color: #6b7280; margin-top: 6px; line-height: 1.5; }
.sc-empty { text-align: center; padding: 40px 20px; color: #9ca3af; font-size: 14px; background: #f9fafb; border-radius: 12px; border: 1px dashed #e5e7eb; }

/* ===== 订单列表：手机端卡片式 ===== */
.order-cards-mobile { display: none; }
.order-card {
  background: #fff; border-radius: 12px; padding: 14px 16px;
  margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  border: 1px solid #eef2f7;
}
.oc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.oc-order { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.oc-order-no { font-size: 13px; font-weight: 600; color: #111827; }
.oc-amount { font-size: 18px; font-weight: 700; color: #1d4ed8; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.oc-customer { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 4px; }
.oc-products { font-size: 12px; color: #374151; margin-bottom: 6px; line-height: 1.5; }
.oc-meta { font-size: 12px; color: #9ca3af; line-height: 1.6; padding-top: 8px; border-top: 1px solid #f5f7fa; margin-bottom: 10px; }
.oc-meta + .oc-meta { padding-top: 0; border-top: none; margin-top: -6px; }
.oc-remark { font-size: 12px; color: #6b7280; margin-bottom: 10px; line-height: 1.5; background: #f9fafb; padding: 6px 10px; border-radius: 6px; }
.oc-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.oc-actions .btn { flex: 1; min-width: 70px; padding: 7px 10px; font-size: 12px; min-height: 32px; }
.oc-actions form { flex: 1; min-width: 70px; }
.oc-actions form .btn { width: 100%; }

.order-ret-row { background: #fff5f5 !important; }
.order-ret-row:hover { background: #ffe8e8 !important; }
.amt-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ret-tag-sm { display: inline-block; background: #fee2e2; color: #dc2626; font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; line-height: 1.4; }

.order-card.has-return { border-left: 4px solid #f87171; background: #fffafa; }
.oc-amount-wrap { text-align: right; flex-shrink: 0; }
.oc-ret-label { display: inline-block; background: #fee2e2; color: #dc2626; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 600; margin-top: 2px; }

/* 响应式 */
@media (max-width: 768px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
  .stat-card { padding: 10px 12px; border-radius: 10px; }
  .stat-card .stat-label { font-size: 11px; margin-bottom: 4px; }
  .stat-card .stat-value { font-size: 17px; }

  .inline-form { gap: 6px; }
  .inline-form input, .inline-form select {
    flex: 1 1 calc(50% - 6px); min-width: 0; font-size: 13px;
    padding: 7px 8px; min-height: 34px;
  }
  .inline-form .btn { flex: 1 1 auto; padding: 7px 12px; min-height: 34px; font-size: 13px; }

  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .tabs .tab { white-space: nowrap; flex-shrink: 0; font-size: 13px; padding: 8px 14px; }

  .tabpage { padding: 10px; border-radius: 0 0 12px 12px; }

  .tbl-scroll { display: none; }
  .sale-cards-mobile { display: block; }
  .sale-card { padding: 12px 14px; }
  .sc-order-no { font-size: 12px; }
  .sc-amount { font-size: 16px; }
  .sc-customer { font-size: 13px; }
  .sc-product { font-size: 12px; }
  .sc-meta { font-size: 11px; }
  .sc-remark { font-size: 11px; }

  #p-incoming .tbl { display: none; }

  #p-list .tbl { display: none; }
  .order-cards-mobile { display: block; }
  .order-card { padding: 12px 14px; }
  .oc-order-no { font-size: 12px; }
  .oc-amount { font-size: 16px; }
  .oc-customer { font-size: 13px; }
  .oc-meta { font-size: 11px; }
  .oc-actions .btn { font-size: 11px; padding: 6px 8px; min-height: 30px; }

  .tbl-modern .tag { font-size: 11px; padding: 2px 8px; }

  .hint { font-size: 11px; }
}

/* ===== 采购退货：三步式流程 ===== */
.ret-step { background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: 1px solid #eef2f7; }
.ret-step-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: #111827; margin-bottom: 14px; }
.ret-step-title .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.ret-step-hint { margin-left: auto; font-size: 12px; color: #6b7280; font-weight: 400; }

.po-date-filter { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 10px 12px; background: #f8fafc; border-radius: 10px; border: 1px solid #eef2f7; }
.po-date-filter input[type="date"] { padding: 7px 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 13px; background: #fff; min-width: 130px; }
.po-date-filter input[type="date"]:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(34,197,94,.15); }
.po-date-sep { color: #9ca3af; font-size: 13px; flex-shrink: 0; }

.po-order-list { display: flex; flex-direction: column; gap: 8px; }
.po-order-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 10px;
  cursor: pointer; transition: all .15s; background: #fff;
}
.po-order-item:hover { border-color: #93c5fd; background: #f8fafc; }
.po-order-item.selected { border-color: #3b82f6; background: #eff6ff; box-shadow: 0 0 0 2px rgba(34,197,94,.15); }
.po-order-item.done { opacity: .55; cursor: not-allowed; }
.po-order-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: #3b82f6; flex-shrink: 0; }
.po-order-info { flex: 1; min-width: 0; }
.po-order-no { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 3px; }
.po-order-meta { font-size: 12px; color: #6b7280; }
.po-order-meta b { color: #dc2626; font-weight: 600; }
.po-order-amount { font-size: 15px; font-weight: 700; color: #1d4ed8; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.ret-cards { display: flex; flex-direction: column; gap: 10px; }
.ret-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 12px 14px; transition: border-color .15s;
}
.ret-card:hover { border-color: #93c5fd; }
.ret-card-head { display: flex; align-items: center; gap: 10px; cursor: pointer; margin-bottom: 8px; }
.ret-card-head input[type="checkbox"] { width: 18px; height: 18px; accent-color: #3b82f6; flex-shrink: 0; }
.ret-name { font-size: 14px; font-weight: 600; color: #111827; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ret-sku { font-size: 12px; color: #6b7280; flex-shrink: 0; }
.ret-info { font-size: 12px; color: #6b7280; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #f3f4f6; }
.ret-info b { color: #dc2626; font-weight: 600; }
.ret-row { display: flex; gap: 16px; align-items: flex-end; }
.ret-row > div { flex: 1; }
.ret-row label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.ret-row input[type="number"] {
  width: 100%; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 14px; box-sizing: border-box;
}
.ret-row input[type="number"]:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(34,197,94,.15); }

.ret-empty { text-align: center; padding: 30px 20px; color: #9ca3af; font-size: 14px; background: #f9fafb; border-radius: 12px; border: 1px dashed #e5e7eb; }

.ret-submit { width: 100%; margin-top: 4px; }

@media (max-width: 768px) {
  .ret-step { padding: 12px; margin-bottom: 10px; }
  .ret-step-title { font-size: 14px; margin-bottom: 10px; }
  .po-order-item { padding: 10px 12px; gap: 8px; }
  .po-order-no { font-size: 13px; }
  .po-order-meta { font-size: 11px; }
  .po-order-amount { font-size: 13px; }
  .ret-card { padding: 10px 12px; }
  .ret-name { font-size: 13px; }
  .ret-row { flex-direction: row; gap: 12px; align-items: flex-end; }
  .ret-row > div { flex: 1; }
  .ret-row .po-qty {
    border-color: #3b82f6;
    background: #eff6ff;
    font-weight: 600;
    color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(34,197,94,.15);
  }
  .ret-row .po-qty:focus {
    border-color: #2563eb;
    background: #dbeafe;
    box-shadow: 0 0 0 3px rgba(34,197,94,.25);
  }
  .po-date-filter { flex-wrap: wrap; }
  .po-date-filter input[type="date"] { flex: 1; min-width: 0; }
  .po-date-filter .btn { flex: 1; }
}

/* 最近出库 */
.recent-card { background: #fff; border-radius: 14px; padding: 4px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 14px; }
.recent-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.recent-row:last-child { border-bottom: none; }
.rc-name { font-size: 14px; font-weight: 600; color: #111827; }
.rc-sub { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.rc-right { text-align: right; }
.rc-amt { font-size: 14px; font-weight: 700; color: #dc2626; }
.recent-empty { text-align: center; color: #9ca3af; font-size: 13px; padding: 20px 0; }

/* 日常收支：分类模糊搜索下拉 */
.book-grid .bg-cell { position: relative; }
.search-hits .sh-item { padding: 11px 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6; font-size: 13px; color: #374151; }
.search-hits .sh-item:active { background: #eff6ff; }

/* ===== 日常收支：对齐小程序 ===== */
.bal-card { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 10px; }
.bal-card .sect-title { margin-bottom: 8px; }
.bal-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.bal-item { flex: 0 0 auto; min-width: 108px; background: #f8fafc; border: 1px solid #eef0f3; border-radius: 10px; padding: 10px 12px; }
.bal-name { font-size: 12px; color: #6b7280; }
.bal-num { font-size: 16px; font-weight: 700; color: #111827; margin-top: 3px; white-space: nowrap; }
.bal-empty { font-size: 13px; color: #9ca3af; padding: 8px 0; }
.sum-card { display: flex; background: #fff; border-radius: 14px; padding: 12px 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 10px; }
.sum-item { flex: 1; text-align: center; }
.sum-label { font-size: 12px; color: #9ca3af; }
.sum-num { font-size: 16px; font-weight: 700; margin-top: 3px; }
.sum-num.income { color: #2563eb; }
.sum-num.expense { color: #dc2626; }
.type-bar { display: flex; gap: 8px; margin: 10px 0; }
.type-item { flex: 1; text-align: center; padding: 9px 0; border-radius: 10px; background: #fff; color: #374151; font-size: 14px; border: 1px solid #e5e7eb; }
.type-item.on { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 600; }
.fab { position: fixed; right: 18px; bottom: 84px; z-index: 99; width: 58px; height: 58px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 15px; font-weight: 700; border: none; box-shadow: 0 6px 18px rgba(37,99,235,.4); display: flex; align-items: center; justify-content: center; }
.fab:active { background: #1d4ed8; }

/* PC 顶部导航：手机端默认隐藏（≥992px 媒体查询内再显示为横条），修复手机端大logo+菜单堆叠 */
.pc-nav { display: none; }

/* ================= 电脑端（PC）宽屏布局 ================= */
@media (min-width: 992px) {
  .pc-nav { display: flex; align-items: center; position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: 58px; background: #fff; border-bottom: 1px solid #e5e7eb; box-shadow: 0 1px 4px rgba(0,0,0,.06); padding: 0 20px; }
  .pc-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; margin-right: 14px; flex: 0 0 auto; }
  .pc-logo { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; display: flex; align-items: center; justify-content: center; }
  .pc-logo svg { width: 20px; height: 20px; }
  .pc-brand-t { font-size: 15px; font-weight: 700; color: #111827; line-height: 1.15; display: flex; flex-direction: column; }
  .pc-brand-t small { font-size: 11px; color: #9ca3af; font-weight: 400; }
  .pc-menu { display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; }
  .pc-menu a { padding: 7px 9px; border-radius: 8px; font-size: 13px; color: #374151; white-space: nowrap; text-decoration: none; }
  .pc-menu a:hover { background: #eff6ff; color: #2563eb; }
  .pc-menu a.on { background: #2563eb; color: #fff; font-weight: 600; }
  .pc-user { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; margin-left: 14px; }
  .pc-admin { display: flex; align-items: center; gap: 6px; border-right: 1px solid #e5e7eb; padding-right: 12px; }
  .pc-admin a { font-size: 13px; color: #374151; text-decoration: none; padding: 6px 9px; border-radius: 8px; white-space: nowrap; }
  .pc-admin a:hover { background: #eff6ff; color: #2563eb; }

  .pc-bell { position: relative; font-size: 16px; text-decoration: none; }
  .pc-bell i { position: absolute; top: -6px; right: -9px; background: #dc2626; color: #fff; font-style: normal; font-size: 10px; border-radius: 9px; padding: 0 5px; line-height: 15px; }
  .pc-uname { font-size: 13.5px; color: #111827; font-weight: 600; }
  .pc-logout { font-size: 13px; color: #fff; background: #2563eb; border-radius: 8px; padding: 6px 14px; text-decoration: none; }
  .pc-logout:hover { background: #1d4ed8; }

  .top-nav, .drawer-mask, .drawer, .bottom-tab { display: none !important; }

  .main { max-width: 1380px; padding: 78px 24px 36px; }

  .hero-card { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px; background: linear-gradient(135deg, #2563eb, #3b82f6); }
  .hero-top { display: flex; align-items: center; gap: 14px; }
  .hero-avatar { width: 52px; height: 52px; font-size: 22px; }
  .hero-meta { display: flex; gap: 40px; margin-top: 0; }
  .hero-meta .hm b { font-size: 16px; }
  .func-grid { grid-template-columns: repeat(8, 1fr); gap: 14px; padding: 18px 16px; }
  .func-item { font-size: 13px; }
  .func-ico { width: 50px; height: 50px; }
  .data-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 18px 16px; }
  .data-item b { font-size: 22px; }
  .setting-card { display: flex; }
  .setting-card .setting-link { flex: 1; }

  .recent-card { padding: 6px 18px; }
  .recent-row { padding: 13px 4px; }

  .tbl { font-size: 13.5px; }
  .tbl th, .tbl td { padding: 11px 12px; }
  .card { padding: 18px 20px; }
  .book-grid { padding: 16px 22px; }
  .flows-cards { display: none; }
  .flows-tbl-wrap { display: block; }
  .inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
  .inline-form select, .inline-form input { min-width: 160px; }
  .page-bar, .exp-bar, .bill-filter { display: flex; align-items: center; gap: 10px; }
  .bf-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
  .date-row { display: flex; align-items: center; gap: 6px; }
  .search-row { flex: 1; min-width: 260px; }
  .bf-btn { margin-top: 0; }
}

/* ===== 销售开单：PC 真表格 ===== */
.sale-table-pc { display: none; width: 100%; border-collapse: collapse; }
.sale-table-pc thead th {
  background: #f1f5f9; color: #475569; font-weight: 600; font-size: 12px;
  padding: 9px 10px; text-align: left; border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
.sale-table-pc thead th.num { text-align: right; }
.sale-table-pc tbody td { padding: 6px 10px; border-bottom: 1px solid #eef2f7; font-size: 13px; vertical-align: middle; }
.sale-table-pc tbody td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale-table-pc tbody tr:hover { background: #f8fafc; }
.sale-table-pc .idx { color: #9ca3af; font-size: 12px; }
.sale-table-pc .cell-pick { position: relative; }
.sale-table-pc .sku-pick-pc {
  width: 100%; height: 34px; border: 1px solid #d1d5db; border-radius: 6px;
  padding: 0 10px; font-size: 13px; box-sizing: border-box;
}
.sale-table-pc .sku-pick-pc:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.sale-table-pc .qty-in-pc, .sale-table-pc .price-in-pc {
  width: 100%; height: 32px; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 0 8px; font-size: 13px; text-align: right; box-sizing: border-box;
}
.sale-table-pc .qty-in-pc:focus, .sale-table-pc .price-in-pc:focus { border-color: #2563eb; outline: none; }
.sale-table-pc .amt-cell { font-weight: 600; color: #2563eb; white-space: nowrap; }
.sale-table-pc .pc-stock { color: #64748b; font-size: 12px; }
.sale-table-pc .row-del {
  width: 28px; height: 28px; border: none; background: #fee2e2; color: #dc2626;
  border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1; padding: 0;
}
.sale-table-pc .row-del:hover { background: #fecaca; }

@media (min-width: 768px) {
  .sale-table-pc { display: table; }
  #rows-sale { display: none; }
  .items-card .items-head { display: none; }
  .items-card .add-row-btn { width: 200px; margin: 12px 0 0; }
  .sell-field select, .sell-field input { height: 38px; font-size: 14px; border-radius: 8px; }
  .sell-field label { font-size: 12px; margin-bottom: 4px; }
}
/* ===== 销售开单：PC 真表格 ===== */
.sale-table-pc { display: none; width: 100%; border-collapse: collapse; border: 1px solid #e5e7eb; }
.sale-table-pc thead th {
  background: #f8fafc; color: #475569; font-weight: 600; font-size: 12px;
  padding: 10px 10px; text-align: left; border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb; white-space: nowrap;
}
.sale-table-pc thead th:last-child { border-right: none; }
.sale-table-pc thead th.num { text-align: right; }
.sale-table-pc tbody td { padding: 6px 8px; border-bottom: 1px solid #eef2f7; border-right: 1px solid #eef2f7; font-size: 13px; vertical-align: middle; }
.sale-table-pc tbody td:last-child { border-right: none; }
.sale-table-pc tbody tr:last-child td { border-bottom: none; }
.sale-table-pc tbody td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale-table-pc tbody tr:hover { background: #f8fafc; }
.sale-table-pc .idx { color: #9ca3af; font-size: 12px; text-align: center; }
.sale-table-pc .cell-pick { position: relative; }
.sale-table-pc .sku-pick-pc {
  width: 100%; height: 34px; border: 1px solid #d1d5db; border-radius: 6px;
  padding: 0 10px; font-size: 13px; box-sizing: border-box;
}
.sale-table-pc .sku-pick-pc:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.sale-table-pc .qty-in-pc, .sale-table-pc .price-in-pc {
  width: 100%; height: 32px; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 0 8px; font-size: 13px; text-align: right; box-sizing: border-box;
}
.sale-table-pc .qty-in-pc:focus, .sale-table-pc .price-in-pc:focus { border-color: #2563eb; outline: none; }
.sale-table-pc .amt-cell { font-weight: 600; color: #2563eb; white-space: nowrap; }
.sale-table-pc .pc-unit { color: #475569; font-size: 13px; }
.sale-table-pc .pc-spec { color: #475569; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.sale-table-pc .row-del {
  width: 28px; height: 28px; border: none; background: #fee2e2; color: #dc2626;
  border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1; padding: 0;
}
.sale-table-pc .row-del:hover { background: #fecaca; }

/* 断点：≥768px 显示 PC 表格，隐藏手机卡片，表单横向排列 */
@media (min-width: 768px) {
  .sale-table-pc { display: table; }
  #rows-sale { display: none; }
  .items-card .items-head { display: none; }
  .items-card .add-row-btn { width: 160px; margin: 10px 0 0; height: 38px; font-size: 14px; }

  /* 客户信息一行 */
  .cust-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
  .cust-card .card-title { flex: 0 0 100%; }
  .cust-card .sell-field { flex: 1 1 200px; margin-bottom: 0; }
  .cust-card .sell-field label { font-size: 12px; margin-bottom: 4px; }
  .cust-card .sell-field select, .cust-card .sell-field input { height: 38px; font-size: 14px; border-radius: 8px; }

  /* 收款结算一行 */
  .pay-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
  .pay-box .card-title { flex: 0 0 100%; }
  .pay-box .sell-field { flex: 1 1 180px; margin-bottom: 0; }
  .pay-box .sell-field label { font-size: 12px; margin-bottom: 4px; }
  .pay-box .sell-field select, .pay-box .sell-field input { height: 38px; font-size: 14px; border-radius: 8px; }

  /* 底部操作栏改为页面内 */
  .submit-bar { position: static; transform: none; max-width: none; left: auto; right: auto; bottom: auto;
    justify-content: flex-end; gap: 20px; margin: 4px 0 0; padding: 16px 20px;
    border: 1px solid #eef0f3; border-radius: 12px; background: #fff; box-shadow: none; }
  .submit-bar .btn-big { flex: 0 0 auto; width: 180px; height: 42px; font-size: 15px; margin: 0; }
  .sb-total { text-align: right; }
  .sb-total b { font-size: 20px; }
  #p-new { padding-bottom: 0; }
}/* ===== 销售开单：PC 真表格 ===== */
.sale-table-pc { display: none; width: 100%; border-collapse: collapse; border: 1px solid #e5e7eb; table-layout: auto; }
.sale-table-pc thead th {
  background: #f8fafc; color: #475569; font-weight: 600; font-size: 12px;
  padding: 10px 10px; text-align: left; border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb; white-space: nowrap;
}
.sale-table-pc thead th:last-child { border-right: none; }
.sale-table-pc thead th.num { text-align: right; }
.sale-table-pc tbody td { padding: 6px 8px; border-bottom: 1px solid #eef2f7; border-right: 1px solid #eef2f7; font-size: 13px; vertical-align: middle; }
.sale-table-pc tbody td:last-child { border-right: none; }
.sale-table-pc tbody tr:last-child td { border-bottom: none; }
.sale-table-pc tbody td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale-table-pc tbody tr:hover { background: #f8fafc; }
.sale-table-pc .idx { color: #9ca3af; font-size: 12px; text-align: center; }
.sale-table-pc .cell-pick { position: relative; }
.sale-table-pc .sku-pick-pc {
  width: 100%; height: 34px; border: 1px solid #d1d5db; border-radius: 6px;
  padding: 0 10px; font-size: 13px; box-sizing: border-box;
}
.sale-table-pc .sku-pick-pc:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.sale-table-pc .qty-in-pc, .sale-table-pc .price-in-pc {
  width: 100%; height: 32px; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 0 8px; font-size: 13px; text-align: right; box-sizing: border-box;
}
.sale-table-pc .qty-in-pc:focus, .sale-table-pc .price-in-pc:focus { border-color: #2563eb; outline: none; }
.sale-table-pc .amt-cell { font-weight: 600; color: #2563eb; white-space: nowrap; }
.sale-table-pc .pc-unit { color: #475569; font-size: 13px; }
.sale-table-pc .pc-spec { color: #475569; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.sale-table-pc .row-del {
  width: 28px; height: 28px; border: none; background: #fee2e2; color: #dc2626;
  border-radius: 6px; cursor: pointer; font-size: 12px; line-height: 1; padding: 0;
}
.sale-table-pc .row-del:hover { background: #fecaca; }

/* 列宽：商品信息自适应剩余宽度 */
.sale-table-pc col:nth-child(1) { width: 40px; }
.sale-table-pc col:nth-child(2) { width: auto; }
.sale-table-pc col:nth-child(3) { width: auto; }
.sale-table-pc col:nth-child(4) { width: 64px; }
.sale-table-pc col:nth-child(5) { width: 90px; }
.sale-table-pc col:nth-child(6) { width: 100px; }
.sale-table-pc col:nth-child(7) { width: 120px; }
.sale-table-pc col:nth-child(8) { width: 48px; }

/* 断点：≥768px 显示 PC 表格，隐藏手机卡片，表单横向排列 */
@media (min-width: 768px) {
  .sale-table-pc { display: table; }
  #rows-sale { display: none; }
  .items-card .items-head { display: none; }
  /* “＋ 添加商品（SKU 模糊搜索）”大按钮去掉 */
  .items-card .add-row-btn { display: none; }

  /* 客户信息一行 */
  .cust-card { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
  .cust-card .card-title { flex: 0 0 100%; }
  .cust-card .sell-field { flex: 1 1 200px; margin-bottom: 0; }
  .cust-card .sell-field label { font-size: 12px; margin-bottom: 4px; }
  .cust-card .sell-field select, .cust-card .sell-field input { height: 38px; font-size: 14px; border-radius: 8px; }

  /* 收款结算一行 */
  .pay-box { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
  .pay-box .card-title { flex: 0 0 100%; }
  .pay-box .sell-field { flex: 1 1 180px; margin-bottom: 0; }
  .pay-box .sell-field label { font-size: 12px; margin-bottom: 4px; }
  .pay-box .sell-field select, .pay-box .sell-field input { height: 38px; font-size: 14px; border-radius: 8px; }

  /* 底部操作栏改为页面内 */
  .submit-bar { position: static; transform: none; max-width: none; left: auto; right: auto; bottom: auto;
    justify-content: flex-end; gap: 20px; margin: 4px 0 0; padding: 16px 20px;
    border: 1px solid #eef0f3; border-radius: 12px; background: #fff; box-shadow: none; }
  .submit-bar .btn-big { flex: 0 0 auto; width: 180px; height: 42px; font-size: 15px; margin: 0; }
  .sb-total { text-align: right; }
  .sb-total b { font-size: 20px; }
  #p-new { padding-bottom: 0; }
}

/* 手机端：去掉“＋ 添加商品（SKU 模糊搜索）”大按钮 */
.items-card .add-row-btn { display: none; }


/* ===== 日常收支 新增记账 PC 端重排（限宽 + 两列网格 + 标签左置 + 小号收支类型） ===== */
@media (min-width: 768px) {
  .book-grid {
    max-width: 960px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 32px;
    padding: 18px 26px 8px;
  }
  .book-grid .bg-full { grid-column: 1 / -1; }
  .book-grid .bg-cell {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #f5f7fa;
  }
  .book-grid .bg-cell label {
    display: inline-block;
    width: 116px;
    text-align: right;
    margin: 0 14px 0 0 !important;
    font-size: 13px;
    color: #475569;
    vertical-align: middle;
    line-height: 40px;
  }
  .book-grid .bg-cell label i { color: #cbd5e1; font-weight: 400; }
  .book-grid .bg-cell > input,
  .book-grid .bg-cell > select,
  .book-grid .bg-cell > textarea {
    display: inline-block;
    width: calc(100% - 142px) !important;
    height: 38px !important;
    min-height: 38px !important;
    vertical-align: middle;
    font-size: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 12px !important;
    box-sizing: border-box;
    background: #fff;
  }
  .book-grid .bg-cell > textarea {
    height: 38px !important;
    max-height: 38px !important;
    padding: 9px 12px !important;
    line-height: 20px !important;
  }
  .book-grid .bg-cell .search-hits { position: absolute; left: 130px; right: 0; z-index: 30; }
  .book-grid .of-type-sticky { position: static; box-shadow: none; padding-bottom: 0; border-radius: 0; }
  .book-grid .bg-opts { display: inline-flex; gap: 0 !important; width: auto !important; vertical-align: middle; }
  .book-grid .bg-opts .opt {
    flex: 0 0 auto !important;
    width: auto !important;
    height: 36px !important;
    padding: 0 22px !important;
    margin: 0 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0 !important;
    font-size: 14px !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  .book-grid .bg-opts .opt:first-child { border-radius: 8px 0 0 8px !important; border-right: none !important; }
  .book-grid .bg-opts .opt:last-child { border-radius: 0 8px 8px 0 !important; }
  .book-grid .bg-opts .opt.on,
  .book-grid .bg-opts .opt.active {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #fff !important;
  }
  .book-grid .bg-cell.bg-full > label {
    display: block;
    width: auto;
    text-align: left;
    margin: 0 0 4px !important;
    line-height: 20px;
  }
  .book-grid .photo-grid { margin-top: 6px; }
  .book-grid .photo-upload { margin-top: 6px; }
  .book-save { width: 200px; margin: 18px 0 8px; height: 42px; font-size: 15px; }
}
