:root {
  --brand: #2b6de8; --brand-d: #1d55c4; --brand-l: #eaf1fe;
  --bg: #f0f2f5; --card: #fff; --line: #e4e8ef; --line2: #f0f2f6;
  --ink: #1f2937; --sub: #6b7280; --mute: #9ca3af;
  --ok: #16a34a; --ok-l: #e8f7ee; --warn: #d97706; --warn-l: #fef3e2;
  --err: #dc2626; --err-l: #fdecec; --info: #0891b2; --info-l: #e3f5f9;
  --purple: #7c3aed; --purple-l: #f1ebfe;
  --r: 8px; --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-decoration: none; cursor: pointer; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 80px; text-align: center; color: var(--sub); }
.hidden { display: none !important; }

/* ---------------- 顶栏 + 侧栏 ---------------- */
.layout { display: grid; grid-template-columns: 216px 1fr; grid-template-rows: 54px 1fr; height: 100vh; }
.topbar { grid-column: 1 / 3; display: flex; align-items: center; gap: 16px; padding: 0 20px; color: #fff;
  background: linear-gradient(90deg, #1b4fc4, #2b6de8 60%, #3d86f5); box-shadow: 0 2px 6px rgba(27, 79, 196, .25); z-index: 20; }
.topbar .logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: .5px; white-space: nowrap; }
.topbar .logo i { width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; font-style: normal; }
.topbar .search { flex: 1; max-width: 360px; margin-left: 24px; position: relative; }
.topbar .search input { width: 100%; height: 32px; border: 0; border-radius: 16px; padding: 0 14px 0 34px; background: rgba(255, 255, 255, .18); color: #fff; outline: none; }
.topbar .search input::placeholder { color: rgba(255, 255, 255, .75); }
.topbar .search::before { content: "⌕"; position: absolute; left: 13px; top: 4px; font-size: 17px; opacity: .85; }
.topbar .sp { flex: 1; }
.topbar .ti { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; cursor: pointer; color: #fff; white-space: nowrap; }
.topbar .ti:hover { background: rgba(255, 255, 255, .14); }
.topbar .ti .dot { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; background: #ff4d4f; font-size: 11px; line-height: 16px; text-align: center; padding: 0 4px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 13px; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }
.avatar.c { background: var(--brand); color: #fff; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }

.sidebar { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 12px 0; }
.sidebar .grp { padding: 14px 20px 6px; font-size: 12px; color: var(--mute); }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 9px 20px; color: #374151; border-left: 3px solid transparent; }
.sidebar a:hover { background: #f5f7fb; }
.sidebar a.on { background: var(--brand-l); color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.sidebar a .ic { width: 20px; text-align: center; }
.sidebar a .n { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: #ff4d4f; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 600; }
.sidebar .newbtn { margin: 4px 16px 10px; display: flex; justify-content: center; background: var(--brand); color: #fff; border-radius: 6px; border: 0; font-weight: 600; }
.sidebar .newbtn:hover { background: var(--brand-d); }

.main { overflow-y: auto; padding: 18px 22px 60px; }
.crumb { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.crumb h2 { margin: 0; font-size: 18px; }
.crumb .sp { flex: 1; }
.crumb .back { color: var(--sub); }

/* ---------------- 通用组件 ---------------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line2); }
.card + .card { margin-top: 14px; }
.card-h { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line2); font-weight: 600; }
.card-h .sp { flex: 1; }
.card-h small { font-weight: 400; color: var(--sub); }
.card-b { padding: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.pri { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.pri:hover { background: var(--brand-d); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--err); border-color: #f3c4c4; }
.btn.danger:hover { background: var(--err-l); }
.btn.warn { color: var(--warn); border-color: #f5d7a8; }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.lg { height: 38px; padding: 0 22px; font-size: 15px; }
.btn.link { border: 0; background: none; color: var(--brand); padding: 0 4px; height: auto; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tag { display: inline-block; padding: 0 8px; height: 22px; line-height: 21px; border-radius: 4px; font-size: 12px; border: 1px solid transparent; white-space: nowrap; }
.tag.running { background: var(--brand-l); color: var(--brand); border-color: #c9dafb; }
.tag.approved { background: var(--ok-l); color: var(--ok); border-color: #bfe8cd; }
.tag.rejected, .tag.terminated { background: var(--err-l); color: var(--err); border-color: #f5c6c6; }
.tag.returned, .tag.withdrawn { background: var(--warn-l); color: var(--warn); border-color: #f5d7a8; }
.tag.draft, .tag.gray { background: #f3f4f6; color: var(--sub); border-color: #e5e7eb; }
.tag.u1 { background: var(--warn-l); color: var(--warn); }
.tag.u2 { background: var(--err-l); color: var(--err); }
.tag.purple { background: var(--purple-l); color: var(--purple); }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > label { font-size: 13px; color: #4b5563; }
.field > label .req { color: var(--err); margin-left: 2px; }
.help, .field .help { font-size: 12px; color: var(--mute); }
.inp, select.inp, textarea.inp { width: 100%; height: 34px; padding: 0 10px; border: 1px solid #d5dae3; border-radius: 6px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.inp { height: auto; min-height: 80px; padding: 8px 10px; resize: vertical; }
.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43, 109, 232, .12); }
.inp[readonly], .inp:disabled { background: #f7f8fa; color: #4b5563; }
.inp.err { border-color: var(--err); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.chk { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; cursor: pointer; }
.muted { color: var(--sub); }
.small { font-size: 12px; }
.empty { padding: 40px 0; text-align: center; color: var(--mute); }
.empty .big { font-size: 34px; margin-bottom: 6px; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl th { background: #f7f9fc; font-weight: 600; color: #4b5563; font-size: 13px; white-space: nowrap; }
.tbl tbody tr:hover { background: #f8fbff; }
.tbl tr.click { cursor: pointer; }
.tbl .unread td:first-child { position: relative; }
.tbl .unread td:first-child::before { content: ""; position: absolute; left: 3px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #ff4d4f; }
.tbl .t-title { font-weight: 500; color: var(--ink); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.wf-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font-size: 14px; margin-right: 8px; vertical-align: middle; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line2); }
.filters .inp { width: auto; min-width: 140px; height: 30px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 16px; color: var(--sub); font-size: 13px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 12px; background: #fff; border-radius: var(--r) var(--r) 0 0; }
.tabs a { padding: 11px 16px; color: #4b5563; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* ---------------- 工作台 ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line2); transition: transform .12s; }
.stat:hover { transform: translateY(-2px); }
.stat .i { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.stat .v { font-size: 26px; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--sub); font-size: 13px; }
.home-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.hello { display: flex; align-items: center; gap: 14px; padding: 18px 20px; margin-bottom: 14px; background: linear-gradient(110deg, #fff 55%, #eef4ff); }
.hello h3 { margin: 0 0 2px; font-size: 18px; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 8px; color: var(--ink); font-size: 13px; text-align: center; }
.quick a:hover { background: #f5f8ff; }
.quick .wi { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; }
.li { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line2); cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li:hover { background: #f8fbff; }
.li .t { flex: 1; min-width: 0; }
.li .t b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .t span { font-size: 12px; color: var(--sub); }
.bars .b { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 13px; }
.bars .b .n { width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4b5563; }
.bars .b .bar { flex: 1; height: 10px; border-radius: 5px; background: #eef2f8; overflow: hidden; }
.bars .b .bar i { display: block; height: 100%; background: linear-gradient(90deg, #5b8ff0, var(--brand)); border-radius: 5px; }
.bars .b .c { width: 30px; text-align: right; font-weight: 600; }

/* ---------------- 新建流程 ---------------- */
.cat { margin-bottom: 18px; }
.cat h4 { margin: 0 0 10px; font-size: 14px; color: #4b5563; display: flex; align-items: center; gap: 8px; }
.cat h4::before { content: ""; width: 3px; height: 14px; background: var(--brand); border-radius: 2px; }
.wf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.wf-card { display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: all .15s; }
.wf-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(43, 109, 232, .12); }
.wf-card .wi { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; flex: none; }
.wf-card b { display: block; margin-bottom: 2px; }
.wf-card p { margin: 0; font-size: 12px; color: var(--sub); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------------- 表单（填写 / 查看） ---------------- */
.req-head { text-align: center; padding: 18px 16px 6px; }
.req-head h2 { margin: 0; font-size: 20px; letter-spacing: 1px; }
.req-head .meta { color: var(--sub); font-size: 12px; margin-top: 6px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.fcell { display: grid; grid-template-columns: 130px 1fr; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 46px; }
.fcell.full { grid-column: 1 / 3; }
.fcell > .fl { background: #f7f9fc; padding: 10px 12px; color: #4b5563; font-size: 13px; display: flex; align-items: center; justify-content: flex-end; text-align: right; border-right: 1px solid var(--line); }
.fcell > .fl .req { color: var(--err); margin-right: 2px; }
.fcell > .fv { padding: 7px 10px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.fcell > .fv .view { white-space: pre-wrap; word-break: break-all; padding: 3px 2px; }
.fcell > .fv .help { font-size: 12px; color: var(--mute); margin-top: 3px; }
.fcell .unit { display: flex; align-items: center; gap: 6px; }
.fcell .unit span { color: var(--sub); white-space: nowrap; }
.fdesc { grid-column: 1 / 3; padding: 10px 14px; background: #fffbea; color: #92400e; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.dtl { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtl th, .dtl td { border: 1px solid var(--line); padding: 5px 6px; }
.dtl th { background: #f7f9fc; font-weight: 600; color: #4b5563; }
.dtl td .inp { height: 30px; border-color: transparent; padding: 0 6px; }
.dtl td .inp:focus { border-color: var(--brand); }
.dtl .idx { width: 46px; text-align: center; color: var(--mute); white-space: nowrap; }
.dtl tfoot td { background: #fafbfd; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--brand-l); color: var(--brand); font-size: 13px; }
.chip .x { cursor: pointer; opacity: .6; }
.chip .x:hover { opacity: 1; }
.files .f { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
.files .f .x { color: var(--err); cursor: pointer; }
.money-cap { font-size: 12px; color: var(--sub); margin-top: 2px; }

/* 审批路径预览 */
.path { display: flex; flex-direction: column; gap: 0; }
.path .pn { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.path .pn::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: #e5e9f0; }
.path .pn:last-child::before { display: none; }
.path .pn .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-l); color: var(--brand); display: grid; place-items: center; font-size: 13px; flex: none; z-index: 1; }
.path .pn.cc .dot { background: var(--purple-l); color: var(--purple); }
.path .pn.off { opacity: .5; }
.path .pn b { display: block; }
.path .pn .who { font-size: 13px; color: var(--sub); }

/* ---------------- 流程详情 ---------------- */
.detail-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 14px; align-items: start; }
.flowline { display: flex; gap: 0; overflow-x: auto; padding: 18px 16px 14px; }
.fnode { flex: 1; min-width: 132px; position: relative; text-align: center; padding: 0 6px; }
.fnode::after { content: ""; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: #dfe4ec; }
.fnode:last-child::after { display: none; }
.fnode.done::after, .fnode.auto::after, .fnode.skip::after { background: #9cd8b2; }
.fnode .c { width: 32px; height: 32px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: #eef1f6; color: var(--mute); border: 2px solid #dfe4ec; position: relative; z-index: 1; }
.fnode.done .c { background: var(--ok); border-color: var(--ok); color: #fff; }
.fnode.current .c { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 5px rgba(43, 109, 232, .15); }
.fnode.reject .c { background: var(--err); border-color: var(--err); color: #fff; }
.fnode.skip .c, .fnode.auto .c, .fnode.willskip .c { background: #f3f4f6; border-style: dashed; }
.fnode .nm { font-weight: 600; font-size: 13px; }
.fnode .pp { font-size: 12px; color: var(--sub); margin-top: 2px; line-height: 1.5; }
.fnode .pp .s-approved { color: var(--ok); }
.fnode .pp .s-pending { color: var(--brand); }
.fnode .pp .s-rejected, .fnode .pp .s-returned { color: var(--err); }
.fnode .pp .s-canceled, .fnode .pp .s-transferred { color: var(--mute); text-decoration: line-through; }
.fnode .nt { font-size: 11px; color: var(--mute); }

.timeline { padding: 6px 16px 10px; }
.tl { display: flex; gap: 12px; position: relative; padding: 10px 0; }
.tl::before { content: ""; position: absolute; left: 14px; top: 40px; bottom: -10px; width: 1px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .body { flex: 1; min-width: 0; }
.tl .hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl .hd .tm { margin-left: auto; font-size: 12px; color: var(--mute); }
.tl .cm { margin-top: 6px; padding: 8px 10px; background: #f7f9fc; border-radius: 6px; white-space: pre-wrap; word-break: break-all; font-size: 13px; }
.tl .nd { font-size: 12px; color: var(--sub); }
.act-approve, .act-submit, .act-resubmit, .act-finish, .act-addsign_reply { background: var(--ok-l); color: var(--ok); }
.act-reject, .act-terminate { background: var(--err-l); color: var(--err); }
.act-return, .act-withdraw, .act-urge { background: var(--warn-l); color: var(--warn); }
.act-transfer, .act-addsign, .act-cc { background: var(--purple-l); color: var(--purple); }
.act-skip, .act-auto_pass { background: #f3f4f6; color: var(--sub); }

.actbar { position: sticky; top: 0; }
.actbar textarea { min-height: 96px; }
.actbar .quick-op { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.actbar .quick-op span { padding: 2px 8px; border-radius: 4px; background: #f3f5f9; font-size: 12px; cursor: pointer; color: #4b5563; }
.actbar .quick-op span:hover { background: var(--brand-l); color: var(--brand); }
.actbar .main-ops { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.actbar .sub-ops { display: flex; gap: 8px; margin-top: 8px; }
.actbar .sub-ops .btn { flex: 1; }
.kv { display: grid; grid-template-columns: 76px 1fr; gap: 6px 8px; font-size: 13px; }
.kv dt { color: var(--sub); }
.kv dd { margin: 0; word-break: break-all; }

/* ---------------- 设计器 ---------------- */
.designer { display: grid; grid-template-columns: 200px 1fr 320px; gap: 14px; align-items: start; }
.palette a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 4px 0; border: 1px dashed #cdd5e1; border-radius: 6px; color: #374151; background: #fafbfd; font-size: 13px; }
.palette a:hover { border-color: var(--brand); color: var(--brand); background: #f5f8ff; }
.fitem { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.fitem:hover { border-color: #b9cdf6; }
.fitem.on { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(43, 109, 232, .15); }
.fitem .ty { font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #f1f4f9; color: var(--sub); }
.fitem .lb { flex: 1; min-width: 0; }
.fitem .lb small { color: var(--mute); margin-left: 6px; }
.fitem .ops { display: flex; gap: 2px; }
.fitem .ops button { border: 0; background: none; cursor: pointer; color: var(--sub); padding: 2px 5px; border-radius: 4px; }
.fitem .ops button:hover { background: #eef2f8; color: var(--brand); }
.chain { display: flex; flex-direction: column; align-items: center; padding: 10px 0 20px; }
.chain .cn { width: 300px; max-width: 100%; border-radius: 8px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; overflow: hidden; }
.chain .cn .h { padding: 7px 12px; color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.chain .cn .h .sp { flex: 1; }
.chain .cn .h button { border: 0; background: rgba(255, 255, 255, .2); color: #fff; border-radius: 4px; cursor: pointer; font-size: 12px; padding: 0 6px; }
.chain .cn .b { padding: 9px 12px; font-size: 13px; color: #4b5563; }
.chain .cn .b .cond { margin-top: 4px; font-size: 12px; color: var(--warn); }
.chain .cn.on { box-shadow: 0 0 0 2px var(--brand); }
.chain .cn.start .h { background: #64748b; }
.chain .cn.approve .h { background: #f59e0b; }
.chain .cn.cc .h { background: #3b82f6; }
.chain .cn.end { width: auto; padding: 6px 22px; border-radius: 16px; background: #eef1f6; color: var(--sub); cursor: default; box-shadow: none; }
.chain .ln { width: 2px; height: 18px; background: #cbd3df; }
.chain .add { position: relative; display: flex; gap: 6px; padding: 2px 0; }
.chain .add button { height: 24px; border-radius: 12px; border: 1px solid #c8d3e5; background: #fff; color: var(--brand); cursor: pointer; font-size: 12px; padding: 0 10px; }
.chain .add button:hover { background: var(--brand); color: #fff; }
.rule { display: grid; grid-template-columns: 1fr 74px 1fr 26px; gap: 6px; margin-bottom: 6px; }
.rule .inp { height: 30px; padding: 0 6px; }
.prop h4 { margin: 0 0 10px; font-size: 14px; }
.prop .sec { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; }
.icons { display: flex; flex-wrap: wrap; gap: 4px; }
.icons span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; cursor: pointer; font-size: 17px; border: 1px solid transparent; }
.icons span.on, .icons span:hover { border-color: var(--brand); background: var(--brand-l); }
.colors { display: flex; gap: 6px; flex-wrap: wrap; }
.colors span { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.colors span.on { box-shadow: 0 0 0 2px var(--ink); }

/* ---------------- 组织架构 ---------------- */
.org { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.tree { padding: 8px 0; }
.tree .tn { display: flex; align-items: center; gap: 6px; padding: 6px 12px; cursor: pointer; border-radius: 4px; margin: 0 6px; }
.tree .tn:hover { background: #f5f7fb; }
.tree .tn.on { background: var(--brand-l); color: var(--brand); font-weight: 600; }
.tree .tn .cnt { margin-left: auto; font-size: 12px; color: var(--mute); }

/* ---------------- 弹窗 / 提示 ---------------- */
.mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 10px; width: 520px; max-width: 100%; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0, 0, 0, .2); }
.modal.wide { width: 760px; }
.modal .mh { padding: 14px 18px; border-bottom: 1px solid var(--line2); font-weight: 600; font-size: 15px; display: flex; align-items: center; }
.modal .mh .x { margin-left: auto; cursor: pointer; color: var(--mute); font-size: 20px; line-height: 1; }
.modal .mb { padding: 16px 18px; overflow-y: auto; }
.modal .mf { padding: 12px 18px; border-top: 1px solid var(--line2); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
#toast-root { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 9px 18px; border-radius: 6px; background: #fff; box-shadow: 0 6px 20px rgba(0, 0, 0, .15); font-size: 14px; animation: fade .2s; border-left: 4px solid var(--brand); }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--err); }

.picker { display: grid; grid-template-columns: 200px 1fr; gap: 0; border: 1px solid var(--line); border-radius: 6px; height: 360px; }
.picker .l { border-right: 1px solid var(--line); overflow-y: auto; padding: 6px 0; }
.picker .r { overflow-y: auto; padding: 6px; }
.picker .u { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.picker .u:hover { background: #f5f7fb; }
.picker .u.on { background: var(--brand-l); }
.picker .u small { color: var(--mute); }
.picker .u .ck { margin-left: auto; color: var(--brand); font-weight: 700; }

/* ---------------- 登录 ---------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art { background: linear-gradient(135deg, #1b4fc4, #2b6de8 55%, #46a0ff); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login .art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.login .art h1 { font-size: 34px; margin: 0 0 12px; }
.login .art p { opacity: .88; font-size: 15px; max-width: 440px; }
.login .art ul { padding: 0; list-style: none; margin: 24px 0 0; }
.login .art li { margin: 10px 0; display: flex; gap: 10px; align-items: center; }
.login .art li i { width: 26px; height: 26px; border-radius: 7px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-style: normal; font-size: 13px; }
.login .box { display: flex; align-items: center; justify-content: center; padding: 30px; background: #fff; }
.login form { width: 340px; }
.login form h2 { margin: 0 0 4px; }
.login .inp { height: 40px; }
.login .btn { width: 100%; height: 40px; margin-top: 6px; }
.login .or { text-align: center; color: var(--mute); margin: 16px 0; font-size: 12px; display: flex; align-items: center; gap: 10px; }
.login .or::before, .login .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-acc { margin-top: 18px; font-size: 12px; color: var(--sub); background: #f7f9fc; border-radius: 6px; padding: 10px 12px; }
.demo-acc code { background: #e9eef7; border-radius: 3px; padding: 0 4px; cursor: pointer; }

/* ---------------- 响应式（企业微信手机端） ---------------- */
@media (max-width: 1100px) {
  .detail-wrap, .home-grid { grid-template-columns: 1fr; }
  .designer { grid-template-columns: 1fr; }
  .actbar { position: static; }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { grid-column: 1; padding: 0 12px; gap: 6px; }
  .topbar .search, .topbar .uname { display: none; }
  .menu-btn { display: block; }
  .sidebar { position: fixed; top: 54px; left: 0; bottom: 0; width: 230px; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px rgba(0, 0, 0, .1); }
  .sidebar.open { transform: none; }
  .main { padding: 12px 10px 90px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px; }
  .stat .v { font-size: 22px; }
  .fgrid { grid-template-columns: 1fr; }
  .fcell, .fcell.full { grid-column: 1; grid-template-columns: 1fr; }
  .fcell > .fl { justify-content: flex-start; border-right: 0; padding: 6px 10px; background: #fafbfd; }
  .fdesc { grid-column: 1; }
  .grid2 { grid-template-columns: 1fr; }
  .org { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login .art { display: none; }
  .tbl .hide-m { display: none; }
  .tbl th, .tbl td { padding: 9px 8px; }
  .picker { grid-template-columns: 1fr; height: auto; }
  .picker .l { max-height: 140px; border-right: 0; border-bottom: 1px solid var(--line); }
  .picker .r { max-height: 260px; }
  .dtl-wrap { overflow-x: auto; }
}
@media print {
  .topbar, .sidebar, .actbar-col, .crumb .btns, .no-print { display: none !important; }
  .layout { display: block; height: auto; }
  .main { overflow: visible; padding: 0; }
  .detail-wrap { display: block; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  body { background: #fff; }
}
