/* 财务工作系统 · 精装版（家族品牌：深夜蓝+金，与供销效率系统同色系，只提质感）
   规矩：所有 class 必须有定义；图标一律内嵌 SVG；表格空值用双连字符不用em-dash */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #1c2333; --ink2: #4a5470; --mut: #7c86a0; --faint: #a3abc4;
  --pri: #2456d6; --pri-deep: #1c44ad; --gold: #d4af37; --gold-d: #b08a2e;
  --line: #e3e7f0; --line2: #eef1f7; --bg: #f2f4f8;
  --off-w: #fefdfb; --off-w2: #f7f8fc;
  --red: #c5221f; --green: #1e8e3e; --amber: #9a6a00; --blue: #2456d6;
  --shadow-1: 0 1px 2px rgba(28,35,51,.04);
  --shadow-2: 0 8px 24px -12px rgba(28,35,51,.10);
  --tr: 180ms ease-out;
}
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
       background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
a { color: var(--pri); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; border-radius: 4px; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
       background: var(--line2); border: 1px solid var(--line); border-radius: 6px;
       padding: 1px 7px; font-size: 12px; color: var(--ink2); }

/* ── 内嵌 SVG 图标 ── */
.ic { width: 15px; height: 15px; vertical-align: -2.5px; flex: none; }
.mark { display: inline-block; vertical-align: -4px; margin-right: 7px; color: var(--gold); }

/* ── 顶栏 ── */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px;
          background: linear-gradient(180deg, #20283c, #1c2333); color: var(--off-w2);
          padding: 0 16px; height: 50px; overflow-x: auto;
          box-shadow: 0 1px 0 rgba(212,175,55,.22), 0 2px 12px rgba(28,35,51,.18); }
.topbar .logo { color: var(--off-w2); font-weight: 700; white-space: nowrap; letter-spacing: .02em; }
.topbar nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { color: #c6cdde; padding: 6px 11px; border-radius: 8px; white-space: nowrap;
                transition: color var(--tr), background var(--tr), box-shadow var(--tr); }
.topbar nav a:hover { color: var(--off-w2); background: #323b52; text-decoration: none; }
.topbar nav a.on { color: var(--off-w2); background: #323b52; box-shadow: inset 0 -2px 0 var(--gold); }
.topbar .who { white-space: nowrap; font-size: 13px; color: #c6cdde; }
.topbar .who i { font-style: normal; margin: 0 8px; padding: 2px 8px; border-radius: 8px;
                 background: #323b52; font-size: 12px; }
.topbar .who a { color: #9aa6c2; margin-left: 8px; }
.topbar .who a:hover { color: var(--off-w2); }
.dot { display: inline-block; min-width: 16px; padding: 0 4px; height: 16px; background: var(--gold);
       color: #2a2410; border-radius: 8px; font-size: 10px; line-height: 16px; text-align: center;
       font-weight: 700; margin-left: 4px; }

main { max-width: 1280px; margin: 0 auto; padding: 18px 16px 40px; }

/* ── 通用 ── */
.bar { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; flex-wrap: wrap; }
.bar h1 { font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.bar h1::before { content: ''; display: inline-block; width: 4px; height: 18px; border-radius: 2px;
                  background: linear-gradient(180deg, var(--pri), var(--gold));
                  margin-right: 10px; vertical-align: -2px; }
.grow { flex: 1; }
.sect2 { font-size: 14.5px; font-weight: 700; margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.mut { color: var(--mut); font-size: 12.5px; }
.bad { color: var(--red); font-weight: 600; }
.gold { color: var(--gold-d); }

/* ── 卡片 ── */
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px;
        padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-1); }
.card.narrow { max-width: 560px; }
.card h3 { font-size: 15.5px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card.dim { opacity: .62; }

/* ── 网格 ── */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 860px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr 1fr; } }

/* ── KPI ── */
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
       text-align: center; box-shadow: var(--shadow-1); transition: box-shadow var(--tr), transform var(--tr); }
.kpi:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); text-decoration: none; }
.kpi .n { font-size: 26px; font-weight: 800; color: var(--pri); }
.kpi .n.gold { color: var(--gold-d); }
.kpi .n.red { color: var(--red); }
.kpi .n.green { color: var(--green); }
.kpi .t { font-size: 12.5px; color: var(--mut); margin-top: 2px; }

/* ── 表格 ── */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--mut); font-weight: 600; font-size: 12.5px;
     padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--off-w2); }
tr.unread td { background: #fdf9ec; }
td.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.big-num { font-size: 19px; font-weight: 800; color: var(--ink); }
table.kv th { width: 88px; text-align: right; vertical-align: top; }
td.ops { white-space: nowrap; }
.detail-cell { line-height: 2; }
.detail-cell .pill { margin: 1px 3px 1px 0; }

/* ── 徽章/药丸/灯 ── */
.pill { display: inline-block; padding: 1.5px 9px; border-radius: 20px; font-size: 11.5px;
        background: var(--line2); color: var(--ink2); white-space: nowrap; }
.pill-red { background: #fdecea; color: var(--red); font-weight: 600; }
.pill-amber { background: #fdf3dd; color: var(--amber); font-weight: 600; }
.pill-green { background: #e5f3e9; color: var(--green); font-weight: 600; }
.pill-blue { background: #e8eefc; color: var(--pri); font-weight: 600; }
.pill-grey { background: var(--line2); color: var(--mut); }
.pill-kind { background: #f4eee0; color: var(--gold-d); font-weight: 600; }
.light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; }
.light.red { background: var(--red); box-shadow: 0 0 0 3px rgba(197,34,31,.15); }
.light.yellow { background: #e8a400; box-shadow: 0 0 0 3px rgba(232,164,0,.15); }
.light.gold { background: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,.18); }

/* ── 按钮/表单 ── */
.btn { display: inline-block; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line);
       background: #fff; color: var(--ink); font-size: 13px; cursor: pointer;
       transition: all var(--tr); font-family: inherit; }
.btn:hover { border-color: var(--pri); color: var(--pri); text-decoration: none; }
.btn.pri { background: var(--pri); border-color: var(--pri); color: #fff; font-weight: 600; }
.btn.pri:hover { background: var(--pri-deep); color: #fff; }
.btn.bad { background: #fff; border-color: #f0c7c6; color: var(--red); }
.btn.bad:hover { background: #fdecea; }
.btn.sm { padding: 3px 10px; font-size: 12px; border-radius: 7px; }
.btn.big { padding: 10px 20px; font-size: 14.5px; width: 100%; margin-top: 8px; }
input, select, textarea { font-family: inherit; font-size: 13.5px; padding: 8px 10px;
       border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
       width: 100%; transition: border-color var(--tr); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pri); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin: 12px 0 5px; }
form .btn { margin-top: 12px; }
form.inline { display: flex; gap: 8px; align-items: center; }
form.inline input, form.inline select { width: auto; }
form.inline .btn { margin-top: 0; }
.grid-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-items: end; }
.grid-form .btn { margin-top: 0; }
.grid-form input, .grid-form select, .grid-form textarea { width: 100%; }
@media (max-width: 860px) { .grid-form { grid-template-columns: 1fr 1fr; } }

/* ── 提示 ── */
.empty { padding: 22px 12px; text-align: center; color: var(--mut); font-size: 13.5px; }
.err { background: #fdecea; border: 1px solid #f5c6c4; color: var(--red); border-radius: 8px;
       padding: 9px 12px; margin-bottom: 10px; font-size: 13px; }
.hintbox { background: #fdf9ec; border: 1px solid #f0e2c0; border-radius: 8px; padding: 8px 12px;
           font-size: 12.5px; color: #8a6a1f; margin-top: 10px; }
.hint { font-size: 12.5px; color: var(--mut); margin-top: 10px; text-align: center; }

/* ── 选项卡 ── */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px;
        background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 5px; }
.tabs a { padding: 6px 13px; border-radius: 7px; font-size: 13px; color: var(--ink2); }
.tabs a:hover { background: var(--line2); text-decoration: none; }
.tabs a.on { background: var(--pri); color: #fff; font-weight: 600; }
.tab-sep { width: 1px; background: var(--line); margin: 4px 6px; }

/* ── 审批流线 ── */
.flowline { display: flex; align-items: flex-start; background: #fff; border: 1px solid var(--line);
            border-radius: 12px; padding: 16px 20px 12px; margin-bottom: 14px; gap: 0; }
.fstep { flex: 1; text-align: center; position: relative; }
.fstep::before { content: ''; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px;
                 background: var(--line); }
.fstep:first-child::before { display: none; }
.fstep.ok::before { background: var(--green); }
.fdot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); border: 3px solid #fff;
        box-shadow: 0 0 0 1px var(--line); margin: 0 auto 6px; position: relative; z-index: 1; }
.fstep.ok .fdot { background: var(--green); box-shadow: 0 0 0 1px var(--green); }
.fstep.now .fdot { background: var(--gold); box-shadow: 0 0 0 1px var(--gold-d); animation: pulse 1.6s infinite; }
.fstep.bad .fdot { background: var(--red); box-shadow: 0 0 0 1px var(--red); }
.flabel { font-size: 12.5px; color: var(--mut); }
.fstep.now .flabel { color: var(--gold-d); font-weight: 700; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 1px var(--gold-d), 0 0 0 4px rgba(212,175,55,.15); }
                   50% { box-shadow: 0 0 0 1px var(--gold-d), 0 0 0 8px rgba(212,175,55,.05); } }

/* ── 待办列表 ── */
.todo-list { display: flex; gap: 8px; flex-wrap: wrap; }
.todo-item { padding: 8px 14px; background: var(--off-w2); border: 1px solid var(--line);
             border-radius: 9px; font-size: 13.5px; }
.todo-item:hover { border-color: var(--pri); text-decoration: none; }

/* ── 业务阶段 ── */
.bizcard .biz-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bizcard .biz-hd b { font-size: 15px; }
.stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.stage { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--off-w2); }
.stage.doing { border-color: #bcd0f7; background: #f4f8ff; }
.stage.done { opacity: .75; background: #f2faf4; border-color: #cfe8d6; }
.stage.skip { opacity: .55; }
.s-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.s-top b { font-size: 13px; }
.s-top .mut { margin-left: auto; }
.s-meta { font-size: 11.5px; color: var(--mut); margin-top: 5px; }
.s-ops { margin-top: 8px; display: flex; gap: 6px; }

/* ── 证照预警 ── */
.alertcard { border-color: #f0d9a8; background: #fffdf5; }
.alert-flow { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── 登录页 ── */
body.loginbody { min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
                 align-items: center; background: linear-gradient(160deg, #1c2333 0%, #24304e 100%); }
.logincard { background: #fff; border-radius: 16px; padding: 34px 32px 26px; width: 360px;
             box-shadow: 0 20px 60px -20px rgba(0,0,0,.5); text-align: center; }
.logincard .mark-lg { color: var(--gold-d); }
.logincard h1 { font-size: 21px; margin: 10px 0 4px; letter-spacing: .02em; }
.logincard .sub { font-size: 13px; color: var(--mut); margin-bottom: 18px; }
.logincard input { margin-bottom: 10px; text-align: center; }
.logincard .btn, .logincard button { width: 100%; padding: 10px; border: none; border-radius: 9px;
             background: var(--pri); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
             transition: background var(--tr); font-family: inherit; }
.logincard button:hover { background: var(--pri-deep); }
.loginfoot { margin-top: 22px; color: #8b94ad; font-size: 12.5px; }

/* ── Toast ── */
#toasts { position: fixed; top: 60px; right: 18px; z-index: 99; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #1e8e3e; color: #fff; padding: 10px 18px; border-radius: 10px;
         font-size: 13.5px; box-shadow: var(--shadow-2); animation: slidein .25s ease-out; }
.toast.bad { background: var(--red); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
