/* GLA EventOps CRM · Nexora Digital Solutions
   配色直接取自 Galaxy Advertising 品牌标识:
     #183c78 深蓝(骨架)/ #0c78c0 主蓝(进行中)/ #54b4e4 天蓝(切面)
     #e02e8b 品红(仅用于「需要你处理」)/ #a8d8f0 浅蓝
   品红是全站最贵的颜色 —— 只给未读、逾期、低利润。 */
:root {
  --navy:     #183c78;
  --blue:     #0c78c0;
  --sky:      #54b4e4;
  --pale:     #a8d8f0;
  --magenta:  #e02e8b;
  --go:       #1a9e6b;
  --warn:     #c2410c;

  --bg:       #f4f7fa;
  --surface:  #ffffff;
  --surface-2:#f8fafc;
  --line:     #dde4ed;
  --text:     #14171c;
  --muted:    #667283;

  --r: 8px;
  --pad: 16px;
  --shadow: 0 1px 2px rgba(24, 60, 120, .06), 0 1px 3px rgba(24, 60, 120, .04);
  font-synthesis: none;
}

/* 现场执行常在暗环境下用手机,给一套暗色 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:       #0d1420;
    --surface:  #141d2e;
    --surface-2:#1b2639;
    --line:     #26344b;
    --text:     #e7ecf3;
    --muted:    #8695ab;
    --navy:     #6fa3e0;   /* 暗底上深蓝不可读,提亮 */
    --shadow: none;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* hidden 属性必须压过 display:grid / flex,否则登出后登录页不显示 */
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", "PingFang SC",
               "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px;
}

/* 金额、编号、时间一律等宽 + 表格数字,列才对得齐 */
.num, .code, .money {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
}
.money { letter-spacing: -0.01em; }

/* ---------- 顶栏 ---------- */
header.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px var(--pad);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* 品牌色条:深蓝→主蓝→天蓝,末端一点品红。取自 logo 螺旋的渐层 */
header.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 45%,
              var(--sky) 72%, var(--magenta) 100%);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 28px; height: 28px; flex: none; }
.brand .txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; color: var(--text); }
.brand span {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--muted);
}
.who { font-size: 12px; color: var(--muted); text-align: right; }
.who em { display: block; font-style: normal; color: var(--navy); font-weight: 600; }

/* ---------- 布局 ---------- */
main { padding: var(--pad); max-width: 900px; margin: 0 auto; }
.view[hidden] { display: none; }
h2 {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--navy);
  margin: 24px 0 10px;
  display: flex; align-items: center; gap: 10px;
}
h2::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}
h2:first-child { margin-top: 0; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.stat .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin-bottom: 6px;
}
.stat .value { font-size: 22px; font-weight: 600; color: var(--navy); }
.stat .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat.alert { border-left: 3px solid var(--magenta); }
.stat.alert .value { color: var(--magenta); }
.stat.good  .value { color: var(--go); }

/* ---------- 管道条(run-down 式) ---------- */
.pipeline { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.pipeline i { display: block; height: 100%; }
.pipeline-legend {
  display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px;
  font-size: 12px; color: var(--muted);
}
.pipeline-legend span { display: flex; align-items: center; gap: 6px; }
.pipeline-legend b { color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }

/* ---------- 列表行 ---------- */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); margin-bottom: 8px; box-shadow: var(--shadow);
  cursor: pointer; text-align: left; width: 100%;
  color: inherit; font: inherit;
  transition: border-color .12s ease, transform .12s ease;
}
.row:hover, .row:focus-visible { border-color: var(--blue); transform: translateX(1px); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 550; }
.row .meta {
  font-size: 12px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row .right { text-align: right; flex: none; }

/* ---------- 徽标 ---------- */
.chip {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px;
  border: 1px solid currentColor; white-space: nowrap;
}
.chip.new  { color: var(--magenta); }
.chip.work { color: var(--blue); }
.chip.won  { color: var(--go); }
.chip.dead { color: var(--muted); }
.chip.warn { color: var(--warn); }

.src {
  font-size: 9px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--blue); border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 2px 5px; border-radius: 3px;
}
.unread {
  background: var(--magenta); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 20px; text-align: center;
  border-radius: 99px; padding: 1px 6px;
}

/* ---------- 表单 ---------- */
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 11px 12px; font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent;
}
.field { margin-bottom: 14px; }

/* ---------- 密码可见切换 ----------
   密码框里那一串圆点,是给肩后偷看的人设的防线。
   但录入一个 12 位随机密码时,肩后没有人,而打错一个字符的代价是
   「邮箱或密码错误」—— 一句什么都没说的话。
   所以给一个开关,默认关。 */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px;
  background: none; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.pw-eye:hover { color: var(--blue); }
.pw-eye:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.pw-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }

button.btn {
  background: var(--navy); color: #fff;
  border: 0; border-radius: 6px; padding: 12px 16px;
  font: inherit; font-weight: 650; cursor: pointer; width: 100%;
  transition: background .12s ease;
}
button.btn:hover { background: var(--blue); }
button.btn:disabled { opacity: .5; cursor: not-allowed; }
button.btn.ghost {
  background: transparent; color: var(--navy); border: 1px solid var(--line);
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- 底部导航 ---------- */
nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
nav.tabs a {
  padding: 12px 4px 14px; text-align: center; text-decoration: none;
  color: var(--muted); font-size: 11px; letter-spacing: .04em;
  border-top: 2px solid transparent; margin-top: -1px;
}
nav.tabs a[aria-current="page"] { color: var(--navy); border-top-color: var(--magenta); }
nav.tabs b { display: block; font-size: 16px; font-weight: 400; margin-bottom: 2px; }

/* ---------- 登录:切面场 ---------- */
.login-wrap {
  position: relative; overflow: hidden;
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: var(--surface);
}
/* 品牌标识右侧那组三角切面 —— 全站唯一一处装饰 */
.facets {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .9;
}
@media (prefers-color-scheme: dark) { .facets { opacity: .28; } }

.login { position: relative; z-index: 1; width: 100%; max-width: 360px; }
.login .mark { display: block; width: 64px; height: 64px; margin: 0 auto 16px; }
.login h1 {
  text-align: center; font-size: 20px; font-weight: 650;
  letter-spacing: -0.01em; margin-bottom: 4px;
}
/* 曾经叫 .tag。而 .tag 在别处是个 inline-flex 的胶囊 chip(见「标签」一节),
   于是这行副标题被那份 display 和边框劫持,收缩成胶囊、贴到左边。
   text-align: center 对一个 inline-flex 元素的**自身位置**不起作用 ——
   它只管里面的字。改名比加 !important 诚实。 */
.login .brandline {
  display: block;
  text-align: center; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .14em; margin-bottom: 28px;
}
.login .card { padding: 20px; }
.err {
  color: var(--magenta); font-size: 13px; margin-bottom: 12px; min-height: 18px;
}
.login .foot {
  text-align: center; margin-top: 18px; font-size: 11px; color: var(--muted);
}

/* ---------- 空状态 ---------- */
.empty { color: var(--muted); text-align: center; padding: 40px 16px; font-size: 14px; }
.empty b { display: block; color: var(--text); margin-bottom: 6px; font-weight: 550; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 会话详情 ---------- */
.thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 12px; font-size: 14px; }
.bubble.in {
  align-self: flex-start; background: var(--surface); border: 1px solid var(--line);
  border-bottom-left-radius: 3px;
}
.bubble.out {
  align-self: flex-end; background: var(--navy); color: #fff;
  border-bottom-right-radius: 3px;
}
@media (prefers-color-scheme: dark) { .bubble.out { color: var(--bg); } }
.bubble .body { white-space: pre-wrap; word-break: break-word; }
.bubble .stamp { font-size: 10px; opacity: .65; margin-top: 4px; }
.bubble .stamp em { font-style: normal; }
.bubble .stamp em.billable { color: var(--magenta); opacity: 1; font-weight: 600; }
.bubble.out .stamp em.billable { color: var(--sky); }

/* ---------- 回复框 ---------- */
/* 不再用 sticky 浮动(会盖住气泡且透明穿透)。改为正常流里的实心输入卡片,
   永远排在消息下方,绝不遮挡;body 底部已留 72px 给固定导航,回复框和归档区都能露全。 */
.composer {
  margin-top: 12px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.composer textarea { resize: vertical; min-height: 64px; margin-bottom: 8px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 8px; min-height: 16px; }
.hint.billable { color: var(--magenta); }
.hint.err-text { color: var(--magenta); }

/* ---------- 记录缺口:需要人介入,归品红 ---------- */
.gap {
  background: var(--surface); border: 1px solid var(--magenta);
  border-left: 3px solid var(--magenta);
  border-radius: var(--r); padding: 14px; margin-bottom: 16px;
}
.gap b { display: block; color: var(--magenta); margin-bottom: 6px; }
.gap p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.gap textarea { resize: vertical; margin-bottom: 10px; }

/* ---------- 配额面板 ---------- */
nav.tabs { grid-template-columns: repeat(5, 1fr); }
.quota-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.quota-head .money { font-size: 20px; font-weight: 600; color: var(--navy); }
.quota-head .hint { margin: 0; }
.warn-num { color: var(--warn); }
.linkbtn {
  background: none; border: 0; padding: 0; font: inherit; font-size: 12px;
  color: var(--blue); cursor: pointer; text-decoration: underline;
}
.linkbtn:disabled { color: var(--muted); cursor: default; text-decoration: none; }

/* ====================================================================
   v0.5.0 新增:详情页、子标签、Run-down、报表、模态
   ==================================================================== */

/* 六个标签了。再多就得折行,那时候该做「更多」二级页而不是加第七个。 */
nav.tabs { grid-template-columns: repeat(6, 1fr); }
nav.tabs a { font-size: 10px; }

/* ---------- 顶栏:通知铃 ---------- */
.who { display: flex; align-items: center; gap: 10px; }
.who em { text-align: right; }
.bell {
  position: relative; background: none; border: 0; cursor: pointer;
  color: var(--navy); font-size: 15px; padding: 4px 6px; line-height: 1;
}
.bell .badge {
  position: absolute; top: -2px; right: -4px;
  background: var(--magenta); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 1;
  border-radius: 99px; padding: 2px 4px; min-width: 14px;
}

/* ---------- 键值对(详情页主力)---------- */
.kvs { display: grid; gap: 2px; }
.kv {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 6px 0; border-bottom: 1px solid var(--surface-2); font-size: 13px;
}
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); flex: none; }
.kv b { font-weight: 550; text-align: right; word-break: break-word; }
.note { margin-top: 10px; font-size: 13px; color: var(--muted); white-space: pre-wrap; }

/* 需要人介入 → 品红。全站唯一用法。 */
.warnbar {
  margin-top: 10px; padding: 8px 10px; border-radius: 6px;
  background: color-mix(in srgb, var(--magenta) 8%, transparent);
  border-left: 3px solid var(--magenta);
  color: var(--magenta); font-size: 12px;
}

/* ---------- 列表行的变体 ---------- */
.row.static { cursor: default; }
.row.static:hover { border-color: var(--line); transform: none; }
.row.off { opacity: .5; }
.row.fresh { border-left: 3px solid var(--magenta); }
.row .right .linkbtn { display: block; margin-top: 4px; }
.sub-money { font-size: 12px; color: var(--muted); margin-top: 4px; }
.mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mb8 { margin-bottom: 8px; }
.btn.back { width: auto; padding: 6px 12px; font-size: 13px; margin-bottom: 12px; }
.stars { color: var(--sky); font-size: 11px; letter-spacing: -1px; }

/* ---------- 项目详情的子标签 ---------- */
.subtabs {
  display: flex; gap: 2px; overflow-x: auto; margin: 20px 0 12px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button {
  flex: none; background: none; border: 0; cursor: pointer;
  padding: 9px 12px; font: inherit; font-size: 12px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.subtabs button.on { color: var(--navy); border-bottom-color: var(--magenta); font-weight: 600; }

/* ---------- 紧凑表单 ---------- */
.inline { display: flex; gap: 10px; }
.inline .field { flex: none; width: 96px; }
.inline .field.grow { flex: 1; width: auto; }
select.mini, input.mini {
  width: auto; padding: 5px 8px; font-size: 12px; border-radius: 5px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; margin: 0;
  font-size: 12px; color: var(--text);
  border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px;
  background: var(--surface-2); cursor: pointer;
}
.tag input { width: auto; }
.danger-zone { margin-top: 16px; border-style: dashed; }

/* ---------- 附件 ---------- */
.att {
  display: inline-block; margin-top: 6px; padding: 4px 8px;
  font: inherit; font-size: 11px; border-radius: 6px; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid var(--line); color: inherit;
}
.att.pending { opacity: .6; cursor: default; }
.att.dead { color: var(--magenta); border-color: var(--magenta); cursor: default; }
.bubble.out .att { border-color: rgba(255,255,255,.35); color: inherit; }
.thread { max-height: 68vh; overflow-y: auto; padding-right: 4px; }

/* ---------- Run-down ---------- */
.row.rd { align-items: flex-start; }
.rd-time {
  flex: none; width: 52px; font-size: 13px; font-weight: 600; color: var(--navy);
  padding-top: 1px;
}
.rd-time small { font-weight: 400; color: var(--muted); font-size: 10px; }
.meta.backup { color: var(--muted); white-space: normal; }

/* ---------- 报表:逐月条 ---------- */
.mbar { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12px; }
.mbar .pipeline { flex: 1; height: 8px; }
.mbar .num { flex: none; width: 56px; color: var(--muted); }
.mbar .money { flex: none; width: 84px; text-align: right; font-size: 12px; }

/* ---------- 一次性密码 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: rgba(13, 20, 32, .55); padding: 24px;
}
.modal .card { max-width: 320px; width: 100%; text-align: center; }
.modal .pw {
  font-size: 20px; font-weight: 600; letter-spacing: .06em;
  margin: 14px 0 18px; user-select: all; word-break: break-all;
}

/* ---------- 语言切换 ---------- */
.langrow { display: flex; gap: 8px; }
.langbtn {
  flex: 1; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 10px; font: inherit; cursor: pointer; color: var(--muted);
}
.langbtn.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* 泰文字形上下更高,行高给足,否则声调符号会被裁掉 */
:root:lang(th) body { line-height: 1.65; }
:root:lang(th) .row .title { line-height: 1.5; }

/* ---------- v0.6.0:全局搜索 ---------- */
.searchbar {
  display: flex; gap: 6px; align-items: center;
  padding: 8px 16px 0;
}
.searchbar input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; font: inherit; color: inherit;
}
.searchbar input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.searchbar .linkbtn { flex: none; font-size: 18px; padding: 4px 8px; }

/* ---------- 报价明细录入器 ---------- */
.qrow { padding: 10px 12px; }
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-items: center; }
.qgrid input, .qgrid select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px; font: inherit; color: inherit; font-size: 13px;
}
.qgrid .qname { grid-column: 1 / -1; }
.qgrid .qdel { grid-column: 1 / -1; text-align: right; }
.qrow .hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.qrow .hintbtn { font-size: 11px; }
.qrow .hintbtn small { color: var(--muted); margin-left: 4px; }

/* ---------- 报价单打印视图 ---------- */
/* 打印这张纸会递到客户手上,所以 printQuotation() 从不渲染成本与供应商 —— */
/* 靠 CSS 隐藏成本是不够的:那只需要一次 Ctrl+U 就能看见。 */
#printArea {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: #fff; color: #12181f; padding: 28px 22px 90px;
  font-size: 13px; line-height: 1.6;
}
#printArea h1 { font-size: 22px; letter-spacing: .08em; margin: 0 0 4px; color: #183c78; }
.p-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #183c78; padding-bottom: 12px; }
.p-code { text-align: right; font-size: 12px; }
.p-to { margin: 18px 0; }
.p-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.p-tbl th, .p-tbl td { border-bottom: 1px solid #dde3ea; padding: 7px 5px; text-align: left; }
.p-tbl th { background: #f2f6fa; font-weight: 600; }
.p-tbl td:last-child, .p-tbl th:last-child { text-align: right; }
.p-tbl tfoot td { border: none; text-align: right; padding-top: 4px; }
.p-tbl tfoot td:first-child { text-align: right; color: #5b6773; }
.p-total td { font-weight: 700; font-size: 14px; border-top: 2px solid #183c78 !important; }
.p-note { margin-top: 18px; white-space: pre-wrap; color: #5b6773; }
.p-bar {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; align-items: center;
  padding: 12px 16px; background: var(--surface); border-top: 1px solid var(--line); color: var(--text);
}
.p-bar .hint { flex: 1; margin: 0; }
.p-bar .btn { width: auto; flex: none; }

body.printing #app { display: none; }

@media print {
  .noprint { display: none !important; }
  #printArea { position: static; padding: 0; }
  @page { margin: 16mm; }
}


/* ---------- v0.7.0 ---------- */
/* 客户链接弹层里那个只读输入框:字要小、要能全选,链接有 60 多个字符 */
.modal .card input[readonly] {
  width: 100%; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); margin: 8px 0; text-align: center;
}
/* 设置页的数字输入贴在行尾,别把标题挤走 */
.right .setnum {
  width: 110px; text-align: right; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
  font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
button.warnbar { display: block; width: 100%; text-align: left; cursor: pointer; border: 0; }

/* ---------- v0.8.0 ---------- */
/* 高亮不用品红:品红只留给「需要人介入」的状态(硬约束)。
   检索命中是一次成功的匹配,不是一个待办。 */
mark {
  background: color-mix(in srgb, var(--sky) 28%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

.linkbtn.danger { color: var(--warn); }

/* 匹配建议挂在流水行内部,不弹层:财务要一边看流水一边看候选。 */
.sugg { margin-top: 6px; }
.sugg:empty { display: none; }
.sugg .kv { font-size: 13px; gap: 8px; align-items: flex-start; }
.sugg .kv span { color: var(--muted); }

/* 导入结果里的错误清单是多行文本,\n 必须显示出来 —— 静默丢行是对账系统最恶劣的行为。 */
#bkHint { white-space: pre-line; }

/* ---- AI 助手面板(v0.9.0)----
   草稿是「还没发生的事」。用天蓝描边,不用品红 ——
   品红只留给「需要人介入」的状态(未读、逾期、低利润)。
   一份等着被采纳的草稿不是告警,它只是躺在那里。 */
.ai-panel { border-left: 3px solid var(--sky, #54b4e4); }
.ai-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.ai-out:empty { display: none; }
.ai-draft { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--line, #dfe6ee); }
.ai-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.ai-body { margin: .35rem 0; line-height: 1.65; white-space: pre-wrap; }
.ai-lbl { display: block; margin: .6rem 0 .2rem; font-style: normal; font-weight: 600; font-size: .85rem; }
.ai-lbl.warn { color: var(--magenta, #e02e8b); }
.ai-kv { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0;
         border-bottom: 1px solid var(--line, #eef2f6); font-size: .92rem; }
.ai-kv em { font-style: normal; color: var(--mut, #6b7a8c); }
.ai-acts { display: flex; align-items: center; gap: .5rem; margin-top: .8rem; }
.ai-rd { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ai-rd td { padding: .3rem .4rem; vertical-align: top; }
.ai-rd tr.sub td { padding-top: 0; font-size: .85rem; }
.ai-panel ul { margin: .2rem 0 .2rem 1.1rem; padding: 0; }
.ai-panel li { margin: .15rem 0; line-height: 1.55; }
