/* 协同办公审批平台：青绿品牌色 + 顶部导航 */
:root {
  --primary: #0d9488; --primary-hover: #14a89b; --primary-active: #0b7c72;
  --primary-1: #eefaf8; --primary-2: #d3f2ec; --primary-3: #96ddd2;
  --bg: #f3f5f7; --radius: 12px; --radius-sm: 8px;
  --c-leave: #3b82f6; --c-expense: #f59e0b; --c-purchase: #8b5cf6; --c-overtime: #ef4444; --c-trip: #06b6d4; --c-seal: #64748b;
}
body { background: var(--bg); }
.topnav { position: sticky; top: 0; z-index: 30; height: 60px; background: #fff; display: flex; align-items: center; gap: 24px; padding: 0 24px; border-bottom: 1px solid var(--border-2); box-shadow: 0 1px 0 rgba(15, 23, 42, .02); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand b { font-size: 17px; letter-spacing: .5px; }
.brand .org { font-size: 12px; color: var(--text-3); padding-left: 10px; border-left: 1px solid var(--border); }
.brand:hover { color: var(--text); }
.tnav { display: flex; gap: 4px; height: 100%; align-items: center; }
.tnav a { position: relative; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 8px; color: var(--text-2); font-size: 14px; white-space: nowrap; }
.tnav a:hover { background: var(--fill); color: var(--text); }
.tnav a.active { color: var(--primary); background: var(--primary-1); font-weight: 500; }
.tnav a .badge-count { margin-left: 2px; }
.tright { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; }
.has-dot { position: relative; }
.has-dot::after { content: ""; position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 1.5px solid #fff; }
.me { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px; border-radius: 20px; }
.me:hover { background: var(--fill); }
.me .n { font-size: 13px; }
.menu-toggle { display: none; }
.pop { position: absolute; top: 48px; right: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 180px; z-index: 60; display: none; }
.pop.show { display: block; animation: toastIn .18s; }
.pop-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.pop-item:hover { background: var(--fill); color: var(--text); }
.main { min-height: calc(100vh - 60px); }
.page { padding: 20px 24px 48px; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 20px; }
.page-head .desc-text { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; }

/* 类型图标 */
.ticon { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.ticon.sm { width: 28px; height: 28px; border-radius: 8px; }
.ticon.lg { width: 48px; height: 48px; border-radius: 14px; }

/* 工作台 */
.home-top { display: grid; grid-template-columns: 1fr 340px; gap: 16px; margin-bottom: 16px; }
.welcome { padding: 22px 24px; display: flex; gap: 16px; align-items: center; background: linear-gradient(120deg, #ffffff 40%, #e6f7f4 100%); position: relative; overflow: hidden; }
.welcome::after { content: ""; position: absolute; right: -30px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(13, 148, 136, .06); }
.welcome h2 { font-size: 20px; }
.welcome p { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.welcome .stats { margin-left: auto; display: flex; gap: 32px; position: relative; z-index: 1; }
.welcome .stats a { color: inherit; text-align: center; }
.welcome .stats b { display: block; font-size: 26px; font-weight: 600; line-height: 1.2; }
.welcome .stats span { font-size: 12px; color: var(--text-3); }
.welcome .stats a:hover b { color: var(--primary); }
.clock-card { padding: 18px 20px; display: flex; flex-direction: column; }
.clock-card .t { font-size: 13px; color: var(--text-2); display: flex; justify-content: space-between; }
.clock-card .rows { display: flex; gap: 12px; margin-top: 12px; }
.clock-card .rows > div { flex: 1; background: var(--fill); border-radius: 10px; padding: 10px 12px; }
.clock-card .rows .l { font-size: 12px; color: var(--text-3); }
.clock-card .rows .v { font-size: 18px; font-weight: 600; margin-top: 2px; }
.clock-btn { margin-top: 12px; width: 100%; height: 38px; border-radius: 10px; }
.apps { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.app-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px; border-radius: 12px; cursor: pointer; font-size: 13px; color: var(--text-2); transition: background .15s, transform .15s; }
.app-item:hover { background: var(--fill); color: var(--text); transform: translateY(-2px); }
.home-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-top: 16px; }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border-2); cursor: pointer; transition: background .12s; }
.todo-row:hover { background: var(--fill); }
.todo-row:last-child { border-bottom: 0; }
.todo-row .t { font-size: 14px; font-weight: 500; }
.todo-row .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.todo-row .acts { display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.todo-row:hover .acts { opacity: 1; }
.notice { display: flex; gap: 10px; padding: 11px 20px; border-bottom: 1px solid var(--border-2); font-size: 13px; cursor: pointer; }
.notice:hover .nt { color: var(--primary); }
.notice:last-child { border-bottom: 0; }
.notice .nt { flex: 1; min-width: 0; }
.notice .nd { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.chart { width: 100%; height: 260px; }

/* 发起审批 */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tpl { display: flex; gap: 12px; align-items: center; padding: 16px; cursor: pointer; transition: all .15s; }
.tpl:hover { border-color: var(--primary-3); box-shadow: 0 6px 20px rgba(13, 148, 136, .1); transform: translateY(-1px); }
.tpl .n { font-weight: 600; font-size: 15px; }
.tpl .d { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.apply-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.apply-form { padding: 24px 28px; }
.apply-form .form-head { display: flex; gap: 12px; align-items: center; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--border-2); }
.apply-form .form-head h2 { font-size: 18px; }
.items-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.items-table th { background: var(--fill); font-weight: 500; color: var(--text-2); padding: 8px; text-align: left; }
.items-table td { padding: 6px 4px; border-bottom: 1px solid var(--border-2); vertical-align: top; }
.items-table .input, .items-table .select { height: 32px; }
.items-table .field { margin: 0; }
.items-table .field-error { font-size: 11px; }
.items-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; font-size: 13px; color: var(--text-2); padding: 6px 4px 0; }
.items-total b { font-size: 20px; color: var(--text); }
.add-row { width: 100%; border: 1px dashed var(--border); background: #fff; border-radius: 8px; height: 34px; color: var(--primary); cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.add-row:hover { border-color: var(--primary); background: var(--primary-1); }
.upload { border: 1px dashed var(--border); border-radius: 10px; padding: 14px; display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 13px; cursor: pointer; background: var(--fill); }
.upload:hover { border-color: var(--primary); color: var(--primary); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--fill); font-size: 12px; margin: 8px 8px 0 0; color: var(--text-2); }
.chain-card { position: sticky; top: 76px; }
.chain { padding: 4px 0; }
.chain-node { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.chain-node::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--border-2); }
.chain-node:last-child::before { display: none; }
.chain-node .cn-ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; }
.chain-node .cn-ic .avatar { width: 36px !important; height: 36px !important; }
.chain-node .cn-badge { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; border: 2px solid #fff; }
.chain-node .cn-t { font-size: 13px; color: var(--text-3); }
.chain-node .cn-n { font-size: 14px; font-weight: 500; margin-top: 1px; }
.chain-node .cn-cond { font-size: 11px; margin-top: 4px; }
.chain-node.skip { opacity: .45; }
.chain-node.skip .cn-n { text-decoration: line-through; }
.chain-anim { animation: chainIn .3s ease both; }
@keyframes chainIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* 审批中心 */
.center { display: grid; grid-template-columns: 400px 1fr; gap: 0; height: calc(100vh - 60px - 68px - 40px); min-height: 560px; overflow: hidden; }
.center .list-pane { border-right: 1px solid var(--border-2); display: flex; flex-direction: column; min-height: 0; }
.center .tabs { padding: 0 16px; gap: 20px; }
.list-tools { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-2); }
.list-tools .input-icon { flex: 1; }
.list-tools .select { width: 104px; }
.ap-list { flex: 1; overflow: auto; }
.ap-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-2); cursor: pointer; position: relative; transition: background .12s; }
.ap-item:hover { background: var(--fill); }
.ap-item.active { background: var(--primary-1); }
.ap-item.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.ap-item .t { font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.ap-item .t .ellipsis { flex: 1; }
.ap-item .s { font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.6; }
.ap-item .tm { font-size: 12px; color: var(--text-3); white-space: nowrap; font-weight: 400; }
.detail-pane { overflow: auto; min-height: 0; display: flex; flex-direction: column; }
.dp-head { padding: 20px 28px 16px; border-bottom: 1px solid var(--border-2); display: flex; gap: 14px; align-items: flex-start; }
.dp-head h2 { font-size: 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dp-head .sub { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }
.dp-body { padding: 20px 28px; flex: 1; display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.dp-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border-2); padding: 12px 28px; display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 12px 16px; font-size: 14px; }
.kv .k { color: var(--text-3); }
.kv .v { color: var(--text); word-break: break-all; }
.stamp { position: absolute; right: 36px; top: 70px; width: 104px; height: 104px; border-radius: 50%; border: 3px solid; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; transform: rotate(-18deg); opacity: .8; letter-spacing: 2px; pointer-events: none; }
.stamp::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 1px solid; }
.stamp.ok { color: #10a37f; border-color: #10a37f; }
.stamp.no { color: #e5484d; border-color: #e5484d; }
.stamp.back { color: #8a94a6; border-color: #8a94a6; }
.wait-tag { font-size: 12px; color: var(--warning); }
.comment-box { background: var(--fill); border-radius: 8px; padding: 8px 12px; margin-top: 6px; font-size: 13px; color: var(--text-2); }

/* 流程设计器 */
.designer { display: grid; grid-template-columns: 240px 1fr 320px; height: calc(100vh - 60px - 40px - 68px); min-height: 600px; overflow: hidden; }
.flow-list { border-right: 1px solid var(--border-2); overflow: auto; padding: 8px; }
.flow-item { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; cursor: pointer; }
.flow-item:hover { background: var(--fill); }
.flow-item.active { background: var(--primary-1); }
.flow-item .n { font-size: 14px; font-weight: 500; }
.flow-item .d { font-size: 12px; color: var(--text-3); }
.canvas-wrap { position: relative; overflow: auto; background-color: #f6f8fa; background-image: radial-gradient(#dfe3e8 1px, transparent 1px); background-size: 18px 18px; }
.canvas-tools { position: sticky; top: 12px; left: 12px; z-index: 5; display: inline-flex; gap: 4px; background: #fff; border-radius: 10px; padding: 4px; box-shadow: var(--shadow); margin: 12px 0 0 12px; align-items: center; font-size: 12px; color: var(--text-2); }
.canvas { display: flex; flex-direction: column; align-items: center; padding: 20px 40px 80px; transform-origin: top center; transition: transform .2s; }
.fnode { width: 240px; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); cursor: pointer; position: relative; border: 2px solid transparent; transition: border-color .15s, box-shadow .15s, transform .15s; }
.fnode:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .12); }
.fnode.sel { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-2); }
.fnode .fh { height: 32px; border-radius: 10px 10px 0 0; display: flex; align-items: center; gap: 6px; padding: 0 12px; color: #fff; font-size: 12px; font-weight: 500; }
.fnode .fb { padding: 10px 12px 12px; font-size: 13px; color: var(--text); display: flex; align-items: center; gap: 6px; }
.fnode .fb .ph { color: var(--text-3); }
.fnode .fcond { margin: -4px 12px 12px; font-size: 11px; }
.fnode .del { position: absolute; right: 6px; top: 5px; width: 22px; height: 22px; border-radius: 6px; border: 0; background: rgba(255, 255, 255, .2); color: #fff; cursor: pointer; display: none; align-items: center; justify-content: center; }
.fnode:hover .del { display: flex; }
.fnode .del:hover { background: rgba(0, 0, 0, .2); }
.fh-start { background: #576a95; } .fh-approver { background: #ff943e; } .fh-cc { background: #3296fa; } .fh-handle { background: #8b5cf6; }
.fnode.new { animation: nodeIn .35s cubic-bezier(.2, .8, .3, 1.2); }
@keyframes nodeIn { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
.fline { width: 2px; height: 56px; background: #c7cdd6; position: relative; display: flex; align-items: center; justify-content: center; }
.fline::after { content: ""; position: absolute; bottom: -1px; left: -4px; border: 5px solid transparent; border-top: 6px solid #c7cdd6; border-bottom: 0; }
.fadd { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; border: 3px solid #f6f8fa; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(13, 148, 136, .35); transition: transform .15s; position: relative; z-index: 2; }
.fadd:hover { transform: scale(1.12); }
.fadd-pop { position: absolute; left: 36px; top: 50%; transform: translateY(-50%); background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: flex; gap: 6px; z-index: 10; }
.fadd-pop button { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.fadd-pop button:hover { background: var(--fill); }
.fadd-pop .ico { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.fend { width: 64px; height: 28px; border-radius: 14px; background: #e5e8ec; color: var(--text-3); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.cfg { border-left: 1px solid var(--border-2); overflow: auto; display: flex; flex-direction: column; }
.cfg-hd { padding: 16px 20px; border-bottom: 1px solid var(--border-2); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.cfg-bd { padding: 16px 20px; flex: 1; }
.radio-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio-card { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.radio-card:hover { border-color: var(--primary-3); }
.radio-card.on { border-color: var(--primary); background: var(--primary-1); color: var(--primary); }
.member-pick { border: 1px solid var(--border); border-radius: 8px; max-height: 200px; overflow: auto; }
.member-pick label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.member-pick label:hover { background: var(--fill); }
.designer-bar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border-2); }
.designer-bar h3 { font-size: 16px; }

/* 通讯录 */
.contacts { display: grid; grid-template-columns: 280px 1fr; min-height: calc(100vh - 60px - 68px - 40px); }
.tree { border-right: 1px solid var(--border-2); padding: 12px 8px; overflow: auto; }
.tree-node { display: flex; align-items: center; gap: 6px; height: 36px; padding-right: 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); user-select: none; }
.tree-node:hover { background: var(--fill); }
.tree-node.active { background: var(--primary-1); color: var(--primary); font-weight: 500; }
.tree-node .caret { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: transform .15s; flex-shrink: 0; }
.tree-node .caret.open { transform: rotate(90deg); }
.tree-node .cnt { margin-left: auto; font-size: 12px; color: var(--text-3); }
.tree-children { overflow: hidden; }
.tree-children.closed { display: none; }
.dept-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-2); flex-wrap: wrap; }
.dept-head h2 { font-size: 17px; }
.profile-top { display: flex; gap: 16px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--border-2); margin-bottom: 20px; }
.profile-top h3 { font-size: 20px; }

/* 移动端 */
.mobile-stage { display: flex; gap: 56px; justify-content: center; align-items: flex-start; padding: 0; }
.mobile-intro { margin-top: 140px; }
.mobile-intro { max-width: 360px; }
.mobile-intro h1 { font-size: 26px; line-height: 1.35; }
.mobile-intro p { color: var(--text-2); margin-top: 12px; line-height: 1.8; font-size: 14px; }
.mobile-intro ul { padding: 0; margin: 20px 0 0; list-style: none; }
.mobile-intro li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); padding: 8px 0; }
.mobile-intro li .ic { color: var(--primary); margin-top: 2px; }
.phone { width: 390px; height: 844px; border-radius: 54px; background: #111; padding: 12px; box-shadow: 0 30px 80px rgba(15, 23, 42, .25), inset 0 0 0 2px #333; position: relative; flex-shrink: 0; }
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; border-radius: 16px; background: #000; z-index: 20; }
.screen { width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: #f5f6f8; position: relative; display: flex; flex-direction: column; font-size: 15px; }
.m-status { height: 50px; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 30px 8px; font-size: 15px; font-weight: 600; flex-shrink: 0; background: #fff; position: relative; z-index: 3; }
.m-status .r { display: flex; gap: 6px; align-items: center; }
.m-stack { flex: 1; position: relative; overflow: hidden; }
.m-page { position: absolute; inset: 0; display: flex; flex-direction: column; background: #f5f6f8; transition: transform .32s cubic-bezier(.2, .8, .3, 1), opacity .32s; }
.m-page.enter { transform: translateX(100%); }
.m-page.under { transform: translateX(-28%); }
.m-page.leave { transform: translateX(100%); }
.m-nav { height: 46px; display: flex; align-items: center; justify-content: center; position: relative; background: #fff; font-size: 17px; font-weight: 600; flex-shrink: 0; border-bottom: 1px solid #f0f1f3; }
.m-nav .back { position: absolute; left: 8px; top: 7px; border: 0; background: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; }
.m-nav .right { position: absolute; right: 14px; font-size: 14px; font-weight: 400; color: var(--primary); cursor: pointer; }
.m-body { flex: 1; overflow: auto; position: relative; overscroll-behavior: contain; }
.m-body::-webkit-scrollbar { width: 0; }
.m-seg { display: flex; background: #fff; padding: 0 16px; gap: 24px; border-bottom: 1px solid #f0f1f3; flex-shrink: 0; }
.m-seg button { border: 0; background: none; padding: 12px 0 10px; font-size: 15px; color: var(--text-2); position: relative; cursor: pointer; }
.m-seg button.on { color: var(--text); font-weight: 600; }
.m-seg button.on::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 20px; height: 3px; border-radius: 2px; background: var(--primary); }
.m-seg .n { font-size: 11px; background: var(--danger); color: #fff; border-radius: 8px; padding: 0 5px; margin-left: 3px; vertical-align: 2px; }
.m-card { background: #fff; margin: 10px 12px 0; border-radius: 14px; padding: 14px; cursor: pointer; transition: transform .12s; }
.m-card:active { transform: scale(.98); }
.m-card .t { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.m-card .lines { margin-top: 10px; font-size: 13px; color: var(--text-2); line-height: 1.9; }
.m-card .lines span { color: var(--text-3); margin-right: 6px; }
.m-card .ft { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid #f2f3f5; font-size: 12px; color: var(--text-3); }
.m-tabbar { height: 82px; display: flex; background: rgba(255, 255, 255, .96); border-top: 1px solid #eceef1; padding-bottom: 26px; flex-shrink: 0; position: relative; z-index: 3; }
.m-tabbar button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: #8a919c; cursor: pointer; position: relative; }
.m-tabbar button.on { color: var(--primary); }
.m-tabbar .dotn { position: absolute; top: 6px; left: 54%; background: var(--danger); color: #fff; font-size: 10px; border-radius: 8px; padding: 0 5px; line-height: 15px; }
.m-foot { display: flex; gap: 10px; padding: 10px 16px 30px; background: #fff; border-top: 1px solid #f0f1f3; flex-shrink: 0; }
.m-foot .btn { flex: 1; height: 44px; border-radius: 12px; font-size: 16px; }
.m-sec { background: #fff; margin: 10px 0 0; padding: 14px 16px; }
.m-sec h4 { font-size: 14px; color: var(--text-3); font-weight: 400; margin-bottom: 10px; }
.m-kv { display: flex; font-size: 14px; padding: 6px 0; line-height: 1.6; }
.m-kv .k { color: var(--text-3); width: 84px; flex-shrink: 0; }
.m-sheet-mask { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); z-index: 30; opacity: 0; transition: opacity .25s; }
.m-sheet-mask.show { opacity: 1; }
.m-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 18px 18px 0 0; z-index: 31; padding: 8px 16px 34px; transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .3, 1); }
.m-sheet.show { transform: none; }
.m-sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: #e0e3e8; margin: 0 auto 12px; }
.m-sheet h3 { font-size: 17px; text-align: center; margin-bottom: 14px; }
.m-sheet textarea { width: 100%; border: 0; background: #f5f6f8; border-radius: 12px; padding: 12px; min-height: 100px; outline: none; resize: none; font-size: 15px; }
.m-quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.m-quick span { font-size: 13px; background: #f2f4f7; border-radius: 14px; padding: 4px 12px; cursor: pointer; }
.m-quick span:active { background: var(--primary-2); }
.m-ptr { height: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text-3); gap: 6px; overflow: hidden; }
.m-ptr .spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 0; background: #fff; margin: 10px 12px 0; border-radius: 14px; padding: 18px 6px; }
.m-grid div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.m-field { display: flex; align-items: center; padding: 14px 16px; background: #fff; border-bottom: 1px solid #f2f3f5; font-size: 15px; gap: 12px; position: relative; }
.m-field label { width: 80px; color: var(--text); flex-shrink: 0; }
.m-field.req label::before { content: "*"; color: var(--danger); margin-right: 2px; }
.m-field input, .m-field select, .m-field textarea { flex: 1; border: 0; outline: none; background: none; font-size: 15px; text-align: right; min-width: 0; }
.m-field textarea { text-align: left; min-height: 60px; resize: none; }
.m-field.col { flex-direction: column; align-items: stretch; }
.m-field .field-error { position: absolute; right: 16px; bottom: 1px; font-size: 11px; }
.m-field.has-error { background: #fff8f8; }
.m-me { background: linear-gradient(160deg, #0d9488, #14b8a6); color: #fff; padding: 24px 20px 56px; display: flex; gap: 14px; align-items: center; }
.m-me .avatar { border: 2px solid rgba(255, 255, 255, .6); }
.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; margin: -36px 12px 0; border-radius: 14px; padding: 14px 0; text-align: center; position: relative; box-shadow: 0 4px 14px rgba(0, 0, 0, .05); }
.m-stats b { display: block; font-size: 20px; }
.m-stats span { font-size: 12px; color: var(--text-3); }
.m-list-item { display: flex; align-items: center; gap: 12px; padding: 15px 16px; background: #fff; border-bottom: 1px solid #f2f3f5; font-size: 15px; }
.m-empty { text-align: center; color: var(--text-3); padding: 60px 0; font-size: 14px; }
.m-toast { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); background: rgba(20, 20, 20, .82); color: #fff; padding: 14px 20px; border-radius: 12px; font-size: 14px; z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 120px; animation: toastIn .2s; }

@media (max-width: 1200px) {
  .apps { grid-template-columns: repeat(4, 1fr); }
  .dp-body { grid-template-columns: 1fr; }
  .designer { grid-template-columns: 200px 1fr 280px; }
}
@media (max-width: 1024px) {
  .home-top, .home-grid, .apply-wrap { grid-template-columns: 1fr; }
  .chain-card { position: static; }
  .tnav a span.lbl { display: none; }
  .center { grid-template-columns: 320px 1fr; }
}
@media (max-width: 760px) {
  .topnav { padding: 0 12px; gap: 8px; }
  .brand .org, #quick-apply, .me .n { display: none; }
  .tnav { position: fixed; top: 60px; left: 0; right: 0; background: #fff; flex-direction: column; height: auto; align-items: stretch; padding: 8px; box-shadow: var(--shadow-lg); display: none; }
  .tnav.open { display: flex; }
  .tnav a span.lbl { display: inline; }
  .menu-toggle { display: inline-flex; }
  .page { padding: 14px 12px 48px; }
  .welcome { flex-direction: column; align-items: flex-start; }
  .welcome .stats { margin-left: 0; gap: 24px; }
  .center { grid-template-columns: 1fr; height: auto; }
  .center .detail-pane { display: none; }
  .center.show-detail .list-pane { display: none; }
  .center.show-detail .detail-pane { display: flex; }
  .ap-list { max-height: none; }
  .dp-head, .dp-body, .dp-foot { padding-left: 16px; padding-right: 16px; }
  .designer { grid-template-columns: 1fr; height: auto; }
  .flow-list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border-2); }
  .flow-item { flex-shrink: 0; }
  .canvas-wrap { min-height: 520px; }
  .cfg { border-left: 0; border-top: 1px solid var(--border-2); }
  .contacts { grid-template-columns: 1fr; }
  .tree { border-right: 0; border-bottom: 1px solid var(--border-2); max-height: 260px; }
  .mobile-stage { padding: 0; gap: 0; }
  .mobile-intro { display: none; }
  .apply-form { padding: 16px; }
  .items-table { display: block; overflow-x: auto; }
}
@media (max-width: 500px) {
  body.is-mobile-route .topnav { display: none; }
  body.is-mobile-route .page { padding: 0; }
  body.is-mobile-route .main { min-height: 100vh; }
  body.is-mobile-route .demo-badge { bottom: 90px; }
  .phone { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; padding: 0; box-shadow: none; }
  .phone::before { display: none; }
  .screen { border-radius: 0; }
  .m-status { display: none; }
}
.tl-head b { white-space: nowrap; }
.screen .tl-head { flex-wrap: wrap; row-gap: 2px; }
.screen .tl-time { flex-basis: 100%; margin-left: 0; padding-left: 30px; }
.screen .m-field .field-error { position: static; text-align: right; margin: 0; }
.screen .m-field { flex-wrap: wrap; }
.screen .m-field .field-error { flex-basis: 100%; }
.designer-bar h3 { white-space: nowrap; }
.welcome .stats span { white-space: nowrap; }
@media (max-width: 760px) {
  .designer-bar { flex-wrap: wrap; }
  .designer-bar .spacer { display: none; }
  .flow-list .nav-group { display: none; }
  .welcome .stats { gap: 18px; flex-wrap: wrap; }
  .welcome .stats b { font-size: 22px; }
  .canvas-tools { flex-wrap: wrap; }
}

.home-grid > *, .home-top > *, .apply-wrap > *, .contacts > * { min-width: 0; }
@media (max-width: 640px) { .card-hd { flex-wrap: wrap; row-gap: 6px; } }
@media (max-width: 640px) { .contacts td, .contacts th { white-space: nowrap; } }
/* 通知抽屉与公告 */
.notice[data-ntc] { cursor: pointer; }
.notice[data-ntc]:hover .nt { color: var(--primary); }
.ntc-h { font-size: 12px; color: var(--text-3); margin: 14px 4px 6px; }
.ntc-h:first-child { margin-top: 0; }
.ntc { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.ntc:hover { background: var(--fill); }
.ntc-t { font-size: 14px; color: var(--text); }
/* 窄屏通讯录：部门树收起高度，成员表改为卡片 */
@media (max-width: 640px) {
  .tree { max-height: 168px; }
  #etbl .dt-scroll { overflow: visible; }
  #etbl table, #etbl tbody { display: block; width: 100%; min-width: 0; }
  #etbl thead { display: none; }
  #etbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 16px; border-bottom: 1px solid var(--border-2); }
  #etbl tbody td { display: block; padding: 0; border: 0; white-space: normal !important; }
  #etbl tbody td:nth-child(1) { grid-column: 1; grid-row: 1; }
  #etbl tbody td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: right; }
  #etbl tbody td:nth-child(2) { grid-column: 1; grid-row: 2; padding-left: 40px; font-size: 13px; color: var(--text-2); }
  #etbl tbody td:nth-child(4) { grid-column: 2; grid-row: 2; text-align: right; font-size: 13px; }
  #etbl tbody td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; padding-left: 40px; font-size: 12px; color: var(--text-3); }
  #etbl tbody td:nth-child(5) { display: none; }
}
@media (max-width: 720px) { .todo-row .acts { display: none; } .todo-row > .fs12 { white-space: nowrap; flex: none; } }

/* 「在线体验」标记：挂在顶部导航下沿右侧（页面标题右上方空白处），不压正文；手机审批页放在标题栏右侧 */
.demo-badge { top: 60px; bottom: auto; right: 16px; font-size: 11px; line-height: 16px; padding: 1px 10px; border-radius: 0 0 8px 8px; border-top: 0; box-shadow: none; background: rgba(255, 255, 255, .96); z-index: 40; }
@media (max-width: 760px) { .demo-badge { right: 12px; font-size: 10px; line-height: 15px; padding: 0 8px; border-radius: 0 0 6px 6px; } }
@media (max-width: 500px) {
  body.is-mobile-route .demo-badge { top: 10px; bottom: auto; border-top: 1px solid var(--border); border-radius: 10px; line-height: 16px; }
}
/* 流程设计器整卡落在首屏内 */
@media (min-width: 1025px) { .designer { height: calc(100vh - 228px); } }
.page-head .desc-text { text-wrap: pretty; }
@media (max-width: 760px) {
  .page-head .desc-text { text-wrap: balance; }
  .flow-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; overflow: visible; padding: 10px 12px; }
  .flow-item { padding: 8px; gap: 8px; }
  .flow-item .d { display: none; }
  .flow-item .n { white-space: nowrap; }
}
