:root {
  font-size: 16px;
  --c-primary: #1f6feb; --c-primary-d: #1557c0; --c-bg: #f4f6f9; --c-card: #fff; --c-border: #e3e7ee;
  --c-text: #1d2433; --c-sub: #6b7385; --c-ok: #1a9b5a; --c-warn: #d98a00; --c-err: #d63b3b;
  --radius: 10px; --side-w: 210px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--c-bg); color: var(--c-text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif; line-height: 1.5; }
body { font-size: 1rem; }
a { color: var(--c-primary); text-decoration: none; cursor: pointer; }
button, input, select, textarea { font: inherit; color: inherit; }
[v-cloak] { display: none; }

/* layout */
.layout { display: flex; min-height: 100vh; }
.side { width: var(--side-w); background: #121a2b; color: #c9d1e3; position: fixed; top: 0; bottom: 0; left: 0;
  display: flex; flex-direction: column; z-index: 20; }
.side .brand { font-size: 1.2143rem; font-weight: 600; color: #fff; padding: 18px 18px 6px; }
.side .company { font-size: 0.8571rem; color: #8792aa; padding: 0 18px 14px; }
.side nav a { display: flex; align-items: center; gap: 10px; color: #c9d1e3; padding: 10px 18px; }
.side nav a:hover { background: #1b2540; }
.side nav a.on { background: var(--c-primary); color: #fff; }
.side .foot { margin-top: auto; padding: 14px 18px; font-size: 0.8571rem; color: #8792aa; }
.main { flex: 1; margin-left: var(--side-w); padding: 20px 24px 40px; min-width: 0; }
.topbar { display: none; }
.tabbar { display: none; }
.badge { background: var(--c-err); color: #fff; border-radius: 9px; font-size: 0.7857rem; padding: 0 6px; line-height: 17px;
  min-width: 17px; text-align: center; margin-left: auto; }
.ico { width: 18px; text-align: center; }

h1.page { font-size: 1.4286rem; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h1.page .sp { flex: 1; }
h3 { font-size: 1.0714rem; margin: 0 0 10px; }

.card { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.nw { flex-wrap: nowrap; }
.sp { flex: 1; }
.muted { color: var(--c-sub); }
.small { font-size: 0.8571rem; }
.right { text-align: right; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.ok { color: var(--c-ok); } .warn { color: var(--c-warn); } .err { color: var(--c-err); }

.stat { background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { color: var(--c-sub); font-size: 0.9286rem; }
.stat .v { font-size: 1.7143rem; font-weight: 600; margin-top: 2px; }
.stat .s { color: var(--c-sub); font-size: 0.8571rem; margin-top: 2px; }
.stat.link { cursor: pointer; }
.stat.link:hover { border-color: var(--c-primary); }

/* form controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--c-border);
  background: #fff; border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn.primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn.primary:hover { background: var(--c-primary-d); color: #fff; }
.btn.danger { color: var(--c-err); }
.btn.danger:hover { border-color: var(--c-err); }
.btn.sm { padding: 3px 9px; font-size: 0.8571rem; border-radius: 6px; }
.btn.lg { padding: 11px 20px; font-size: 1.1429rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.input, select.input, textarea.input { border: 1px solid var(--c-border); border-radius: 8px; padding: 7px 10px; background: #fff;
  min-width: 0; width: 100%; outline: none; }
.input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(31,111,235,.12); }
.input.hl-warn { border-color: var(--c-warn); background: #fff8e8; }
.input.hl-err { border-color: var(--c-err); background: #fff1f1; }
.input[readonly] { background: #f6f7f9; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 0.8571rem; color: var(--c-sub); min-width: 0; }
label.f > span { white-space: nowrap; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--c-border); background: #fff; border-radius: 14px; padding: 3px 11px; cursor: pointer; font-size: 0.8571rem; }
.chip.on, .chip:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { border-collapse: collapse; width: 100%; background: #fff; }
.tbl th, .tbl td { border-bottom: 1px solid var(--c-border); padding: 8px 10px; text-align: left; white-space: nowrap; }
.tbl th { background: #f7f9fc; color: var(--c-sub); font-weight: 500; font-size: 0.9286rem; position: sticky; top: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f3f7ff; }
.tbl tfoot td { font-weight: 600; background: #fdf3ec; }
.tag { display: inline-block; font-size: 0.8571rem; padding: 0 7px; border-radius: 4px; line-height: 20px; background: #eef1f6; color: var(--c-sub); }
.tag.ok { background: #e3f6ec; color: var(--c-ok); }
.tag.warn { background: #fff3dc; color: var(--c-warn); }
.tag.err { background: #fde7e7; color: var(--c-err); }
.tag.blue { background: #e6efff; color: var(--c-primary); }

/* review workbench */
.bench { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr); gap: 16px; align-items: start; }
/* 独立命名，避免浏览器扩展注入的 Viewer.js 等全局样式覆盖图片布局。 */
.receipt-viewer { background: #2a2f3a; border-radius: var(--radius); position: sticky; top: 12px; overflow: hidden; }
.receipt-viewer .receipt-stage { height: calc(100vh - 150px); min-height: 360px; overflow: auto; display: flex; }
.receipt-viewer .receipt-stage img { margin: auto; transition: transform .15s; transform-origin: center center; max-width: none; user-select: none; }
.receipt-viewer .receipt-tools { display: flex; gap: 6px; padding: 8px; background: #1e222b; flex-wrap: wrap; }
.receipt-viewer .receipt-tools .btn { background: #343a47; border-color: #434a5a; color: #e6e9ef; }
.receipt-viewer .receipt-thumbs { display: flex; gap: 6px; padding: 0 8px 8px; background: #1e222b; overflow-x: auto; }
.receipt-viewer .receipt-thumbs img { height: 54px; border-radius: 4px; opacity: .6; cursor: pointer; border: 2px solid transparent; }
.receipt-viewer .receipt-thumbs img.on { opacity: 1; border-color: var(--c-primary); }
.queue { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
.queue .qi { flex: 0 0 auto; width: 92px; border: 2px solid transparent; border-radius: 8px; background: #fff; cursor: pointer; overflow: hidden; }
.queue .qi.on { border-color: var(--c-primary); }
.queue .qi img { width: 100%; height: 70px; object-fit: cover; display: block; background: #ddd; }
.queue .qi div { font-size: 0.7857rem; padding: 2px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.issues { margin: 0 0 12px; padding: 0; list-style: none; }
.issues li { padding: 6px 10px; border-radius: 6px; margin-bottom: 4px; font-size: 0.9286rem; }
.issues li.error { background: #fde7e7; color: var(--c-err); }
.issues li.warn { background: #fff3dc; color: #9a6200; }

.items-tbl td { padding: 4px 4px; }
.items-tbl .input { padding: 5px 7px; }
.totals { background: #f7f9fc; border-radius: 8px; padding: 10px 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; }
.totals b { font-size: 1.1429rem; }

/* images grid */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.img-card { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); overflow: hidden; cursor: pointer; }
.img-card:hover { border-color: var(--c-primary); }
.img-card img { width: 100%; height: 170px; object-fit: cover; display: block; background: #e8ebf0; }
.img-card .meta { padding: 7px 9px; font-size: 0.8571rem; }
.img-card .meta .fn { font-weight: 500; font-size: 0.8571rem; word-break: break-all; }
.img-card .snip { color: var(--c-sub); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: #ffe58a; padding: 0 1px; border-radius: 2px; }

.lightbox { position: fixed; inset: 0; background: rgba(10,12,18,.92); z-index: 100; display: flex; flex-direction: column; }
.lightbox .lb-top { display: flex; gap: 8px; padding: 10px 14px; color: #fff; align-items: center; flex-wrap: wrap; }
.lightbox .lb-top .btn { background: #2a2f3a; border-color: #3a4150; color: #fff; }
.lightbox .lb-body { flex: 1; overflow: auto; display: flex; }
.lightbox .lb-body img { margin: auto; max-width: 100%; max-height: 100%; }
.lightbox .lb-body.zoom img { max-width: none; max-height: none; }

/* upload */
.drop { border: 2px dashed #b8c3d6; border-radius: var(--radius); padding: 36px 16px; text-align: center; background: #fbfcfe; }
.drop.over { border-color: var(--c-primary); background: #f0f6ff; }
.up-list .ui { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--c-border); }
.up-list img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: #eee; }
.bar { height: 5px; background: #e8ebf0; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; background: var(--c-primary); transition: width .2s; }

/* agent */
.chat { display: flex; flex-direction: column; height: calc(100vh - 90px); }
.chat .msgs { flex: 1; overflow-y: auto; padding: 4px 2px 12px; }
.msg { margin: 0 0 14px; display: flex; }
.msg.user { justify-content: flex-end; }
.msg .bubble { max-width: 860px; padding: 10px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--c-border); min-width: 0; }
.msg.user .bubble { background: var(--c-primary); color: #fff; border-color: var(--c-primary); white-space: pre-wrap; }
.msg .bubble .txt { white-space: pre-wrap; word-break: break-word; }
.artifact { margin-top: 10px; border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden; }
.artifact .ah { display: flex; gap: 8px; align-items: center; padding: 6px 10px; background: #f7f9fc; font-size: 0.9286rem; }
.artifact pre { margin: 0; padding: 8px 10px; background: #1d2433; color: #d6deeb; font-size: 0.8571rem; white-space: pre-wrap; }
.artifact .tbl-wrap { max-height: 360px; }
.chat .composer { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--c-border); }
.chat .composer textarea { resize: vertical; height: 4rem; min-height: 4rem; max-height: 10rem; }

.chart { width: 100%; height: 320px; }
.empty { text-align: center; color: var(--c-sub); padding: 36px 0; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }

.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; padding: 9px 18px; border-radius: 8px;
  background: #1d2433; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 90vw; }
.toast.err { background: var(--c-err); }
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 12px; padding: 18px; width: 460px; max-width: 100%; max-height: 90vh; overflow-y: auto; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login .card { width: 360px; max-width: 100%; padding: 28px; }

/* t-cards: mobile list */
.tcards { display: none; }
.tcard { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; }
.tcard img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: #eee; flex: 0 0 auto; }
.tcard .b { flex: 1; min-width: 0; }

@media (max-width: 900px) {
  .side { display: none; }
  .main { margin-left: 0; padding: 60px 12px 84px; }
  .topbar { display: flex; position: fixed; top: 0; left: 0; right: 0; height: 48px; background: #121a2b; color: #fff; z-index: 30;
    align-items: center; padding: 0 14px; gap: 10px; font-weight: 600; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--c-border);
    z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; text-align: center; padding: 7px 0 6px; font-size: 0.7857rem; color: var(--c-sub); position: relative; }
  .tabbar a .ti { display: block; font-size: 1.3571rem; line-height: 24px; }
  .tabbar a.on { color: var(--c-primary); }
  .tabbar a.cam .ti { background: var(--c-primary); color: #fff; width: 46px; height: 46px; line-height: 46px; border-radius: 50%;
    margin: -20px auto 0; box-shadow: 0 4px 12px rgba(31,111,235,.4); }
  .tabbar a .badge { position: absolute; top: 2px; left: 55%; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3, .g2 { grid-template-columns: minmax(0, 1fr); }
  .bench { grid-template-columns: minmax(0, 1fr); }
  .receipt-viewer { position: static; }
  .receipt-viewer .receipt-stage { height: 52vh; }
  .stat .v { font-size: 1.4286rem; }
  .tbl-desktop { display: none; }
  .tcards { display: block; }
  .chat { height: calc(100vh - 150px); }
  .img-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .img-card img { height: 130px; }
  h1.page { font-size: 1.2857rem; }
  .totals { grid-template-columns: repeat(2, 1fr); }
}
.more-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-menu a { background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 16px 6px; text-align: center; color: var(--c-text); }
.more-menu a .ti { display: block; font-size: 1.5714rem; margin-bottom: 4px; }

/* ===== V1.1：三档颜色 ===== */
:root { --t-red: #e5484d; --t-yellow: #e5a000; --t-green: #1a9b5a; --t-human: #1f6feb; }
.tier-red .input, .input.tier-red { border-color: var(--t-red); background: #fff2f2; }
.tier-yellow .input, .input.tier-yellow { border-color: var(--t-yellow); background: #fff9e8; }
.tier-green .input, .input.tier-green { border-color: #9fd8b8; background: #f3fbf6; }
.tier-human .input, .input.tier-human { border-color: #9cbcf5; background: #f3f7ff; }
.step { position: relative; border-radius: 9px; padding: 4px 6px 6px; margin: -4px -6px -6px; transition: background .15s; }
.step.active { background: #eaf1ff; box-shadow: 0 0 0 2px var(--c-primary) inset; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.dot.red { background: var(--t-red); } .dot.yellow { background: var(--t-yellow); } .dot.green { background: var(--t-green); } .dot.human { background: var(--t-human); }
.score { font-size: 0.7857rem; font-weight: 600; margin-left: 4px; padding: 0 5px; border-radius: 4px; }
.score.red { background: #fde4e4; color: var(--t-red); } .score.yellow { background: #fff1cf; color: #a06d00; }
.score.green { background: #e1f5ea; color: var(--t-green); } .score.human { background: #e3edff; color: var(--t-human); }
.why { font-size: 0.7857rem; color: var(--c-sub); margin-top: 2px; line-height: 1.35; }
.legend { display: flex; gap: 12px; font-size: 0.8571rem; color: var(--c-sub); flex-wrap: wrap; }
.kbd { display: inline-block; border: 1px solid #c9d0dc; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 0.7857rem; background: #fff; color: var(--c-text); line-height: 17px; }

/* 原图 + 字段框 */
.receipt-viewer .receipt-stage { position: relative; }
.receipt-sheet { flex: 0 0 auto; margin: auto; padding: 20px; }
.receipt-sheet.has-selection { padding-inline: 7rem; }
.receipt-viewer .receipt-image-wrap { position: relative; }
.receipt-viewer .receipt-image-wrap img { width: 100%; height: 100%; display: block; user-select: none; }
.fbox { --box-rgb: 229,160,0; position: absolute; padding: 0; border: 1px solid currentColor; border-radius: 2px; background: rgba(var(--box-rgb),.16); cursor: pointer; }
.fbox.red { --box-rgb: 229,72,77; color: var(--t-red); } .fbox.yellow { color: #b77d00; }
.fbox.green { --box-rgb: 26,155,90; color: var(--t-green); } .fbox.human { --box-rgb: 31,111,235; color: var(--t-human); }
.fbox.active, .fbox:hover, .fbox:focus-visible { border-width: 2px; z-index: 2; outline: none;
  background: linear-gradient(currentColor,currentColor) left top / 10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) left top / 2px 10px no-repeat,
    linear-gradient(currentColor,currentColor) right top / 10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) right top / 2px 10px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom / 10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) left bottom / 2px 10px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom / 10px 2px no-repeat,
    linear-gradient(currentColor,currentColor) right bottom / 2px 10px no-repeat;
  background-color: rgba(var(--box-rgb),.32); }
.receipt-canvas { display: grid; grid-template-columns: minmax(0,1fr); }
.box-label { position: absolute; transform: translate(-100%,-50%); white-space: nowrap; max-width: 6.5rem; overflow: hidden; text-overflow: ellipsis; border: 1px solid #fff8; border-radius: 4px; background: #9b6800; color: white; font-size: .8571rem; line-height: 1.4; padding: 2px 6px; cursor: pointer; z-index: 3; }
.box-label.red { background: #c93640; } .box-label.green { background: #16743e; } .box-label.human { background: #225fbc; }
.box-label.active { outline: 2px solid white; outline-offset: 1px; }
.box-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.box-leaders line { stroke: #ffd358; stroke-width: 2; }
.detail-field { color: inherit; font: inherit; text-align: left; background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 5px; }
.detail-field:disabled { opacity: 1; }
.detail-field:not(:disabled), .detail-item { cursor: pointer; }
.detail-field:not(:disabled):hover, .detail-field.on, .detail-item.on { background: #edf4ff; border-color: #95b9ed; }
.detail-item:focus-visible { outline: 2px solid var(--c-primary); outline-offset: -2px; }
.drawer-ticket-grid { grid-template-columns: minmax(0,1.2fr) minmax(0,1.05fr); align-items: start; }
.receipt-thumb { display: block; width: 100%; height: 190px; background: #eef0f4; }
.receipt-thumb rect { fill: #ffc400; fill-opacity: .38; stroke: #c38000; stroke-width: 3; vector-effect: non-scaling-stroke; }

/* 可搜索下拉 */
.smart-search { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #baccea; border-radius: 12px; padding: 10px; background: #fbfdff; }
.smart-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px #1f6feb12; }
.search-tokens { display: flex; flex: 1; min-width: 0; flex-wrap: wrap; align-items: center; gap: 7px; }
.filter-token { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow-wrap: anywhere; padding: 4px 7px; border-radius: 6px; background: #eaf1ff; color: #2255a5; font-size: 0.8571rem; }
.filter-token button, .clear-search { border: 0; background: transparent; color: #67748c; cursor: pointer; font-size: 1.3571rem; padding: 0 4px; }
.filter-token button:hover, .clear-search:hover { color: #cc363b; background: #fff0f0; border-radius: 4px; }
.search-actions { display: flex; align-items: center; gap: 7px; }
.suggest-input { position: relative; min-width: 0; width: 100%; }
.search-tokens > .suggest-input { flex: 1 1 290px; }
.search-tokens > .suggest-input > input { background: transparent; border: 0; box-shadow: none; padding: 6px; }
.suggest-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: max(100%, 260px); max-width: min(520px, 85vw); max-height: 330px; overflow-y: auto; background: white; border: 1px solid var(--c-border); border-radius: 10px; box-shadow: 0 12px 32px #1c335122; padding: 5px; }
.suggest-menu button { display: flex; width: 100%; gap: 4px; text-align: left; border: 0; border-radius: 5px; background: white; padding: 9px; cursor: pointer; overflow-wrap: anywhere; }
.suggest-menu button.hi, .suggest-menu button:hover, .suggest-menu button:focus-visible { background: #edf4ff; }
.suggest-kind { color: #67748c; flex-shrink: 0; }
.suggest-hint { font-size: 0.8571rem; color: #67748c; padding: 8px; }
.suggest-menu .suggest-submit { color: #1f6feb; border-top: 1px solid #eef1f6; }
.table-workspace { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 20px; }
.table-workspace.with-agent { grid-template-columns: minmax(0,1fr) minmax(340px,38%); }
.table-main { min-width: 0; }
.agent-panel { position: sticky; top: 20px; height: calc(100dvh - 40px); min-width: 0; background: #f6f8fc; border-left: 1px solid var(--c-border); display: flex; flex-direction: column; padding: 16px; }
.agent-panel-head { padding-bottom: 12px; }
.agent-panel .chat { flex: 1; min-height: 0; height: auto; }
.agent-panel .chat h1 { font-size: 1.4286rem; flex-wrap: wrap; }
.font-size-control { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8571rem; font-weight: 400; white-space: nowrap; }
.font-size-control .input { width: auto; }
.side .font-size-control { margin-top: 8px; }
.side .font-size-control select { color: var(--c-text); }
@media (max-width: 900px) {
  .table-workspace.with-agent { grid-template-columns: minmax(0,1fr); }
  .agent-panel { position: static; height: 65dvh; border: 1px solid var(--c-border); border-radius: 10px; scroll-margin-top: 60px; }
}
@media (max-width: 700px) { .smart-search { flex-direction: column; } .search-tokens { width: 100%; } .search-actions { width: 100%; justify-content: flex-end; } }
.combo { position: relative; }
.combo .menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--c-border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 40; max-height: 280px; overflow-y: auto; padding: 4px 0; }
.combo .opt { padding: 7px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; font-size: 0.9286rem; }
.combo .opt.hi { background: #eaf1ff; }
.combo .opt .sub { color: var(--c-sub); font-size: 0.7857rem; margin-left: auto; }
.combo .opt.add { color: var(--c-primary); border-top: 1px solid var(--c-border); }
.combo .grp { font-size: 0.7857rem; color: var(--c-sub); padding: 6px 12px 2px; }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 80; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(1040px, 92vw); background: var(--c-bg); z-index: 81; display: flex; flex-direction: column;
  box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.drawer .dh { background: #fff; padding: 12px 18px; border-bottom: 1px solid var(--c-border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.drawer .tabs { display: flex; gap: 2px; background: #fff; padding: 0 12px; border-bottom: 1px solid var(--c-border); }
.drawer .tabs a { padding: 9px 14px; color: var(--c-sub); border-bottom: 2px solid transparent; }
.drawer .tabs a.on { color: var(--c-primary); border-bottom-color: var(--c-primary); font-weight: 500; }
.drawer .db { flex: 1; overflow-y: auto; padding: 16px 18px 40px; }
.seg { display: inline-flex; border: 1px solid var(--c-border); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { padding: 6px 14px; color: var(--c-sub); font-size: 0.9286rem; }
.seg a.on { background: var(--c-primary); color: #fff; }
.dropdown { position: relative; display: inline-block; }
.dropdown .dm { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--c-border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 40; min-width: 200px; padding: 4px 0; }
.dropdown .dm a { display: block; padding: 8px 14px; color: var(--c-text); font-size: 0.9286rem; }
.dropdown .dm a:hover { background: #f3f7ff; }
.confirm-sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 1rem; margin: 10px 0 14px; }
.confirm-sum .k { color: var(--c-sub); }
.qi .dots { font-size: 0.7857rem; padding: 0 5px 3px; }
.side .user-menu a { display: block; color: #8792aa; padding: 2px 0; }

@media (max-width: 900px) {
  .drawer { width: 100vw; }
  .drawer .db { padding: 12px 10px 90px; }
  .drawer-ticket-grid { grid-template-columns: minmax(0,1fr); }
  .itemrow { flex-wrap: wrap !important; }
  .itemrow > input:nth-of-type(1) { flex: 1 1 calc(100% - 30px) !important; }
  .itemrow > input:nth-of-type(2) { flex: 1 1 100% !important; }
}
