/* 管理后台：公路绿为主色，白底卡片、轻阴影；字号略大，状态用颜色区分 */
:root {
  --el-color-primary: #11734f;
  --el-color-primary-light-3: #4d9a7e;
  --el-color-primary-light-5: #88b9a7;
  --el-color-primary-light-7: #b8d6cb;
  --el-color-primary-light-8: #d0e5dd;
  --el-color-primary-light-9: #e8f4ef;
  --el-color-primary-dark-2: #0d5c3f;
  --el-border-radius-base: 8px;
  --ink: #18221e;
  --muted: #6b7873;
  --line: #e6ece9;
  --bg: #f4f6f5;
  --amber: #b35f00;
  --amber-soft: #fff4e2;
  --red: #c4291c;
  --red-soft: #fdecea;
  --green: #11734f;
  --shadow: 0 1px 2px rgba(16, 40, 30, .05), 0 4px 14px rgba(16, 40, 30, .05);
}
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; font-size: 14.5px; }

.shell { display: flex; height: 100%; }
.side { width: 216px; background: linear-gradient(180deg, #0d2b20 0%, #0f3527 100%); color: #c7dbd2; display: flex; flex-direction: column; flex: none; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 22px 18px 20px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: 1px; }
.side .brand .logo { width: 34px; height: 34px; border-radius: 9px; background: #f5c400; color: #0d2b20; display: flex; align-items: center; justify-content: center; font-size: 18px; flex: none; }
.side .brand small { display: block; font-weight: 400; font-size: 12px; color: #8db3a3; margin-top: 3px; letter-spacing: 0; }
.side a { display: flex; align-items: center; gap: 10px; margin: 2px 10px; padding: 10px 12px; color: #c7dbd2; text-decoration: none; border-radius: 8px; }
.side a .mi { display: flex; opacity: .85; }
.side a .mt { flex: 1; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.on { background: #f5c400; color: #0d2b20; font-weight: 600; }
.side a.on .mi { opacity: 1; }
.side .badge { background: #e2574c; color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; line-height: 18px; }
.side a.on .badge { background: #0d2b20; }
.side .grow { flex: 1; }
.side .me { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #8db3a3; }
.side .me b { color: #fff; font-weight: 600; display: block; font-size: 13px; }
.main { flex: 1; overflow: auto; }
.page { padding: 26px 30px 48px; max-width: 1360px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; letter-spacing: .5px; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.panel { background: #fff; border-radius: 12px; padding: 18px 20px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin: 0 0 14px; font-size: 15.5px; }

/* 工作台：顶部数字、待办、流程看板 */
.stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 12px; padding: 16px 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.stat .sv { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .sl { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat.hot { background: var(--red-soft); border-color: #f4c4bf; }
.stat.hot .sv { color: var(--red); }
.stat.link { cursor: pointer; }
.stat.link:hover { border-color: var(--el-color-primary); }

.todo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.todo { background: #fafcfb; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .15s; display: flex; align-items: center; gap: 14px; }
.todo:hover { border-color: var(--el-color-primary); transform: translateY(-1px); }
.todo .n { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 34px; text-align: center; }
.todo .t { color: var(--ink); }
.todo.hot { background: var(--red-soft); border-color: #f4c4bf; }
.todo.hot .n { color: var(--red); }
.todo.calm .n { color: #b3bfba; }
.todo.calm .t { color: var(--muted); }
.todo.warn { background: var(--amber-soft); border-color: #f3d6a8; }
.todo.warn .n { color: var(--amber); }

.board { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px; }
.bcol { position: relative; border-radius: 10px; padding: 12px 8px 12px; text-align: center; cursor: pointer; background: var(--el-color-primary-light-9); border: 1px solid transparent; transition: border-color .15s; }
.bcol:hover { border-color: var(--el-color-primary); }
.bcol:not(:last-child)::after { content: ""; position: absolute; right: -7px; top: 50%; width: 6px; height: 6px; border-top: 2px solid #b8cdc4; border-right: 2px solid #b8cdc4; transform: translateY(-50%) rotate(45deg); }
.bcol .bn { width: 20px; height: 20px; margin: 0 auto 4px; border-radius: 50%; background: var(--el-color-primary); color: #fff; font-size: 11.5px; line-height: 20px; }
.bcol .bl { font-size: 13px; font-weight: 600; }
.bcol .bv { font-size: 28px; font-weight: 700; color: var(--el-color-primary); font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.bcol .bw { font-size: 11.5px; color: var(--muted); }
.bcol .bs { margin-top: 6px; font-size: 12px; color: #fff; background: var(--red); border-radius: 999px; padding: 1px 6px; display: inline-block; }
.bcol.empty { background: #f5f7f6; }
.bcol.empty .bv { color: #b3bfba; }
.bcol.empty .bn { background: #b3bfba; }
.bcol.late { background: var(--red-soft); }

/* 详情顶上的流程进度条 */
.flow-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 12px; margin-bottom: 14px; box-shadow: var(--shadow); }
.flowbar { display: flex; margin-bottom: 14px; }
.fb-step { flex: 1; text-align: center; position: relative; min-width: 0; }
.fb-step:not(:last-child)::after { content: ""; position: absolute; top: 14px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 2px; background: #dfe7e3; }
.fb-step.done:not(:last-child)::after { background: var(--el-color-primary); }
.fb-dot { width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; background: #eef2f0; color: #9aa9a3; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.fb-step.done .fb-dot { background: var(--el-color-primary); color: #fff; }
.fb-step.now .fb-dot { background: #f5c400; color: var(--ink); box-shadow: 0 0 0 5px rgba(245, 196, 0, .25); }
.fb-step.stop .fb-dot { background: var(--red); color: #fff; }
.fb-step.skip .fb-dot { background: #fff; border: 1.5px dashed #c5d1cc; color: #b3bfba; }
.fb-label { font-size: 12.5px; margin-top: 6px; color: var(--muted); white-space: nowrap; }
.fb-step.done .fb-label { color: var(--ink); }
.fb-step.now .fb-label { color: var(--ink); font-weight: 700; }
.fb-sub { font-size: 11.5px; margin-top: 2px; line-height: 1.4; min-height: 16px; }

/* 列表里的小进度 */
.mini-flow { display: flex; gap: 2px; margin-bottom: 5px; }
.mini-flow i { flex: 1; height: 5px; border-radius: 3px; background: #e4ebe8; max-width: 18px; }
.mini-flow i.done { background: var(--el-color-primary-light-3); }
.mini-flow i.now { background: #f5c400; }
.mini-flow i.late { background: var(--red); }
.mini-flow i.stop { background: #c5d1cc; }
.step-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; white-space: nowrap; }
.plate { font-size: 15px; letter-spacing: .5px; }
.el-table .stale-row td.el-table__cell:first-child { box-shadow: inset 3px 0 0 var(--red); }
.el-table th.el-table__cell { background: #f7faf8; color: var(--muted); font-weight: 600; }

.flow { display: flex; gap: 0; overflow-x: auto; }
.flow .st { flex: 1; min-width: 92px; text-align: center; padding: 10px 4px; position: relative; }
.flow .st .n { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.flow .st .l { font-size: 12px; color: var(--muted); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.clickable-row { cursor: pointer; }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.warn-text { color: var(--amber); }
.red-text { color: var(--red); }

.kv { display: grid; grid-template-columns: 110px 1fr; row-gap: 9px; column-gap: 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.note { border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.note.warn { background: var(--amber-soft); }
.note.bad { background: var(--red-soft); color: var(--red); }
.note ul { margin: 4px 0 0; padding-left: 18px; }

.mat { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.mat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-weight: 600; }
.pieces { display: flex; gap: 10px; flex-wrap: wrap; }
.piece { width: 150px; }
.piece .ph { width: 150px; height: 104px; border-radius: 8px; background: #f1f4f2; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; overflow: hidden; }
.piece .cap { font-size: 12px; margin-top: 4px; color: var(--muted); }
.piece .bad { color: var(--red); font-size: 12px; }
.fields { font-size: 12.5px; margin-top: 8px; color: var(--ink); display: flex; flex-wrap: wrap; gap: 4px 14px; }
.fields span b { color: var(--muted); font-weight: 400; }

.tier-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tier { border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; font-size: 12.5px; line-height: 1.5; }
.tier b { display: block; font-size: 14px; margin-bottom: 2px; }
.tier.on { border-color: var(--el-color-primary); background: var(--el-color-primary-light-9); }
.tier.off { opacity: .55; }

.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center; background: radial-gradient(1200px 600px at 20% 10%, #1b5a43 0%, #0d2b20 60%); }
.login-card { width: 390px; background: #fff; border-radius: 16px; padding: 34px 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-card h2 { margin: 0; font-size: 22px; }
.login-card p { color: var(--muted); margin: 6px 0 24px; }
.linkbox { display: flex; gap: 8px; }
.linkbox .el-input { flex: 1; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; }
.countdown.urgent { color: var(--red); }

/* 办理单列表上方的快捷分组和筛选 */
.groups { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.groups .grow { flex: 1; }
.grp { padding: 6px 15px; border-radius: 999px; background: #fff; border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.grp:hover { border-color: var(--el-color-primary); }
.grp.on { background: var(--el-color-primary); border-color: var(--el-color-primary); color: #fff; font-weight: 600; }
.grp.red:not(.on) { color: var(--red); }
.grp.red.on { background: var(--red); border-color: var(--red); }

/* 办理单详情：进度条下面“现在该做什么”，按钮就在右边 */
.next-step { display: flex; gap: 12px; align-items: center; border-radius: 10px; padding: 12px 14px; font-size: 14.5px; line-height: 1.55;
  background: #eef3f0; }
.next-step.mine { background: #fff6d6; box-shadow: inset 4px 0 0 #f5c400; font-weight: 600; }
.next-step.done { background: #f1f4f2; color: var(--muted); }
.next-step .ns-k { flex: none; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--ink); color: #fff; }
.next-step.mine .ns-k { background: #f5c400; color: var(--ink); }
.next-step .ns-body { flex: 1; min-width: 0; }
.next-step .ns-extra { font-size: 13px; font-weight: 400; color: var(--amber); margin-top: 2px; }
.next-step .ns-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.next-step .ns-actions:empty { display: none; }
.sec-nav { position: sticky; top: -4px; z-index: 5; display: flex; gap: 4px; flex-wrap: wrap; background: #fff; padding: 8px 0; margin-bottom: 8px;
  border-bottom: 1px solid var(--line); }
.sec-nav span { padding: 4px 12px; border-radius: 6px; cursor: pointer; color: var(--el-color-primary); font-size: 13px; }
.sec-nav span:hover { background: var(--el-color-primary-light-9); }
.el-drawer .panel { scroll-margin-top: 56px; box-shadow: none; }
.el-drawer { background: var(--bg); }

/* 经营数据：近 30 天柱状图 */
.legend { font-weight: 400; font-size: 12.5px; color: var(--muted); margin-left: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; }
.lg-o, .b-o { background: var(--el-color-primary); }
.lg-i, .b-i { background: #f5c400; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; min-width: 0; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-bottom: 1px solid var(--line); }
.bar-pair span { width: 40%; max-width: 10px; border-radius: 3px 3px 0 0; min-height: 1px; }
.bar-l { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

/* 月度结算 */
.bill-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.bill-sum { text-align: right; }
.bill-amt { font-size: 26px; font-weight: 700; color: var(--el-color-primary); margin: 2px 0 6px; font-variant-numeric: tabular-nums; }

/* 电话号码：手机上点一下直接拨打 */
.tel { color: var(--el-color-primary); text-decoration: none; font-size: 13px; font-variant-numeric: tabular-nums; }
.tel:hover { text-decoration: underline; }

/* 手机上打开后台：侧边栏变成顶部一排，表格可左右滑 */
@media (max-width: 820px) {
  .shell { flex-direction: column; height: auto; min-height: 100%; }
  .side { width: 100%; flex-direction: row; align-items: center; overflow-x: auto; white-space: nowrap; }
  .side .brand { padding: 10px 14px; font-size: 15px; }
  .side .brand small { display: none; }
  .side a { padding: 12px 12px; border-left: 0; border-bottom: 3px solid transparent; gap: 6px; }
  .side a.on { border-bottom-color: #6fd3a6; }
  .side .grow { display: none; }
  .side .me { border-top: 0; padding: 8px 14px; }
  .main { overflow: visible; }
  .page { padding: 14px 12px 40px; }
  .page-head h1 { font-size: 18px; }
  .todo-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bcol::after { display: none; }
  .flowbar { overflow-x: auto; }
  .fb-step { min-width: 64px; }
  .next-step { flex-wrap: wrap; }
  .side a { margin: 0; }
  .side .brand .logo { display: none; }
  .todo { padding: 12px 14px; }
  .todo .n { font-size: 26px; }
  .kv { grid-template-columns: 84px 1fr; }
  .tier-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar .el-input, .toolbar .el-select { width: 100% !important; }
  .el-dialog { width: 94% !important; }
  .login-card { width: 92%; padding: 26px 20px; }
}
