/* HABR Group — 奢侈商务风 */
:root {
  --navy: #0d1420;
  --navy2: #131c2e;
  --navy3: #1a2438;
  --gold: #c9a35f;
  --gold2: #e2c896;
  --gold-dim: rgba(201, 163, 95, .35);
  --bg: #f5f3ee;
  --card: #ffffff;
  --ink: #1c2333;
  --ink2: #5a6478;
  --line: #e6e1d5;
  --red: #b4453c;
  --green: #2f7d5c;
  --radius: 10px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 14px; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13px; }

/* ---------- 登录 ---------- */
.login-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 700px at 70% 20%, #1c2a45 0%, var(--navy) 55%, #080d16 100%); }
.login-card { width: 400px; background: linear-gradient(160deg, var(--navy2), var(--navy3));
  border: 1px solid rgba(201,163,95,.25); border-radius: 16px; padding: 44px 42px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); color: #e9e4d6; }
.login-card h1 { font-family: var(--serif); font-size: 30px; letter-spacing: 6px; color: var(--gold2); text-align: center; }
.login-card h1 small { font-size: .55em; letter-spacing: 3px; font-weight: 400; }
.login-card .sub { text-align: center; font-size: 12px; letter-spacing: 3px; color: #9aa3b5; margin: 10px 0 8px; }
.login-logos { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 22px 0 30px; }
.login-logos img { height: 42px; object-fit: contain; background: rgba(255,255,255,.94); padding: 7px 11px; border-radius: 9px; box-shadow: 0 2px 10px rgba(0,0,0,.28); transition: all .25s; }
.login-logos img:hover { transform: translateY(-2px); background: #fff; }
.login-card label { display: block; font-size: 12px; color: #9aa3b5; margin: 16px 0 6px; letter-spacing: 2px; }
.login-card input { width: 100%; padding: 11px 14px; background: rgba(255,255,255,.06); color: #eee;
  border: 1px solid rgba(255,255,255,.14); border-radius: 8px; outline: none; }
.login-card input:focus { border-color: var(--gold); }
.login-card button { width: 100%; margin-top: 26px; padding: 12px; border: none; border-radius: 8px;
  background: linear-gradient(120deg, var(--gold), var(--gold2)); color: #1a1409; font-size: 15px; font-weight: 700; letter-spacing: 4px; }
.login-err { color: #e08a80; font-size: 12px; margin-top: 12px; text-align: center; min-height: 16px; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 216px; background: linear-gradient(180deg, var(--navy) 0%, var(--navy2) 100%);
  color: #cfd4df; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; }
.brand { padding: 26px 20px 20px; border-bottom: 1px solid rgba(201,163,95,.18); }
.brand h1 { font-family: var(--serif); font-size: 21px; letter-spacing: 4px; color: var(--gold2); }
.brand h1 small { font-size: .58em; letter-spacing: 2px; font-weight: 400; }
.brand span { display: block; font-size: 10px; letter-spacing: 2.5px; color: #8b94a7; margin-top: 6px; }
.nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 11px 14px; margin-bottom: 4px;
  border-radius: 8px; cursor: pointer; font-size: 14px; letter-spacing: 1px; color: #b7bfce;
  border: 1px solid transparent; transition: all .18s; }
.nav-item:hover { background: rgba(201,163,95,.08); color: var(--gold2); }
.nav-item.active { background: rgba(201,163,95,.14); color: var(--gold2); border-color: var(--gold-dim); }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; }
.side-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 12px; color: #8b94a7; }
.main { flex: 1; margin-left: 216px; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 64px; background: var(--card); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 26px; gap: 18px; position: sticky; top: 0; z-index: 10; }
.topbar .co-logos { display: flex; gap: 16px; align-items: center; }
.topbar .co-logos img { height: 30px; object-fit: contain; transition: all .2s; }
.topbar .co-logos img:hover { transform: scale(1.08); }
.topbar .spacer { flex: 1; }
.topbar .user { font-size: 13px; color: var(--ink2); }
.topbar .user b { color: var(--ink); }
.btn-ghost { background: none; border: 1px solid var(--line); border-radius: 7px; padding: 6px 13px; font-size: 12px; color: var(--ink2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.content { padding: 24px 28px 60px; }
.page-title { font-family: var(--serif); font-size: 22px; letter-spacing: 2px; margin-bottom: 4px; }
.page-desc { color: var(--ink2); font-size: 12px; margin-bottom: 20px; }

/* ---------- 卡片 / 统计 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card { background: linear-gradient(150deg, var(--navy2), var(--navy3)); color: #e8e3d5;
  border-radius: var(--radius); padding: 20px 22px; border: 1px solid rgba(201,163,95,.2);
  box-shadow: 0 8px 24px rgba(13,20,32,.12); }
.stat-card .label { font-size: 12px; color: #9aa3b5; letter-spacing: 1px; }
.stat-card .value { font-family: var(--serif); font-size: 26px; color: var(--gold2); margin-top: 8px; }
.stat-card .foot { font-size: 11px; color: #77808f; margin-top: 6px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.panel h3 { font-family: var(--serif); font-size: 16px; letter-spacing: 1px; margin-bottom: 14px; color: var(--ink);
  padding-left: 10px; border-left: 3px solid var(--gold); }
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.chart-box { height: 300px; }

/* ---------- 工具条 / 按钮 ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.toolbar input, .toolbar select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; outline: none; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--gold); }
.toolbar .spacer { flex: 1; }
.btn { border: none; border-radius: 8px; padding: 9px 18px; font-size: 13px; letter-spacing: 1px;
  background: linear-gradient(120deg, var(--gold), var(--gold2)); color: #1a1409; font-weight: 600; }
.btn:hover { filter: brightness(1.06); }
.btn-dark { background: var(--navy2); color: var(--gold2); }
.btn-line { background: #fff; border: 1px solid var(--gold); color: var(--gold); }
.btn-danger { background: #fff; border: 1px solid var(--red); color: var(--red); }
.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 6px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.grid { border-collapse: collapse; width: 100%; min-width: 900px; }
table.grid th { background: var(--navy2); color: var(--gold2); font-weight: 600; font-size: 12px;
  letter-spacing: 1px; padding: 11px 12px; text-align: left; white-space: nowrap; position: sticky; top: 0; }
table.grid td { padding: 10px 12px; border-bottom: 1px solid #f0ece2; font-size: 13px; white-space: nowrap; }
table.grid tbody tr:hover { background: #faf7ef; cursor: pointer; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; letter-spacing: 1px; }
.tag.gold { background: rgba(201,163,95,.14); color: #96722f; border: 1px solid var(--gold-dim); }
.tag.green { background: rgba(47,125,92,.1); color: var(--green); border: 1px solid rgba(47,125,92,.3); }
.tag.red { background: rgba(180,69,60,.08); color: var(--red); border: 1px solid rgba(180,69,60,.3); }
.tag.blue { background: rgba(50,90,160,.09); color: #325aa0; border: 1px solid rgba(50,90,160,.25); }
.empty { text-align: center; color: var(--ink2); padding: 44px 0; font-size: 13px; }

/* ---------- 弹窗 / 抽屉 ---------- */
.mask { position: fixed; inset: 0; background: rgba(13,20,32,.55); backdrop-filter: blur(2px); z-index: 50;
  display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 14px; width: min(1080px, 94vw); max-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.modal-head { padding: 18px 26px; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  background: linear-gradient(120deg, var(--navy2), var(--navy3)); color: var(--gold2); }
.modal-head h3 { font-family: var(--serif); font-size: 17px; letter-spacing: 2px; flex: 1; }
.modal-head .x { background: none; border: none; color: #9aa3b5; font-size: 20px; }
.modal-head .x:hover { color: var(--gold2); }
.modal-body { padding: 22px 26px; overflow-y: auto; }
.modal-foot { padding: 14px 26px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.field-group { margin-bottom: 20px; }
.field-group > h4 { font-size: 13px; color: #96722f; letter-spacing: 2px; margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px dashed var(--gold-dim); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.field label { display: block; font-size: 11px; color: var(--ink2); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 7px; outline: none; background: #fdfcf9; }
.field input:focus, .field select:focus { border-color: var(--gold); background: #fff; }
.detail-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 16px; }
.detail-dl .di { padding: 6px 0; border-bottom: 1px dashed #f0ece2; }
.detail-dl .di span { display: block; font-size: 11px; color: var(--ink2); }
.detail-dl .di b { font-size: 13px; font-weight: 600; word-break: break-all; }
.file-list { margin-top: 8px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #faf8f3;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
.file-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item a { color: var(--gold); text-decoration: none; }
.file-item .del { color: var(--red); background: none; border: none; font-size: 12px; }

/* ---------- 提示 ---------- */
.toast { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 99;
  background: var(--navy2); color: var(--gold2); padding: 11px 26px; border-radius: 30px;
  border: 1px solid var(--gold-dim); box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 13px; letter-spacing: 1px;
  animation: drop .25s ease; }
.toast.err { color: #f0a9a0; border-color: rgba(180,69,60,.5); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- 查询机器人 ---------- */
.bot-fab { position: fixed; right: 30px; bottom: 30px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  border: none; background: linear-gradient(140deg, var(--gold), #a8823f); color: #fff; font-size: 24px;
  box-shadow: 0 12px 30px rgba(168,130,63,.45); }
.bot-fab:hover { transform: scale(1.06); }
.bot-panel { position: fixed; right: 30px; bottom: 104px; z-index: 60; width: 460px; max-width: 92vw; height: 600px; max-height: 76vh;
  background: #fff; border-radius: 16px; box-shadow: 0 30px 90px rgba(13,20,32,.35); display: flex; flex-direction: column;
  overflow: hidden; border: 1px solid var(--gold-dim); }
.bot-head { background: linear-gradient(120deg, var(--navy), var(--navy3)); color: var(--gold2); padding: 15px 20px;
  display: flex; align-items: center; gap: 10px; }
.bot-head h4 { font-family: var(--serif); letter-spacing: 2px; font-size: 15px; flex: 1; }
.bot-head span { font-size: 11px; color: #9aa3b5; }
.bot-body { flex: 1; overflow-y: auto; padding: 16px; background: #faf8f3; }
.bot-msg { max-width: 88%; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.bot-msg.me { margin-left: auto; background: var(--navy2); color: #e8e3d5; border-bottom-right-radius: 3px; }
.bot-msg.ai { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 3px; }
.bot-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.bot-input input { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 24px; outline: none; }
.bot-input input:focus { border-color: var(--gold); }
.price-card { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; overflow: hidden; background: #fff; }
.price-card .pc-head { background: linear-gradient(120deg, rgba(201,163,95,.14), rgba(201,163,95,.05));
  padding: 8px 12px; font-size: 12px; color: #96722f; display: flex; justify-content: space-between; }
.price-card table { width: 100%; border-collapse: collapse; font-size: 12px; }
.price-card td { padding: 6px 12px; border-top: 1px solid #f3efe5; }
.price-card td:first-child { color: var(--ink2); white-space: nowrap; width: 76px; }
.price-card td:last-child { font-weight: 600; word-break: break-all; }

/* ---------- 财务 ---------- */
.fin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.fin-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fff; }
.fin-card .ft { font-size: 12px; color: var(--ink2); }
.fin-card .fn { font-size: 13px; font-weight: 600; margin: 6px 0; word-break: break-all; }
.fin-card .fa { display: flex; gap: 10px; font-size: 12px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfc7b4; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .sidebar .brand h1 { font-size: 13px; letter-spacing: 1px; }
  .sidebar .brand span, .nav-item .txt, .side-foot { display: none; }
  .main { margin-left: 64px; }
  .chart-row { grid-template-columns: 1fr; }
}

/* ---------- 列筛选弹窗（Excel 风格） ---------- */
.col-filter-btn { background: none; border: none; color: #8b94a7; font-size: 10px; margin-left: 4px; padding: 0 2px; }
.col-filter-btn:hover { color: var(--gold2); }
.col-filter-btn.on { color: #ffd77a; }
.col-filter-pop { position: fixed; z-index: 90; width: 260px; background: #fff; border: 1px solid var(--gold-dim);
  border-radius: 10px; box-shadow: 0 16px 50px rgba(13,20,32,.28); padding: 12px; }
.col-filter-pop .cf-title { font-size: 13px; font-weight: 600; color: #96722f; margin-bottom: 8px; letter-spacing: 1px; }
.col-filter-pop .cf-search { width: 100%; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; outline: none; margin-bottom: 6px; }
.col-filter-pop .cf-search:focus { border-color: var(--gold); }
.col-filter-pop .cf-actions { display: flex; gap: 14px; font-size: 12px; margin-bottom: 6px; }
.col-filter-pop .cf-actions a { color: var(--gold); cursor: pointer; }
.col-filter-pop .cf-list { max-height: 260px; overflow-y: auto; border-top: 1px solid #f0ece2; padding-top: 4px; }
.col-filter-pop .cf-item { display: flex; align-items: center; gap: 7px; padding: 4px 2px; font-size: 12px; cursor: pointer; }
.col-filter-pop .cf-item:hover { background: #faf7ef; }
.col-filter-pop .cf-item span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-filter-pop .cf-item em { font-style: normal; color: var(--ink2); font-size: 11px; }
.col-filter-pop .cf-foot { margin-top: 8px; text-align: right; }
table.grid td { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 实时销售额 / 金额选中合计 ---------- */
.live-sum { font-size: 12.5px; color: var(--ink2); letter-spacing: .5px; }
.live-sum b { color: #96722f; font-size: 15px; margin-left: 2px; }
.sel-bar { display: flex; align-items: center; gap: 18px; margin-top: 8px; padding: 8px 14px;
  background: #fdf8ec; border: 1px solid var(--gold-dim); border-radius: 8px; font-size: 13px; color: var(--ink2); }
.sel-bar .sel-total b { color: #96722f; font-size: 16px; }
.sel-bar a { color: var(--gold); cursor: pointer; margin-left: auto; }
.sel-bar a:hover { text-decoration: underline; }
.th-label.num { cursor: pointer; }
.th-label.num:hover { color: var(--gold); }
td.num-cell { cursor: cell; }
td.num-cell:hover { background: #f7f0dd; }
td.num-cell.sel { background: #f0e3bd !important; outline: 1.5px solid var(--gold); outline-offset: -1.5px; }

/* ---------- 单元格直录 ---------- */
td.ed-cell { cursor: text; }
td.ed-cell:hover { background: #f7f3e8; }
td.ed-cell.editing { padding: 0 !important; }
td.ed-cell input, td.ex-co select { width: 100%; border: 1.5px solid var(--gold); outline: none; padding: 6px 8px; font-size: 13px; background: #fffdf6; }
td.ex-co { cursor: pointer; }
tr.draft-row td { background: #faf7ef; }
tr.draft-row input { border: 1px dashed #d8cdb2; background: transparent; padding: 6px 8px; font-size: 13px; width: 100%; outline: none; }
tr.draft-row input:focus { border-color: var(--gold); background: #fff; }

/* ---------- 收支统计工作表标签 ---------- */
.tab-bar { display: flex; align-items: flex-end; gap: 2px; margin-bottom: -1px; padding: 0 4px; flex-wrap: wrap; }
.ex-tab { padding: 8px 18px; font-size: 13px; background: #eceadf; color: #6b6455; border: 1px solid var(--line);
  border-bottom: none; border-radius: 8px 8px 0 0; cursor: pointer; position: relative; top: 1px; }
.ex-tab:hover { background: #f4efe1; color: var(--ink); }
.ex-tab.on { background: var(--card); color: #96722f; font-weight: 700; border-color: var(--gold-dim); z-index: 2; }
.ex-tab-add { padding: 8px 14px; color: var(--gold); font-weight: 700; }

/* ---------- 合同上传区 ---------- */
.contract-group { border: 1.5px solid var(--gold-dim) !important; background: #fdf9ef; }
.contract-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.contract-chip { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--gold-dim);
  border-radius: 20px; padding: 4px 6px 4px 12px; font-size: 12.5px; }
.contract-chip a { color: var(--ink); text-decoration: none; }
.contract-chip a:hover { color: var(--gold); text-decoration: underline; }
.contract-chip .c-del { border: none; background: none; color: #b0483e; cursor: pointer; font-size: 12px; padding: 2px 6px; }

/* ---------- 清关文件折叠组 ---------- */
details.cust-det { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fff; }
details.cust-det summary { cursor: pointer; padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--ink); list-style: none; }
details.cust-det summary::before { content: '▸ '; color: var(--gold); }
details.cust-det[open] summary::before { content: '▾ '; }
details.cust-det summary em { font-style: normal; font-weight: 400; color: var(--ink2); font-size: 12px; margin-left: 8px; }
details.cust-det .file-list { padding: 4px 14px 10px; }

/* ---------- 提醒中心 ---------- */
.rem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.rem-panel h3 { font-size: 15px; }
.rem-list { max-height: 300px; overflow-y: auto; margin-top: 8px; }
.rem-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-bottom: 1px dashed #eee5d2;
  font-size: 12.5px; cursor: pointer; border-radius: 4px; }
.rem-row:hover { background: #faf5e8; }
.rem-row .rem-main { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rem-row .rem-info { color: var(--ink2); font-size: 11.5px; white-space: nowrap; }

/* ---------- 进出口统计：聚合/票徽标/产品板块 ---------- */
.grp-blank { background: #fcfaf4; }
.piao { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  border-radius: 50%; background: var(--gold); color: #fff; font-size: 10px; font-weight: 700;
  padding: 0 3px; margin-left: 4px; vertical-align: 1px; box-shadow: 0 1px 3px rgba(150,114,47,.45); }
.auto-ta { width: 100%; min-height: 40px; resize: none; overflow: hidden; }
.prod-group .table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 320px; }
table.prod-table { border-collapse: collapse; width: 100%; }
table.prod-table th { background: #efe9da; color: #6b6455; font-size: 11.5px; font-weight: 600; padding: 7px 6px;
  position: sticky; top: 0; white-space: nowrap; text-align: left; border-bottom: 1px solid var(--line); }
table.prod-table td { padding: 2px 3px; border-bottom: 1px solid #f0ece2; }
table.prod-table input { width: 100%; border: none; background: transparent; padding: 7px 5px; font-size: 12.5px; outline: none; }
table.prod-table input:focus { background: #fdf6e3; box-shadow: inset 0 0 0 1.5px var(--gold-dim); border-radius: 4px; }

/* ---------- 详情附件区 ---------- */
.att-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed #f0ece2; flex-wrap: wrap; }
.att-row .att-label { width: 92px; flex: none; font-size: 12.5px; font-weight: 600; color: var(--ink2); letter-spacing: 1px; }
.att-row .att-files { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; min-width: 200px; }
.att-none { font-size: 12px; color: var(--ink2); }
.btn-piao-on { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-piao-on:hover { background: var(--gold2); }

/* ---------- 发货管理 / 特殊物品 ---------- */
.ship-warn { background: linear-gradient(120deg, #fdf3e3, #fbe8d8); border: 1px solid var(--gold-dim);
  border-left: 4px solid var(--red); border-radius: 8px; padding: 12px 16px; margin: 12px 0;
  font-size: 13px; color: #8a3a30; line-height: 1.9; }
tr.row-star td { background: #fffaf0; }
.star-tip { color: #b0483e; font-weight: 700; cursor: help; }

/* ---------- 工资分组行 ---------- */
tr.grp-head td { background: #efe9da !important; font-size: 13px; font-weight: 600; color: #6b5a2e;
  padding: 8px 14px; letter-spacing: 1px; cursor: default; }
tr.grp-head:hover td { background: #efe9da !important; }

/* ---------- 财务网盘：平铺模式 ---------- */
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.dk-tile { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 12px 10px;
  text-align: center; cursor: pointer; transition: all .18s; position: relative; }
.dk-tile:hover { border-color: var(--gold-dim); box-shadow: 0 6px 18px rgba(26,36,56,.08); transform: translateY(-2px); }
.dk-tile .dk-ico { font-size: 34px; line-height: 1.2; }
.dk-tile .dk-name { font-size: 12.5px; margin-top: 8px; word-break: break-all; max-height: 34px; overflow: hidden; }
.dk-tile .dk-meta { font-size: 10.5px; color: var(--ink2); margin-top: 4px; }
.dk-tile .dk-ops { display: flex; justify-content: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.dk-tile .dk-ops .btn { padding: 3px 8px; font-size: 11px; }
.dk-tile.dk-up { background: #faf7ef; border-style: dashed; color: var(--gold); }

/* ---------- 进出口统计：rowspan 聚合 ---------- */
.grp-cell { vertical-align: middle !important; text-align: center; }
tr.grp-mid td { border-bottom: none !important; }
/* 相邻聚合订单之间的分割线 */
tr.grp-first td { border-top: 2px solid #b9a576 !important; }
/* 公司列：点击进入详情 */
td.co-cell { cursor: pointer; }
td.co-cell:hover { color: var(--gold); text-decoration: underline; }
/* 单元格备注红色三角标记（仿 Excel 批注） */
td.has-note { position: relative; }
td.has-note::after { content: ''; position: absolute; top: 0; right: 0; width: 0; height: 0;
  border-style: solid; border-width: 0 8px 8px 0; border-color: transparent #c0392b transparent transparent; }
/* 收支统计：报销金额红字 */
td.red-num { color: #c0392b; font-weight: 600; }
.red { color: #c0392b; }
/* 收支统计：底部本月/本年合计条（吸底） */
#exTable tfoot td.ex-total { position: sticky; bottom: 0; background: #f4efe1; color: #6b5a2e;
  font-size: 13px; padding: 9px 14px; border-top: 2px solid #b9a576; text-align: left; z-index: 1; }
#exTable tfoot td.ex-total b { color: #96722f; }
#exTable tfoot td.ex-total b.red { color: #c0392b; }

/* ---------- 新增表单：发票式产品明细表 / 点击开关 / 字段提示 ---------- */
.fhint { font-size: 10px; font-weight: 400; color: #b3a67f; margin-left: 6px; letter-spacing: 0; white-space: nowrap; }
.field label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prod-group h4.prod-h { display: flex; align-items: center; gap: 10px; }
.prod-group h4.prod-h .spacer { flex: 1; }
/* 进出口统计：列宽可拖拽 + 内容缩进隐藏 + 全部居中 */
#shTable { table-layout: fixed; }
#shTable td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle !important; text-align: center; }
/* 表头整体吸顶固定（sticky 同为定位元素，列宽拖拽柄照常工作） */
#shTable thead th { position: sticky; top: 0; z-index: 4; text-align: center; }
/* 表头各项之间的浅金色竖线分隔 */
#shTable thead th { box-shadow: inset -1px 0 0 rgba(201,163,95,.32); }
#shTable .col-rz { position: absolute; right: -3px; top: 0; width: 7px; height: 100%; cursor: col-resize; z-index: 5; }
#shTable .col-rz:hover { background: var(--gold-dim); }
#shTable td.rel { position: relative; }
/* 库存出库"库"字标记：红圈金字 */
.ku { position: absolute; top: 1px; right: 2px; width: 15px; height: 15px; border-radius: 50%;
  background: #c0392b; color: #f3d27a; font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center;
  box-shadow: 0 1px 3px rgba(192,57,43,.4); pointer-events: none; }
.ku-inline { position: static; display: inline-block; vertical-align: 1px; margin-left: 3px; }
/* 备注悬浮提示 */
.note-tip { position: fixed; z-index: 9999; max-width: 320px; background: #2b2416; color: #f5eeda;
  font-size: 12.5px; line-height: 1.7; padding: 8px 12px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28); pointer-events: none; white-space: pre-wrap; word-break: break-all; }
/* 状态四圆点：交货/发货/开票/付款 */
.sdots { display: inline-flex; gap: 5px; margin-top: 5px; }
.sdot { width: 10px; height: 10px; border-radius: 50%; background: #ddd6c4; display: inline-block; cursor: help; }
.sdot.on { background: #2f9e6e; box-shadow: 0 0 0 2px rgba(47,158,110,.18); }
.sdot.mid { background: #d9a844; box-shadow: 0 0 0 2px rgba(217,168,68,.18); }
/* 任意单元格选中高亮（仿 Excel，Excel 金框） */
#shTable td.sel { background: #f0e3bd !important; outline: 1.5px solid var(--gold); outline-offset: -1.5px; }
#shTable td.sel-active { outline: 2px solid #96722f !important; outline-offset: -2px; }
/* 状态列表头的图例标记 ?（左上角浅金小圆点，悬浮出说明） */
.st-help { position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%;
  background: linear-gradient(135deg, #e7d5ac, #c9a35f); color: #fff; font-size: 10px; font-weight: 700;
  line-height: 15px; text-align: center; cursor: help; box-shadow: 0 1px 3px rgba(150,114,47,.4); }
.st-help:hover { background: linear-gradient(135deg, #c9a35f, #96722f); }
/* 状态图例悬浮卡 */
.st-legend { max-width: 300px; }
.st-legend .sl-title { font-weight: 700; color: #f3d27a; margin-bottom: 6px; font-size: 13px; }
.st-legend .sl-row { display: flex; align-items: center; gap: 5px; margin: 5px 0; font-size: 12px; }
.st-legend .sl-row .sdot { cursor: default; flex: none; }
.st-legend .sl-foot { margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(243,210,122,.35);
  font-size: 11px; color: #cfc3a4; }
.cf-dim { padding: 6px 10px 2px; }
.cf-dim-t { font-size: 12px; color: var(--ink2); margin-bottom: 2px; }
.cf-dim-opts { display: flex; flex-wrap: wrap; }
/* 下单时间区间筛选弹窗 */
.cf-range { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0; }
.cf-range label { font-size: 12px; color: var(--ink2); width: 18px; flex: none; }
.cf-range input { flex: 1; min-width: 0; }
.cf-range-tip { font-size: 11px; color: #b3a67f; padding: 8px 12px 0; }
/* 表头「下单时间」可点击 */
.th-label.po-range { cursor: pointer; }
.th-label.po-range:hover { color: var(--gold); }
/* 工具栏日期区间（订购日期筛选）带说明 */
.drange { display: flex; flex-direction: column; gap: 1px; }
.drange-in { display: flex; align-items: center; gap: 4px; }
.drange-sep { color: var(--ink2); font-size: 12px; }
.drange-cap { font-size: 10.5px; color: #b3a67f; text-align: center; letter-spacing: .5px; line-height: 1.2; }
.pill-tg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #faf7ee; }
.pill-tg .pill { padding: 7px 18px; font-size: 13px; cursor: pointer; color: var(--ink2); transition: all .15s; user-select: none; }
.pill-tg .pill + .pill { border-left: 1px solid var(--line); }
.pill-tg .pill:hover { background: #f3ecd9; }
.pill-tg .pill.on { background: var(--gold); color: #fff; font-weight: 600; }
.pill-tg.mini .pill { padding: 4px 10px; font-size: 11.5px; }
.inv-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table.inv-table { border-collapse: collapse; width: max-content; min-width: 100%; }
table.inv-table th { background: #efe9da; color: #6b6455; font-size: 11.5px; font-weight: 600; padding: 8px 8px;
  white-space: nowrap; text-align: center; border-bottom: 2px solid #d8cfae; position: sticky; top: 0; }
table.inv-table td { padding: 3px 4px; border-bottom: 1px solid #f0ece2; vertical-align: middle; }
table.inv-table td.pd-idx { text-align: center; color: var(--gold); font-weight: 700; font-size: 12px; padding: 3px 8px; }
table.inv-table input { width: 100%; border: 1px solid #e8dcbb; background: #fdfaf1; border-radius: 6px; padding: 6px 5px; font-size: 12.5px; outline: none; text-align: center; }
table.inv-table input:focus { background: #fdf6e3; box-shadow: inset 0 0 0 1.5px var(--gold-dim); }
table.inv-table input[list] { text-align: left; }
table.inv-table select { border: 1px solid #e8dcbb; background: #fdfaf1; border-radius: 6px; padding: 6px 4px; font-size: 12.5px; }
table.inv-table select { border: 1px solid var(--line); border-radius: 6px; padding: 5px 4px; font-size: 12px; background: #fff; }
table.inv-table tr:hover td { background: #fbf8f0; }
.inv-foot { display: flex; justify-content: flex-end; gap: 26px; padding: 10px 14px; margin-top: 8px;
  background: #f8f4e8; border: 1px solid var(--gold-dim); border-radius: 8px; font-size: 13px; color: var(--ink2); }
.inv-foot b { color: #96722f; font-size: 15px; }

/* ---------- 新增表单：产品卡片（销售+采购一体） ---------- */
.prod-card { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; background: #fff; overflow: hidden; }
.prod-card-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px;
  background: linear-gradient(120deg, #f4efe1, #faf6ea); border-bottom: 1px solid var(--line); }
.prod-card-head .prod-no { font-size: 13px; font-weight: 700; color: #96722f; letter-spacing: 2px; }
.prod-sec { padding: 12px 14px 4px; }
.prod-sec + .prod-sec { border-top: 1px dashed #eee6d2; }
.prod-sec-title { font-size: 11.5px; color: var(--ink2); letter-spacing: 2px; margin-bottom: 8px; }
.prod-total { margin-top: 4px; padding: 10px 16px; background: #f8f4e8; border: 1px solid var(--gold-dim);
  border-radius: 8px; font-size: 13px; color: var(--ink); }
.prod-total b { color: #96722f; font-size: 15px; }

/* ---------- 新增表单：尾部双上传区 ---------- */
.up-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.up-box { border: 1px dashed var(--gold-dim); border-radius: 10px; padding: 14px; background: #fdfcf8; }
.up-box .up-t { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; letter-spacing: 1px; }
.up-box .contract-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 财务网盘：⋯ 菜单 ---------- */
.dk-more { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: none; border-radius: 6px;
  background: transparent; color: var(--ink2); font-size: 16px; font-weight: 700; cursor: pointer; line-height: 1; }
.dk-more:hover { background: rgba(201,163,95,.16); color: var(--gold); }
.dk-more-row { position: static; width: 28px; height: 24px; }
.dk-menu { position: fixed; z-index: 80; min-width: 120px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 10px 30px rgba(26,36,56,.16); padding: 4px; }
.dk-menu-item { padding: 8px 14px; font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.dk-menu-item:hover { background: #f4efe1; }
.dk-menu-item.danger { color: var(--red); }
.dk-menu-item.danger:hover { background: #fbeae8; }

/* ---------- 收支统计：利润双栏表 ---------- */
.ex-profit-h { text-align: center !important; font-size: 13px; letter-spacing: 6px; }
td.ex-gap, th.ex-gap { width: 14px; background: #f7f4ec !important; border: none !important; padding: 0 !important; }
