/* AI 汽修接车助手 · 移动端优先样式（§39 少表格、多大按钮、少输入） */
:root {
  --brand: #1677ff;
  --brand-dk: #0958d9;
  --brand-bg: #e8f2ff;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1f2329;
  --text2: #646a73;
  --text3: #8f959e;
  --line: #e5e6eb;
  --line2: #f0f1f3;
  --ok: #00a854;
  --ok-bg: #e8f8ef;
  --warn: #e8730c;
  --warn-bg: #fff5e6;
  --danger: #e34d59;
  --danger-bg: #fdecee;
  --ai: #7d3cf8;
  --ai-bg: #f4edff;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(20, 30, 50, .06), 0 6px 18px rgba(20, 30, 50, .05);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; }

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 12px;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 8px rgba(22, 119, 255, .22);
}
.topbar .tb-back {
  width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: rgba(255, 255, 255, .18); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}
.topbar .tb-title { font-size: 16.5px; font-weight: 600; flex: 1 1 auto; }
.topbar .tb-right {
  font-size: 12.5px; padding: 5px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, .18); cursor: pointer; border: 0; color: #fff;
}

/* ---------------------------------------------------------------- 布局 */
.page { padding: 12px 12px calc(78px + var(--safe-b)); }
.page.flush { padding: 0 0 calc(78px + var(--safe-b)); }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.card.tight { padding: 10px 12px; }
/* 一行放两个输入框（联系人 / 电话、试用期 / 席位这类） */
.row2 { display: flex; gap: 10px; }
.row2 > * { flex: 1 1 0; min-width: 0; }
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin: -2px 0 10px;
}
.card-h h3 {
  margin: 0; font-size: 14.5px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.card-h .sub { font-size: 12px; color: var(--text3); font-weight: 400; }

.sec-title {
  margin: 16px 2px 8px; font-size: 12.5px; font-weight: 600;
  color: var(--text2); letter-spacing: .3px;
}

.muted { color: var(--text2); }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt4 { margin-top: 4px; }
.hide { display: none !important; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--text); font-size: 15px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: opacity .15s, background .15s;
}
.btn:active { opacity: .72; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:active { background: var(--brand-dk); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ghost { background: var(--brand-bg); border-color: transparent; color: var(--brand-dk); }
.btn-danger { background: #fff; border-color: #f6c6cb; color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 18px; font-size: 16.5px; border-radius: 12px; font-weight: 600; }

/* 首页最大入口（§四 M1：首页必须有一个最大的入口） */
.hero-btn {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 20px 18px; border: 0; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1677ff, #3b96ff);
  color: #fff; cursor: pointer; text-align: left; font-family: inherit;
  box-shadow: 0 6px 20px rgba(22, 119, 255, .32);
}
.hero-btn:active { opacity: .88; }
.hero-btn .hb-ico { font-size: 34px; flex: 0 0 auto; }
.hero-btn .hb-t { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.hero-btn .hb-s { font-size: 12.5px; opacity: .9; margin-top: 3px; }
.hero-btn .hb-arrow { font-size: 22px; opacity: .85; }

/* ---------------------------------------------------------------- 表单 */
label.fld { display: block; margin-bottom: 11px; }
label.fld > .lb { display: block; font-size: 13px; color: var(--text2); margin-bottom: 5px; }
label.fld > .lb .req { color: var(--danger); margin-left: 2px; }
input[type=text], input[type=number], input[type=password], input[type=tel],
input[type=date], input[type=search], select, textarea {
  width: 100%; padding: 11px 12px; font-size: 15px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--text); outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 78px; line-height: 1.5; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.grid2 > * { min-width: 0; }

.switch { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.switch button {
  padding: 7px 13px; font-size: 13px; border: 0; background: #fff;
  color: var(--text2); cursor: pointer; font-family: inherit;
}
.switch button.on { background: var(--brand); color: #fff; }

/* 三态点选（检查项结果） */
.seg { display: flex; gap: 5px; flex-wrap: wrap; }
.seg button {
  padding: 6px 11px; font-size: 12.5px; border-radius: 7px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text2);
  font-family: inherit; transition: all .12s;
}
.seg button.on { border-color: transparent; font-weight: 600; }
.seg button.on[data-v=normal] { background: var(--ok-bg); color: var(--ok); }
.seg button.on[data-v=attention] { background: var(--warn-bg); color: var(--warn); }
.seg button.on[data-v=need_repair] { background: var(--danger-bg); color: var(--danger); }
.seg button.on[data-v=skipped] { background: #f2f3f5; color: var(--text2); }

/* ---------------------------------------------------------------- 标签 */
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 5px; font-size: 11.5px;
  background: #f2f3f5; color: var(--text2); white-space: nowrap;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.brand { background: var(--brand-bg); color: var(--brand-dk); }
.tag.ai { background: var(--ai-bg); color: var(--ai); }
.tag.gray { background: #f2f3f5; color: var(--text3); }

/* ---------------------------------------------------------------- AI 区块 */
.ai-box {
  border: 1px solid #e2d5ff; background: var(--ai-bg);
  border-radius: var(--radius); padding: 13px; margin-bottom: 10px;
}
.ai-box .ai-h {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ai);
}
.ai-box .ai-body { font-size: 14.5px; line-height: 1.7; color: #3b2a5c; white-space: pre-wrap; }
.ai-box .ai-foot {
  margin-top: 9px; padding-top: 8px; border-top: 1px dashed #ddccff;
  font-size: 11.5px; color: #7c6a9e;
}
.ai-hint {
  display: flex; gap: 6px; align-items: flex-start;
  background: #fffaf0; border: 1px solid #ffe4b8; border-radius: 9px;
  padding: 9px 11px; font-size: 12.5px; color: #946000; line-height: 1.5;
}
/* 假数据警告：Mock 识别结果、"这不是真的"这类必须比普通提示更扎眼 */
.ai-hint.warn {
  background: #fff1f0; border: 1px solid #ffccc7; color: #a8071a;
}
.ai-hint.warn b { color: #a8071a; }

/* ---------------------------------------------------------------- 列表项 */
.item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--line2);
}
.item:last-child { border-bottom: 0; }
.item .it-main { flex: 1 1 auto; min-width: 0; }
.item .it-t { font-size: 14.5px; font-weight: 500; }
.item .it-s { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.item .it-r { flex: 0 0 auto; text-align: right; font-size: 14.5px; font-weight: 600; }

.list-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line2);
  cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; font-family: inherit; font-size: 15px; color: var(--text); text-align: left;
}
.list-row:last-child { border-bottom: 0; }
.list-row .lr-l { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.list-row .lr-i { font-size: 18px; width: 22px; text-align: center; flex: 0 0 auto; }
.list-row .lr-arrow { color: var(--text3); font-size: 16px; flex: 0 0 auto; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 12px 8px;
  text-align: center; box-shadow: var(--shadow);
}
.stat .st-v { font-size: 21px; font-weight: 700; line-height: 1.15; color: var(--brand); }
.stat .st-v.money { font-size: 17px; }
.stat .st-v.warn { color: var(--warn); }
.stat .st-v.red { color: var(--danger); }
.stat .st-l { font-size: 11.5px; color: var(--text2); margin-top: 3px; }

/* 可点的统计卡：老板看到「待收款 3」第一反应是"哪 3 单"，必须点得进去 */
.stat-link {
  display: block; width: 100%; border: 0; font: inherit; cursor: pointer;
  color: inherit; text-align: center;
  background: var(--card); border-radius: var(--radius); padding: 12px 8px;
  box-shadow: var(--shadow);
}
.stat-link:active { background: #f2f5fa; }
.stat-link .st-l { color: var(--brand); }

/* 收款方式选择（纯 CSS，靠 :checked 高亮，不依赖 JS 绑定） */
.pm-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pm { flex: 1 1 0; min-width: 58px; }
.pm input { position: absolute; opacity: 0; pointer-events: none; }
.pm span {
  display: block; text-align: center; padding: 9px 4px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text);
}
.pm input:checked + span {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600;
}

/* 车辆头部卡 */
.veh-head {
  background: linear-gradient(135deg, #1f2a44, #33415e);
  color: #fff; border-radius: var(--radius-lg); padding: 16px;
  margin-bottom: 10px; box-shadow: 0 6px 18px rgba(31, 42, 68, .25);
}
.veh-plate {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: #14304d; border-radius: 7px;
  padding: 6px 13px; font-size: 22px; font-weight: 800; letter-spacing: 2px;
}
.veh-meta { margin-top: 11px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.veh-meta .vm-l { font-size: 11.5px; opacity: .68; }
.veh-meta .vm-v { font-size: 14px; font-weight: 600; margin-top: 1px; }

/* 时间轴（历史维修） */
.tl { position: relative; padding-left: 22px; }
.tl::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #fff; border: 2px solid var(--brand);
}
.tl-item.old::before { border-color: #c9cdd4; }
.tl-date { font-size: 12.5px; color: var(--text2); }
.tl-title { font-size: 14.5px; font-weight: 600; margin: 2px 0 3px; }
.tl-body { font-size: 13px; color: var(--text2); line-height: 1.6; }

/* 时间轴（¥ 金额明细） */
.money-line {
  display: flex; justify-content: space-between; padding: 6px 0;
  font-size: 14px; border-bottom: 1px dashed var(--line2);
}
.money-line:last-child { border-bottom: 0; }
.money-line.total {
  border-top: 2px solid var(--line); border-bottom: 0;
  margin-top: 5px; padding-top: 10px; font-size: 17px; font-weight: 700;
}
.money-line.total .ml-v { color: var(--danger); }

/* 缩略图 */
.thumbs { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.thumb {
  position: relative; width: 68px; height: 68px; border-radius: 9px;
  overflow: hidden; background: #eef0f3; border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .th-del {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border-radius: 50%; border: 0; background: rgba(0, 0, 0, .58); color: #fff;
  font-size: 12px; line-height: 17px; text-align: center; cursor: pointer; padding: 0;
}
.add-photo {
  width: 68px; height: 68px; border-radius: 9px; border: 1px dashed #c9cdd4;
  background: #fafbfc; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  font-size: 11px; color: var(--text3); cursor: pointer;
}
.add-photo .ap-ico { font-size: 19px; }

/* 拍照占位 */
.shot-area {
  border: 1.5px dashed #b8c4d4; border-radius: var(--radius);
  background: #fafbfd; padding: 26px 16px; text-align: center; margin-bottom: 10px;
}
.shot-area .sa-ico { font-size: 44px; }
.shot-area .sa-t { font-size: 15px; font-weight: 600; margin-top: 8px; }
.shot-area .sa-s { font-size: 12.5px; color: var(--text2); margin-top: 4px; }

/* 底部固定操作条 */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-width: 520px; margin: 0 auto;
  display: flex; gap: 9px; padding: 10px 12px calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.actionbar .btn { flex: 1 1 auto; }
.actionbar .btn.fixed { flex: 0 0 auto; }

/* 底部 tabbar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-width: 520px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
  backdrop-filter: blur(8px);
}
.tabbar button {
  border: 0; background: none; padding: 7px 0 8px; cursor: pointer;
  font-family: inherit; font-size: 10.5px; color: var(--text3);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.tabbar button .tb-i { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .55; }
.tabbar button.on { color: var(--brand); font-weight: 600; }
.tabbar button.on .tb-i { filter: none; opacity: 1; }

/* 提示条 */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 200; max-width: 88vw;
  background: rgba(28, 34, 44, .93); color: #fff;
  padding: 11px 17px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  animation: toastIn .18s ease-out;
}
.toast.err { background: rgba(190, 45, 56, .95); }
.toast.ok { background: rgba(0, 140, 72, .95); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }

/* 空状态 / 加载 */
.empty { text-align: center; padding: 36px 16px; color: var(--text3); }
.empty .em-ico { font-size: 38px; opacity: .5; }
.empty .em-t { font-size: 14px; margin-top: 9px; }
.empty .em-s { font-size: 12.5px; margin-top: 4px; line-height: 1.6; }

.loading { text-align: center; padding: 30px; color: var(--text2); font-size: 13.5px; }
.spin {
  display: inline-block; width: 17px; height: 17px; vertical-align: -3px;
  margin-right: 7px; border: 2px solid var(--brand);
  border-right-color: transparent; border-radius: 50%;
  animation: sp .7s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

.skeleton {
  height: 15px; border-radius: 5px; margin: 8px 0;
  background: linear-gradient(90deg, #f0f2f5 25%, #e8eaee 50%, #f0f2f5 75%);
  background-size: 200% 100%; animation: sk 1.3s infinite;
}
@keyframes sk { to { background-position: -200% 0; } }

/* 遮罩层（选客户诉求/选项目） */
.sheet-mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0, 0, 0, .42); display: flex; align-items: flex-end;
  justify-content: center; animation: fadeIn .16s;
}
@keyframes fadeIn { from { opacity: 0; } }
.sheet {
  width: 100%; max-width: 520px; max-height: 82vh; overflow-y: auto;
  background: #fff; border-radius: 16px 16px 0 0;
  padding: 14px 14px calc(16px + var(--safe-b));
  animation: sheetUp .2s ease-out;
}
@keyframes sheetUp { from { transform: translateY(30px); } }
.sheet-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 11px; padding-bottom: 9px; border-bottom: 1px solid var(--line2);
}
.sheet-h h3 { margin: 0; font-size: 16px; }
.sheet-h .sh-x {
  border: 0; background: #f2f3f5; width: 28px; height: 28px;
  border-radius: 50%; font-size: 15px; cursor: pointer; color: var(--text2);
}

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 160; background: rgba(0, 0, 0, .42);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  animation: fadeIn .16s;
}
.modal {
  width: 100%; max-width: 420px; background: #fff; border-radius: 14px;
  padding: 18px; animation: modalIn .18s ease-out;
  /* 弹窗必须能滚 —— 权限清单有十几项，比手机屏还高。
     以前没有 max-height/overflow：内容顶出屏幕，「保存」按钮根本够不到，
     老板连权限都存不下来（E2E 真机验收时点不到勾选框才发现）。 */
  max-height: calc(100vh - 44px);
  display: flex; flex-direction: column;
}
@keyframes modalIn { from { transform: scale(.94); opacity: 0; } }
.modal h3 { margin: 0 0 9px; font-size: 16.5px; flex: 0 0 auto; }
.modal .m-body {
  font-size: 14.5px; color: var(--text2); line-height: 1.6;
  flex: 1 1 auto; min-height: 0;            /* min-height:0 是让 flex 子项真能滚的关键 */
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal .m-btns { display: flex; gap: 9px; margin-top: 16px; flex: 0 0 auto; }
.modal .m-btns .btn { flex: 1 1 auto; }

/* 二维码 */
.qr-wrap { text-align: center; padding: 14px; }
.qr-wrap img { width: 190px; height: 190px; image-rendering: pixelated; }
.qr-link {
  font-size: 11.5px; color: var(--text3); word-break: break-all;
  background: #f7f8fa; border-radius: 8px; padding: 8px; margin-top: 8px;
}

/* 顶部步骤条 */
.steps {
  display: flex; align-items: center; gap: 3px;
  padding: 9px 12px; background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; position: sticky; top: 52px; z-index: 55;
}
.steps .st {
  display: flex; align-items: center; gap: 4px; flex: 0 0 auto;
  font-size: 11.5px; color: var(--text3); padding: 3px 8px; border-radius: 20px;
}
.steps .st.on { background: var(--brand-bg); color: var(--brand-dk); font-weight: 600; }
.steps .st.done { color: var(--ok); }
.steps .st-arrow { color: #d0d3d9; font-size: 10px; }

/* 打印：客户确认单 */
@media print {
  .topbar, .actionbar, .tabbar, .no-print { display: none !important; }
  body { max-width: none; background: #fff; }
  .page { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ================================================================
   装到手机 · 提示条（安装引导 + HTTP 环境提醒）
   由 index.html 内联脚本注入，独立于 app.js
   ================================================================ */
#pwa-tip {
  position: fixed; left: 10px; right: 10px; z-index: 9998;
  bottom: calc(14px + var(--safe-b));
  max-width: 500px; margin: 0 auto;
  animation: pwaIn .32s cubic-bezier(.22,.8,.3,1) both;
}
.pwa-tip-box {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--brand);
  border-radius: var(--radius-lg); padding: 11px 12px;
  box-shadow: 0 6px 24px rgba(22, 119, 255, .22);
}
.pwa-tip-ico { font-size: 22px; line-height: 1; flex: 0 0 auto; }
.pwa-tip-txt { flex: 1 1 auto; font-size: 12.5px; color: var(--text2); line-height: 1.5; }
.pwa-tip-txt b { color: var(--text); }
.pwa-tip-x {
  flex: 0 0 auto; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--line2); color: var(--text3);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.pwa-tip-x:active { background: var(--line); }

@keyframes pwaIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* list-row 里的金额：首页「今日车辆」与「维修工单」共用。
   原来 .it-r 只在 .item 容器里生效，放到 list-row 里会丢样式。 */
.list-row .it-r { flex: 0 0 auto; text-align: right; font-size: 14.5px; font-weight: 600; }
.list-row .it-r.warn { color: var(--warn); }

/* 一行提示 + 一个动作（如工单页顶部的「还有 N 单没收到钱 → 去收款」） */
.action-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--warn-bg); border: 1px solid #f7d7a8; color: #8a4b06;
  border-radius: var(--radius); padding: 10px 12px; font-size: 13px;
}
.action-card b { color: #6b3a00; }
.action-card .btn { flex: 0 0 auto; margin-left: auto; }

/* ================================================================
   角色与权限 · 经营报表（2026-09-20）
   ================================================================ */

/* ---- 权限勾选清单（弹层里） ---- */
.perm-grp { margin-top: 12px; }
.perm-grp .pg-t {
  font-size: 12px; font-weight: 600; color: var(--text3);
  letter-spacing: .5px; margin-bottom: 6px;
}
.perm-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer;
}
.perm-item.on { border-color: var(--brand); background: var(--brand-bg); }
.perm-item input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--brand); }
.perm-item .pi-l { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.perm-item .pi-l b { font-size: 14px; font-weight: 500; }
.perm-item.on .pi-l b { color: var(--brand-dk); }

/* ---- 月份切换 ---- */
.month-nav {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.month-nav .mn-btn {
  flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--text2);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.month-nav .mn-btn:active { background: var(--line2); }
.month-nav .mn-label {
  flex: 1 1 auto; text-align: center; font-size: 16px; font-weight: 600;
}
.month-nav .mn-today {
  flex: 0 0 auto; padding: 0 10px; height: 34px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--brand);
  font-size: 13px; cursor: pointer;
}

/* ---- 三列 KPI ---- */
.kpi3 { display: flex; gap: 8px; margin-bottom: 8px; }
.kpi3 .k3 {
  flex: 1 1 0; min-width: 0; background: #fff; border-radius: var(--radius);
  padding: 10px 8px; text-align: center; box-shadow: var(--shadow);
}
.kpi3 .k3 .k-v {
  font-size: 16px; font-weight: 700; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi3 .k3 .k-v.money { color: var(--brand-dk); }
.kpi3 .k3 .k-v.ok { color: var(--ok); }
.kpi3 .k3 .k-v.warn { color: var(--warn); }
.kpi3 .k3 .k-l { font-size: 11.5px; color: var(--text3); margin-top: 2px; }

/* ---- 柱状图（纯 CSS，不引图表库） ---- */
.bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 110px; padding: 6px 2px 0;
}
.bars .bar-col {
  flex: 1 1 0; min-width: 0; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
}
.bars .bar {
  width: 100%; max-width: 22px; min-height: 2px;
  background: linear-gradient(180deg, #6aa9ff, var(--brand));
  border-radius: 4px 4px 2px 2px;
}
.bars .bar-l {
  font-size: 9.5px; color: var(--text3); margin-top: 3px;
  white-space: nowrap; overflow: hidden;
}
.bars .bar-col.zero .bar { background: var(--line); }

/* ---- 项目排行 ---- */
.rank-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line2);
}
.rank-row:last-child { border-bottom: 0; }
.rank-row .rk-no {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px;
  background: var(--line2); color: var(--text2);
  font-size: 11.5px; font-weight: 600; line-height: 20px; text-align: center;
}
.rank-row:nth-child(1) .rk-no { background: var(--brand); color: #fff; }
.rank-row .rk-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .rk-v { flex: 0 0 auto; font-weight: 600; font-size: 14px; }

/* 报表页「比上月多/少 N%」里的强调色（与涨跌无关，只表示好/差） */
.ok-t { color: var(--ok); }
