/* ============================================================
 * 星朴经营决策平台 · 样式
 *   两套界面共用一套设计变量：
 *   录入端(entry) 一切从大 —— 按钮 ≥56px、正文 17px，戴手套也点得中
 *   决策端(decide) 信息密度高 —— 卡片 + 图表 + 可钻取表格
 * ============================================================ */
:root {
  --g: #1f7a5c; --g2: #2f9d76; --g-dk: #12433a; --g-lt: #eaf5f0;
  --gold: #c08a2e; --gold-lt: #fdf6e6;
  --red: #d4453f; --red-lt: #fdeceb;
  --orange: #e07b1f; --orange-lt: #fdf1e4;
  --blue: #2f6fd0; --blue-lt: #ecf2fc;
  --ink: #16221e; --ink2: #4a5c55; --ink3: #7c8d86;
  --line: #e2eae6; --line2: #d2ded8;
  --bg: #f4f7f5; --card: #fff;
  --r: 14px; --r-sm: 10px;
  --sh: 0 1px 3px rgba(20,50,40,.06), 0 6px 20px rgba(20,50,40,.05);
  --sh-lg: 0 10px 40px rgba(20,50,40,.14);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--g); text-decoration: none; }
.hide { display: none !important; }
.muted { color: var(--ink3); }
.neg { color: var(--red); }
.pos { color: var(--g); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.sp { flex: 1; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border: 1px solid var(--line2); background: #fff; color: var(--ink);
  border-radius: var(--r-sm); cursor: pointer; font-size: 14px; font-weight: 500;
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--g2); color: var(--g); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--g); border-color: var(--g); color: #fff; }
.btn-primary:hover { background: var(--g2); border-color: var(--g2); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-danger { background: #fff; border-color: #ecc; color: var(--red); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 16px; font-weight: 600; }
.btn-block { width: 100%; }

/* ---------- 卡片 / 表格 ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 16px 18px; margin-bottom: 14px; }
.card-hd { display: flex; align-items: center; gap: 10px; margin: -2px 0 12px; }
.card-hd h3 { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: .2px; }
.card-hd .sub { font-size: 12.5px; color: var(--ink3); font-weight: 400; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th, table.tbl td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tbl th { background: #f7faf9; font-weight: 600; color: var(--ink2); font-size: 12.5px; position: sticky; top: 0; z-index: 1; }
table.tbl td.r, table.tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl tbody tr:hover { background: #fafcfb; }
table.tbl tr.grp td { background: #f2f7f5; font-weight: 600; }
table.tbl tr.tot td { background: var(--g-lt); font-weight: 700; border-top: 2px solid var(--g2); }
table.tbl tr.clickable { cursor: pointer; }
table.tbl tr.clickable:hover { background: var(--g-lt); }

.tag { display: inline-block; padding: 1px 7px; border-radius: 20px; font-size: 11.5px; background: var(--g-lt); color: var(--g); font-weight: 500; }
.tag-red { background: var(--red-lt); color: var(--red); }
.tag-orange { background: var(--orange-lt); color: var(--orange); }
.tag-blue { background: var(--blue-lt); color: var(--blue); }
.tag-gray { background: #eef2f0; color: var(--ink3); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--ink2); margin-bottom: 5px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r-sm);
  background: #fff; outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--g2); box-shadow: 0 0 0 3px rgba(47,157,118,.13); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Toast / 弹窗 ---------- */
#toastBox { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-b)); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(22,34,30,.93); color: #fff; padding: 11px 18px; border-radius: 24px; font-size: 14.5px; opacity: 0; transform: translateY(12px); transition: .25s; max-width: 86vw; text-align: center; box-shadow: var(--sh-lg); }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-err { background: rgba(190,50,45,.95); }
.toast-warn { background: rgba(215,120,25,.95); }

.modal-mask { position: fixed; inset: 0; background: rgba(15,30,25,.45); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(2px); }
.modal { background: #fff; border-radius: var(--r); width: 440px; max-width: 100%; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--sh-lg); }
.modal-wide { width: 940px; }
.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); font-weight: 650; }
.modal-x { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink3); cursor: pointer; padding: 0 4px; }
.modal-bd { padding: 16px 18px; overflow: auto; }
.modal-ft { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 560px) {
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal, .modal-wide { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
}

/* ============================================================
 * 登录
 * ============================================================ */
#gate { position: fixed; inset: 0; z-index: 950; background: linear-gradient(160deg, #12433a, #1f7a5c 60%, #2f9d76); display: flex; align-items: center; justify-content: center; padding: 20px; }
#gate .g-card { background: #fff; border-radius: 20px; padding: 34px 28px; width: 360px; max-width: 94vw; box-shadow: 0 24px 70px rgba(0,0,0,.34); text-align: center; }
#gate .g-logo { width: 62px; height: 62px; border-radius: 17px; background: linear-gradient(135deg, var(--g), var(--g2)); color: #fff; font-weight: 800; font-size: 22px; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
#gate h1 { font-size: 20px; margin: 0 0 4px; color: var(--g-dk); }
#gate .g-sub { color: var(--ink3); font-size: 13px; margin-bottom: 22px; }
#gate .field input { padding: 13px 14px; font-size: 16px; }
#gate .g-msg { color: var(--red); font-size: 13px; min-height: 18px; text-align: left; margin-bottom: 6px; }
#gate .g-hint { color: var(--ink3); font-size: 12px; margin-top: 14px; }
#boot { position: fixed; inset: 0; z-index: 940; background: var(--g-dk); color: #fff; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; }
#boot .b-logo { width: 60px; height: 60px; border-radius: 17px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 21px; }

/* ============================================================
 * 录入端（手机优先）
 * ============================================================ */
#entry { display: none; padding-bottom: calc(72px + var(--safe-b)); max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
body.mode-entry #entry { display: block; }
body.mode-entry #decide { display: none; }

.e-top { background: linear-gradient(150deg, var(--g-dk), var(--g)); color: #fff; padding: 18px 18px 22px; border-radius: 0 0 22px 22px; }
.e-top .e-hi { font-size: 21px; font-weight: 650; }
.e-top .e-sub { font-size: 13px; opacity: .82; margin-top: 3px; }
.e-top .e-stat { display: flex; gap: 10px; margin-top: 14px; }
.e-top .e-stat div { flex: 1; background: rgba(255,255,255,.14); border-radius: 12px; padding: 9px 12px; }
.e-top .e-stat b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.e-top .e-stat span { font-size: 11.5px; opacity: .8; }
.e-body { padding: 14px; }
.e-sec { margin-bottom: 18px; }
.e-sec > h4 { margin: 0 0 10px; font-size: 14px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }

/* 大任务按钮 */
.task-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.task {
  background: #fff; border-radius: 16px; padding: 16px 14px; box-shadow: var(--sh);
  border: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 3px;
  min-height: 92px; justify-content: center; position: relative; transition: .15s;
}
.task:active { transform: scale(.97); }
.task .t-ic { font-size: 27px; line-height: 1; margin-bottom: 4px; }
.task .t-nm { font-size: 16.5px; font-weight: 650; }
.task .t-tip { font-size: 12px; color: var(--ink3); }
.task .t-badge { position: absolute; top: 10px; right: 11px; background: var(--red); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600; }
.task-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 14px; min-height: 0; padding: 15px 16px; }
.task-wide .t-ic { margin: 0; font-size: 25px; }
.task-cam { background: linear-gradient(135deg, var(--g), var(--g2)); color: #fff; }
.task-cam .t-tip { color: rgba(255,255,255,.85); }

/* 待办 / 提醒条 */
.todo { background: #fff; border-radius: 13px; padding: 12px 14px; box-shadow: var(--sh); display: flex; gap: 11px; align-items: flex-start; margin-bottom: 9px; border-left: 4px solid var(--line2); }
.todo.hi { border-left-color: var(--red); }
.todo.mid { border-left-color: var(--orange); }
.todo .td-t { font-weight: 600; font-size: 14.5px; }
.todo .td-d { font-size: 12.5px; color: var(--ink3); margin-top: 2px; }
.todo .td-ic { font-size: 19px; }

/* 底部导航 */
.e-tabs { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255,255,255,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line); display: flex; z-index: 80; padding-bottom: var(--safe-b); max-width: 560px; margin: 0 auto; }
.e-tabs button { flex: 1; border: 0; background: none; padding: 9px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink3); cursor: pointer; font-size: 11.5px; }
.e-tabs button .ti { font-size: 21px; line-height: 1; }
.e-tabs button.on { color: var(--g); font-weight: 600; }

/* 录入表单页（全屏） */
.sheet { position: fixed; inset: 0; background: var(--bg); z-index: 200; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; animation: slideUp .22s ease; }
@keyframes slideUp { from { transform: translateY(20px); opacity: .4 } to { transform: none; opacity: 1 } }
.sheet-hd { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.sheet-hd .s-back { border: 0; background: #f0f4f2; width: 34px; height: 34px; border-radius: 10px; font-size: 19px; cursor: pointer; color: var(--ink2); }
.sheet-hd h3 { margin: 0; font-size: 17px; font-weight: 650; }
.sheet-hd .s-tip { font-size: 12px; color: var(--ink3); }
.sheet-bd { flex: 1; overflow-y: auto; padding: 14px 14px 20px; -webkit-overflow-scrolling: touch; }
.sheet-ft { background: #fff; border-top: 1px solid var(--line); padding: 10px 14px calc(10px + var(--safe-b)); display: flex; gap: 10px; }
.sheet-ft .btn { flex: 1; padding: 14px; font-size: 16.5px; font-weight: 650; border-radius: 12px; }

/* 大字段 */
.bf { background: #fff; border-radius: 13px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--sh); }
.bf > label { display: block; font-size: 12.5px; color: var(--ink3); margin-bottom: 4px; font-weight: 500; }
.bf input, .bf select, .bf textarea {
  width: 100%; border: 0; outline: none; font-size: 18px; font-weight: 600; padding: 2px 0;
  background: transparent; color: var(--ink);
}
.bf input::placeholder { color: #c3ccc8; font-weight: 400; }
.bf.ocr { background: var(--gold-lt); box-shadow: inset 0 0 0 1.5px #edd9a8; }
.bf.ocr > label::after { content: " · 识别的，请核对"; color: var(--gold); }
.bf-row { display: flex; gap: 10px; }
.bf-row .bf { flex: 1; margin-bottom: 10px; }
.bf-amt input { font-size: 30px; color: var(--g); letter-spacing: -.5px; }
.bf-hint { font-size: 12px; color: var(--ink3); margin: -4px 2px 10px; }

/* 快选 chips */
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.chip { border: 1px solid var(--line2); background: #fff; border-radius: 20px; padding: 7px 13px; font-size: 14px; cursor: pointer; transition: .12s; }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--g); border-color: var(--g); color: #fff; font-weight: 600; }
.chip-sm { padding: 5px 11px; font-size: 13px; }

/* 拍照区 */
.cam { background: #fff; border-radius: 13px; padding: 14px; margin-bottom: 12px; box-shadow: var(--sh); }
.cam-btn { width: 100%; border: 2px dashed var(--line2); background: #fafcfb; border-radius: 12px; padding: 22px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: var(--ink2); }
.cam-btn .ci { font-size: 32px; }
.cam-btn b { font-size: 16px; }
.cam-btn span { font-size: 12.5px; color: var(--ink3); }
.cam-shots { display: flex; gap: 9px; flex-wrap: wrap; }
.shot { position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; background: #eef2f0; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot .x { position: absolute; top: 2px; right: 2px; width: 21px; height: 21px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: 0; font-size: 14px; line-height: 1; cursor: pointer; }
.shot .st { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; text-align: center; padding: 1px; }
.shot-add { width: 78px; height: 78px; border-radius: 10px; border: 2px dashed var(--line2); background: #fafcfb; display: flex; align-items: center; justify-content: center; font-size: 25px; color: var(--ink3); cursor: pointer; }
.ocr-bar { margin-top: 10px; background: var(--g-lt); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--g); display: flex; align-items: center; gap: 8px; }
.ocr-bar.warn { background: var(--gold-lt); color: #8a6516; }
.spin { width: 15px; height: 15px; border: 2px solid rgba(31,122,92,.25); border-top-color: var(--g); border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg) } }

/* 多行明细 */
.mline { background: #fff; border-radius: 12px; padding: 11px 12px; margin-bottom: 9px; box-shadow: var(--sh); }
.mline .ml-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.mline .ml-hd b { flex: 1; font-size: 15.5px; }
.mline .ml-x { border: 0; background: #f4f6f5; color: var(--ink3); width: 26px; height: 26px; border-radius: 8px; cursor: pointer; }
.mline .ml-g { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.mline .ml-g input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.mline .ml-g label { font-size: 11px; color: var(--ink3); display: block; margin-bottom: 2px; }

/* 记录列表 */
.rec { background: #fff; border-radius: 12px; padding: 11px 13px; margin-bottom: 8px; box-shadow: var(--sh); display: flex; gap: 11px; align-items: center; }
.rec .r-ic { font-size: 21px; width: 27px; text-align: center; }
.rec .r-m { flex: 1; min-width: 0; }
.rec .r-t { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec .r-s { font-size: 12px; color: var(--ink3); margin-top: 1px; }
.rec .r-a { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; }
.rec .r-ph { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #eef2f0; }

.empty { text-align: center; padding: 44px 20px; color: var(--ink3); }
.empty .ei { font-size: 42px; opacity: .35; margin-bottom: 10px; }

/* 数字键盘 */
.pad { position: fixed; left: 0; right: 0; bottom: 0; background: #eceff0; z-index: 300; padding: 8px 6px calc(8px + var(--safe-b)); box-shadow: 0 -4px 20px rgba(0,0,0,.12); max-width: 560px; margin: 0 auto; }
.pad-hd { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 8px; }
.pad-hd .pv { font-size: 25px; font-weight: 700; color: var(--g); font-variant-numeric: tabular-nums; }
.pad-hd .pl { font-size: 12.5px; color: var(--ink3); }
.pad-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pad-keys button { border: 0; background: #fff; border-radius: 9px; padding: 15px 0; font-size: 22px; font-weight: 600; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pad-keys button:active { background: #dfe4e2; }
.pad-keys .k-ok { background: var(--g); color: #fff; grid-row: span 2; }
.pad-keys .k-fn { background: #dde3e0; font-size: 17px; }

/* ============================================================
 * 决策端
 * ============================================================ */
#decide { display: none; min-height: 100vh; }
body.mode-decide #decide { display: flex; }
body.mode-decide #entry { display: none; }

.side { width: 224px; background: linear-gradient(178deg, var(--g-dk), #16564a); color: #cfe3db; display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; transition: transform .22s; }
.side .brand { padding: 18px 18px 14px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.side .brand .bl { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--g2), #4dbb92); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 14px; }
.side .brand .bn { font-size: 15px; font-weight: 650; color: #fff; line-height: 1.25; }
.side .brand .bs { font-size: 11px; opacity: .6; }
.side nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.side .ng { font-size: 11px; opacity: .45; padding: 13px 10px 5px; letter-spacing: .6px; }
.side .ni { display: flex; align-items: center; gap: 9px; padding: 9.5px 11px; border-radius: 9px; cursor: pointer; font-size: 14px; margin-bottom: 1px; transition: .13s; }
.side .ni:hover { background: rgba(255,255,255,.09); color: #fff; }
.side .ni.on { background: var(--g2); color: #fff; font-weight: 600; }
.side .ni .nic { width: 18px; text-align: center; font-size: 15px; }
.side .ni .nbadge { margin-left: auto; background: var(--red); color: #fff; font-size: 10.5px; padding: 0 6px; border-radius: 9px; font-weight: 600; }
.side .sft { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.1); font-size: 11.5px; opacity: .55; }

.main { flex: 1; margin-left: 224px; min-width: 0; display: flex; flex-direction: column; }
.top { background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 50; }
.top .crumb { font-size: 16px; font-weight: 650; }
.top .ham { display: none; border: 0; background: #f0f4f2; width: 34px; height: 34px; border-radius: 9px; font-size: 17px; cursor: pointer; }
.top .who { display: flex; flex-direction: column; line-height: 1.2; text-align: right; }
.top .who b { font-size: 13.5px; }
.top .who small { font-size: 11px; color: var(--ink3); }
.top .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--g2); }
.content { padding: 18px 20px 40px; flex: 1; }
.mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
@media (max-width: 900px) {
  .side { transform: translateX(-100%); }
  body.nav-open .side { transform: none; }
  body.nav-open .mask { display: block; }
  .main { margin-left: 0; }
  .top .ham { display: block; }
  .content { padding: 14px 13px 40px; }
}

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 13px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: var(--r); padding: 15px 17px; box-shadow: var(--sh); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--g2); }
.kpi.k-red::before { background: var(--red); }
.kpi.k-orange::before { background: var(--orange); }
.kpi.k-blue::before { background: var(--blue); }
.kpi.k-gold::before { background: var(--gold); }
.kpi .kl { font-size: 12.5px; color: var(--ink3); }
.kpi .kv { font-size: 25px; font-weight: 700; letter-spacing: -.6px; font-variant-numeric: tabular-nums; margin: 3px 0 1px; }
.kpi .kd { font-size: 12px; color: var(--ink3); }
.kpi .kd b { font-weight: 600; }

.chart-box { position: relative; height: 250px; }
.chart-sm { height: 190px; }

/* 部门盈亏条 */
.dbar { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.dbar:last-child { border-bottom: 0; }
.dbar .dn { width: 62px; font-weight: 600; font-size: 14px; }
.dbar .dt { flex: 1; height: 22px; background: #f2f5f4; border-radius: 5px; position: relative; overflow: hidden; }
.dbar .dt i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.dbar .dv { width: 108px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; font-size: 14px; }

/* 钻取面包屑 */
.drill { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink3); margin-bottom: 12px; flex-wrap: wrap; }
.drill b { color: var(--ink); }
.drill .dv { cursor: pointer; color: var(--g); }

/* 分段控件 */
.seg { display: inline-flex; background: #eef2f0; border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 7px; cursor: pointer; font-size: 13.5px; color: var(--ink2); }
.seg button.on { background: #fff; color: var(--g); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.09); }

.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabbar button { border: 0; background: none; padding: 9px 14px; cursor: pointer; font-size: 14px; color: var(--ink2); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabbar button.on { color: var(--g); font-weight: 650; border-bottom-color: var(--g); }

.bar-in { height: 6px; background: #eef2f0; border-radius: 4px; overflow: hidden; min-width: 60px; }
.bar-in i { display: block; height: 100%; background: var(--g2); border-radius: 4px; }
.bar-in i.over { background: var(--red); }

.ph-thumb { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; cursor: zoom-in; background: #eef2f0; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .lb-x { position: absolute; top: 16px; right: 18px; color: #fff; font-size: 30px; border: 0; background: none; cursor: pointer; }
.lightbox .lb-i { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; padding: 12px 18px; font-size: 13px; }

@media print {
  .side, .top, .e-tabs, .btn { display: none !important; }
  .main { margin: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
