:root {
  --primary: #1677ff;
  --primary-weak: #e8f1ff;
  --primary-dark: #0958d9;
  --bg: #f2f3f5;
  --panel: #ffffff;
  --text: #1f2329;
  --text-2: #4e5969;
  --text-3: #86909c;
  --line: #e9ecf0;
  --green: #00b96b;
  --orange: #ff8f1f;
  --red: #f5222d;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 40, 80, .06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.6;
  overflow: hidden;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d5dae2; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c2c8d2; }

/* ------------------------------------------------------------------ 登录 */
.login-wrap {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0b3c8f 0%, #1677ff 46%, #4ea8ff 100%);
  overflow: auto; padding: 24px;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 15% 20%, rgba(255,255,255,.16), transparent 42%),
              radial-gradient(circle at 85% 80%, rgba(255,255,255,.12), transparent 40%);
}
.login-card {
  position: relative; width: 940px; max-width: 100%; background: #fff; border-radius: 20px;
  box-shadow: 0 24px 70px rgba(4, 24, 60, .34); display: flex; overflow: hidden;
}
.login-intro {
  flex: 1.15; padding: 46px 44px; color: #fff;
  background: linear-gradient(160deg, #10367d, #1a6ff0 62%, #3f96ff);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-intro h1 { font-size: 27px; margin: 0 0 10px; letter-spacing: 1px; font-weight: 700; }
.login-intro .slogan { font-size: 13px; opacity: .8; letter-spacing: 2px; }
.login-feature { display: flex; flex-direction: column; gap: 16px; margin: 34px 0 28px; }
.login-feature div { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; opacity: .94; }
.login-feature .fic {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,.16); font-size: 14px;
}
.login-intro .copy { font-size: 12px; opacity: .62; }
.login-form { flex: 1; padding: 46px 44px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { margin: 0 0 6px; font-size: 22px; }
.login-form p.sub { margin: 0 0 26px; color: var(--text-3); font-size: 13px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border: 1px solid #dcdfe6; border-radius: 9px;
  outline: none; transition: .16s; background: #fbfcfe;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(22,119,255,.12); }
.btn-primary {
  width: 100%; padding: 12px; border-radius: 9px; background: var(--primary); color: #fff;
  font-size: 15px; font-weight: 600; transition: .18s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.login-tip { margin-top: 14px; font-size: 12px; color: var(--text-3); text-align: center; }
.demo-accounts { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 18px; }
.demo-accounts .dt { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.demo-accounts .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-account {
  padding: 6px 11px; border-radius: 999px; background: #f2f5fa; color: var(--text-2);
  font-size: 12.5px; border: 1px solid transparent; transition: .15s;
}
.chip-account:hover { border-color: var(--primary); color: var(--primary); background: #fff; }

/* ------------------------------------------------------------------ 主框架 */
.app { display: flex; height: 100vh; height: 100dvh; }
.sidebar {
  width: 236px; flex: 0 0 236px; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #1677ff, #4aa3ff); color: #fff; font-weight: 700; font-size: 15px;
  letter-spacing: -.5px; box-shadow: 0 4px 12px rgba(22,119,255,.32);
}
.brand-text b { display: block; font-size: 15px; letter-spacing: .5px; }
.brand-text span { font-size: 10.5px; color: var(--text-3); letter-spacing: 1.6px; }
.me-card {
  margin: 4px 12px 10px; padding: 11px; border-radius: 10px; background: #f6f8fb;
  display: flex; align-items: center; gap: 10px; cursor: pointer; transition: .16s;
}
.me-card:hover { background: #eef3fb; }
.me-card .meta b { display: block; font-size: 13.5px; }
.me-card .meta span { font-size: 11.5px; color: var(--text-3); }
.nav { flex: 1; overflow-y: auto; padding: 4px 10px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px;
  color: var(--text-2); font-size: 14px; width: 100%; text-align: left; margin-bottom: 2px; position: relative;
  transition: .15s;
}
.nav-item:hover { background: #f4f6fa; color: var(--text); }
.nav-item.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.nav-item .ic { width: 20px; text-align: center; font-size: 15px; }
.nav-item .badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 500;
}
.side-foot { padding: 12px; border-top: 1px solid var(--line); }
.side-foot button {
  width: 100%; padding: 9px; border-radius: 8px; color: var(--text-3); font-size: 13px; text-align: left;
  padding-left: 14px;
}
.side-foot button:hover { background: #f4f6fa; color: var(--red); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.page-head {
  display: flex; align-items: center; gap: 14px; padding: 16px 24px;
  background: #fff; border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.page-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.page-head .sub { color: var(--text-3); font-size: 12.5px; }
.page-head .spacer { flex: 1; }
.page-body { flex: 1; overflow: auto; padding: 18px 24px 28px; }

/* ------------------------------------------------------------------ 通用组件 */
.btn {
  padding: 8px 15px; border-radius: 8px; font-size: 13.5px; background: #f2f4f8; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px; transition: .15s; white-space: nowrap;
}
.btn:hover { background: #e8ecf3; }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { background: #fff; border: 1px solid #dcdfe6; }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.danger { background: #fff1f0; color: var(--red); }
.btn.danger:hover { background: #ffe0de; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.avatar {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .5px; user-select: none;
}
.avatar.sm { width: 28px; height: 28px; flex-basis: 28px; font-size: 11.5px; }
.avatar.lg { width: 48px; height: 48px; flex-basis: 48px; font-size: 18px; }
.avatar.xl { width: 64px; height: 64px; flex-basis: 64px; font-size: 24px; }

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-title { font-size: 14.5px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card-title .more { margin-left: auto; font-size: 12.5px; color: var(--text-3); font-weight: 400; cursor: pointer; }
.card-title .more:hover { color: var(--primary); }

.tag {
  display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 5px;
  font-size: 11.5px; line-height: 19px; background: #f2f4f8; color: var(--text-2);
}
.tag.blue { background: var(--primary-weak); color: var(--primary); }
.tag.green { background: #e6f8ef; color: var(--green); }
.tag.orange { background: #fff3e6; color: var(--orange); }
.tag.red { background: #ffeceb; color: var(--red); }
.tag.gray { background: #f2f4f8; color: var(--text-3); }
.tag.cyan { background: #e6fbfa; color: #0e9c96; }

.empty {
  padding: 54px 20px; text-align: center; color: var(--text-3); font-size: 13px;
}
.empty .ec { font-size: 34px; display: block; margin-bottom: 10px; opacity: .55; }

.toast {
  position: fixed; left: 50%; top: 40px; transform: translateX(-50%) translateY(-12px);
  background: rgba(29,33,41,.92); color: #fff; padding: 9px 18px; border-radius: 8px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: .24s; z-index: 9999; max-width: 80vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(220,38,38,.94); }

/* ------------------------------------------------------------------ 首页工作台 */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.dash-hero {
  grid-column: 1 / -1;
  background: linear-gradient(115deg, #0b4fc4, #1677ff 58%, #4aa3ff);
  border-radius: var(--radius); padding: 22px 26px; color: #fff; display: flex; align-items: center; gap: 22px;
  box-shadow: 0 8px 24px rgba(22,119,255,.24);
}
.dash-hero .hi { font-size: 20px; font-weight: 600; }
.dash-hero .hi-sub { font-size: 12.5px; opacity: .8; margin-top: 4px; }
.dash-hero .spacer { flex: 1; }
.dash-hero .hero-clock { text-align: right; }
.dash-hero .hero-clock b { font-size: 22px; font-weight: 600; letter-spacing: 1px; display: block; }
.dash-hero .hero-clock span { font-size: 12px; opacity: .78; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; transition: .18s; position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(20,40,80,.1); }
.stat-card .st-label { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat-card .st-num { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-card .st-num small { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.stat-card .st-foot { font-size: 12px; color: var(--text-3); }
.stat-card .st-ic {
  position: absolute; right: 14px; top: 12px; font-size: 22px; opacity: .1;
}
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item {
  padding: 14px 8px; border-radius: 10px; background: #f7f9fc; text-align: center;
  transition: .16s; border: 1px solid transparent;
}
.quick-item:hover { background: #fff; border-color: var(--primary-weak); box-shadow: 0 4px 14px rgba(20,40,80,.07); }
.quick-item .qi { font-size: 20px; display: block; margin-bottom: 6px; }
.quick-item .qt { font-size: 12.5px; color: var(--text-2); }

/* 工作台：分组应用宫格（参考钉钉：我的 / 全员） */
.card-title .more .lnk {
  border: none; background: none; color: var(--text-3); font-size: 12.5px; cursor: pointer; padding: 2px 4px;
}
.card-title .more .lnk:hover { color: var(--primary); }
.wb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, 84px);
  gap: 18px 8px; margin-top: 6px; justify-content: start;
}
.wb-tile {
  border: none; background: none; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
}
.wb-iw { position: relative; display: inline-grid; }
.wb-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; line-height: 1; transition: .16s;
}
.wb-tile:hover .wb-ico { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(20,40,80,.12); }
.wb-ico.t-blue { background: #e2edff; }
.wb-ico.t-orange { background: #fff0dd; }
.wb-ico.t-sky { background: #e3f3ff; }
.wb-ico.t-green { background: #e4f7ec; }
.wb-ico.t-purple { background: #f0e9ff; }
.wb-ico.t-yellow { background: #fff5d8; }
.wb-ico.t-gray { background: #eff1f5; }
.wb-ico.t-all { background: #fff; border: 1px solid #e6ebf3; color: var(--text-3); font-size: 24px; }
.wb-badge {
  position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #ff5b57; color: #fff; font-size: 11px; font-weight: 600;
  display: grid; place-items: center; line-height: 1;
}
.wb-nm {
  font-size: 12.5px; color: var(--text-2); text-align: center; line-height: 1.32;
  max-width: 82px; word-break: break-all;
}
/* 设置全员应用弹窗 */
.wb-edit { max-height: 46vh; overflow: auto; margin-top: 8px; }
.wb-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid #f2f4f8;
}
.wb-row:last-child { border-bottom: none; }
.wb-check { display: flex; align-items: center; gap: 8px; flex: 1; cursor: pointer; font-size: 13.5px; }
.wb-row .wb-gtag {
  font-style: normal; font-size: 11.5px; color: var(--text-3); background: #f2f4f8;
  padding: 1px 6px; border-radius: 6px; margin-left: 4px;
}
.wb-move { display: flex; gap: 4px; }


.list-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f2f4f8;
  cursor: pointer;
}
.list-row:last-child { border-bottom: none; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-sub { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-time { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* ------------------------------------------------------------------ 消息 */
.im-layout { display: flex; height: 100%; min-height: 0; }
.im-side {
  width: 288px; flex: 0 0 288px; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.im-side-head { padding: 14px 14px 10px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.im-search {
  flex: 1; display: flex; align-items: center; gap: 6px; background: #f4f6fa; border-radius: 8px; padding: 6px 10px;
}
.im-search input { border: none; outline: none; background: transparent; width: 100%; font-size: 13px; }
.im-conv-list { flex: 1; overflow-y: auto; }
.conv-item {
  display: flex; gap: 11px; padding: 11px 14px; cursor: pointer; transition: .13s; align-items: center;
}
.conv-item:hover { background: #f7f9fc; }
.conv-item.active { background: var(--primary-weak); }
.conv-item .ci-main { flex: 1; min-width: 0; }
.conv-item .ci-top { display: flex; align-items: center; gap: 6px; }
.conv-item .ci-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-item .ci-time { margin-left: auto; font-size: 11px; color: var(--text-3); flex: 0 0 auto; }
.conv-item .ci-bottom { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.conv-item .ci-last { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.conv-item .ci-badge {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 10.5px; line-height: 17px; text-align: center; flex: 0 0 auto;
}
.group-avatar {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 600; background: linear-gradient(135deg, #1677ff, #5aa8ff);
}
.im-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); min-height: 0; }
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; background: #fff;
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.chat-head .ch-name { font-size: 15px; font-weight: 600; }
.chat-head .ch-sub { font-size: 11.5px; color: var(--text-3); }
.chat-head .spacer { flex: 1; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.chat-date { text-align: center; font-size: 11.5px; color: var(--text-3); margin: 12px 0; }
.msg { display: flex; gap: 9px; margin-bottom: 16px; align-items: flex-start; }
.msg.mine { flex-direction: row-reverse; }
.msg .m-body { max-width: min(560px, 72%); }
.msg .m-meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; display: flex; gap: 8px; }
.msg.mine .m-meta { justify-content: flex-end; }
.msg .m-text {
  padding: 9px 13px; border-radius: 4px 12px 12px 12px; background: #fff; font-size: 13.8px;
  line-height: 1.65; word-break: break-word; white-space: pre-wrap; box-shadow: 0 1px 3px rgba(20,40,80,.05);
}
.msg.mine .m-text { background: var(--primary); color: #fff; border-radius: 12px 4px 12px 12px; }
.chat-input {
  flex: 0 0 auto; background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: flex-end; gap: 10px; padding: 12px 16px;
}
.chat-input textarea {
  flex: 1; resize: none; border: 1px solid #e5e8ee; border-radius: 9px; padding: 9px 12px;
  outline: none; min-height: 92px; max-height: none; height: 100%; line-height: 1.5; background: #fbfcfe; transition: .15s;
}
.chat-input textarea:focus { border-color: var(--primary); background: #fff; }
.chat-input .send { padding: 9px 18px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 13.5px; }
.chat-input .send:disabled { opacity: .5; }
/* 消息输入工具栏：表情 / 图片 / 附件 / 拍照 / 视频 / 截图 */
.chat-composer {
  flex: 0 0 32%; min-height: 200px; max-height: 330px; position: relative; background: #fff;
  border-top: 1px solid var(--line); display: flex; flex-direction: column;
}
.chat-toolbar {
  display: flex; align-items: center; gap: 2px; padding: 7px 12px 0; overflow-x: auto; overflow-y: hidden;
  flex: 0 0 auto;
}
.chat-tool {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; flex: 0 0 auto;
  border: none; border-radius: 6px; background: transparent; color: #667085; font-size: 12px; cursor: pointer;
  transition: background .13s, color .13s;
}
.chat-tool:hover { background: #f3f6fb; color: var(--primary); }
.chat-tool:disabled { opacity: .42; cursor: default; }
.chat-tool .ct-ico { display: inline-grid; place-items: center; width: 18px; height: 18px; font-size: 16px; line-height: 1; }
.chat-tool .ct-emoji { color: #f5a623; }
.chat-tool .ct-image { color: #3b82d6; }
.chat-tool .ct-file { color: #8b5e34; }
.chat-tool .ct-camera { color: #7b61c9; }
.chat-tool .ct-video { color: #e05252; }
.chat-tool .ct-screenshot { color: #22a06b; }
.chat-toolbar-space { flex: 1; min-width: 8px; }
.chat-status { flex: 0 0 auto; color: var(--text-3); font-size: 11px; white-space: nowrap; }
.chat-status.busy { color: var(--primary); }
.chat-composer .chat-input { border-top: none; padding: 7px 12px 11px; background: #fff; flex: 1; min-height: 0; }
.chat-emoji-pop {
  position: absolute; left: 12px; bottom: calc(100% + 6px); width: min(360px, calc(100% - 24px));
  max-height: 272px; overflow: auto; background: #fff; border: 1px solid #e4e9f2; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20,40,80,.16); padding: 9px 10px 10px; z-index: 30;
}
.chat-shot-pop {
  position: absolute; right: 12px; bottom: calc(100% + 6px); width: min(344px, calc(100% - 24px));
  background: #fff; border: 1px solid #e4e9f2; border-radius: 12px; box-shadow: 0 10px 30px rgba(20,40,80,.16);
  padding: 9px 10px 10px; z-index: 31;
}
.chat-shot-item {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 8px; margin-top: 2px;
  border: none; border-radius: 8px; background: transparent; text-align: left; cursor: pointer;
}
.chat-shot-item:hover { background: #f4f7fc; }
.chat-shot-item .cs-ico {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: #eef5ff; color: var(--primary);
  display: grid; place-items: center; font-size: 17px;
}
.chat-shot-item b { display: block; color: var(--text); font-size: 13px; font-weight: 600; }
.chat-shot-item em { display: block; margin-top: 2px; color: var(--text-3); font-size: 11px; font-style: normal; line-height: 1.45; }
.chat-emoji-head {
  display: flex; align-items: center; justify-content: space-between; padding: 1px 2px 7px;
  color: var(--text-3); font-size: 11px; border-bottom: 1px solid #f2f4f8; margin-bottom: 6px;
}
.chat-emoji-head span:first-child { color: var(--text-2); font-size: 12px; font-weight: 600; }
.chat-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.chat-emoji-grid button {
  width: 100%; aspect-ratio: 1; border: none; background: transparent; border-radius: 6px;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.chat-emoji-grid button:hover { background: #f4f7fc; }
.msg .m-text.has-media { padding: 5px; background: #fff; border: 1px solid #eef1f6; box-shadow: 0 1px 4px rgba(20,40,80,.06); }
.msg.mine .m-text.has-media { background: #fff; color: var(--text); }
.msg .m-text.has-media .m-caption { padding: 6px 7px 3px; color: var(--text-2); font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.msg .m-img { display: block; line-height: 0; }
.msg .m-img img { display: block; max-width: 240px; max-height: 280px; border-radius: 8px; object-fit: cover; }
.msg .m-video { display: block; width: 260px; max-width: 100%; max-height: 280px; border-radius: 8px; background: #111; }
.msg .m-file {
  display: flex; align-items: center; gap: 10px; width: 280px; max-width: 100%; padding: 10px 11px;
  border: 1px solid #e8edf5; border-radius: 8px; background: #fbfdff; color: var(--text); text-decoration: none;
}
.msg .m-file:hover { background: #f5f9ff; border-color: #cfe1ff; }
.msg .m-file .mf-ico {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px; background: #edf4ff; color: var(--primary);
  display: grid; place-items: center; font-size: 18px;
}
.msg .m-file .mf-main { min-width: 0; flex: 1; }
.msg .m-file .mf-main b {
  display: block; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg .m-file .mf-main span { display: block; margin-top: 2px; color: var(--text-3); font-size: 10.5px; }
.msg .m-file .mf-dl { flex: 0 0 auto; color: var(--primary); font-size: 11px; }
.shot-crop-wrap { display: inline-block; position: relative; max-width: 100%; line-height: 0; user-select: none; touch-action: none; }
.shot-crop-wrap img { display: block; max-width: 100%; max-height: 62vh; border-radius: 8px; cursor: crosshair; }
.shot-crop-rect { position: absolute; border: 1.5px solid #1677ff; background: rgba(22,119,255,.10); box-shadow: 0 0 0 9999px rgba(0,0,0,.28); pointer-events: none; }
.shot-crop-tip { margin-top: 10px; color: var(--text-3); font-size: 12px; text-align: center; }
.app.shot-clean .sidebar,
.app.shot-clean .mobile-tabbar,
.app.shot-clean .im-side,
.app.shot-clean .chat-head,
.app.shot-clean .chat-composer { display: none !important; }
.app.shot-clean .im-layout,
.app.shot-clean .im-main { width: 100%; max-width: none; }
.app.shot-clean .chat-body { padding: 26px 34px; }
.cam-box { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.cam-box #cam-v { width: 100%; max-height: 54vh; border-radius: 11px; background: #111827; object-fit: cover; }
.cam-hint { color: var(--text-3); font-size: 12px; text-align: center; }
.cam-err { color: var(--red); font-size: 12px; text-align: center; line-height: 1.6; }
@media (max-width: 600px) {
  .chat-tool .ct-label { display: none; }
  .chat-tool { padding: 0 6px; }
  .chat-status { display: none; }
  .chat-emoji-grid { grid-template-columns: repeat(8, 1fr); }
  .msg .m-img img { max-width: 188px; max-height: 230px; }
  .msg .m-video { width: 210px; }
}


/* ------------------------------------------------------------------ 通讯录 */
.org-layout { display: flex; height: 100%; min-height: 0; }
.org-tree {
  width: 250px; flex: 0 0 250px; background: #fff; border-right: 1px solid var(--line);
  overflow-y: auto; padding: 12px 10px;
}
.tree-node {
  display: flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 7px; cursor: pointer;
  font-size: 13.5px; color: var(--text-2); transition: .13s;
}
.tree-node:hover { background: #f4f6fa; }
.tree-node.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.tree-node .cnt { margin-left: auto; font-size: 11px; color: var(--text-3); background: #f2f4f8; padding: 0 6px; border-radius: 8px; }
.tree-node.sub { padding-left: 26px; font-size: 13px; }
.org-list { flex: 1; min-width: 0; overflow-y: auto; background: var(--bg); padding: 14px 18px; }
.org-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 12px; }
.person-card {
  background: #fff; border-radius: 11px; padding: 14px 16px; display: flex; gap: 12px; align-items: center;
  box-shadow: var(--shadow); transition: .17s; cursor: pointer;
}
.person-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(20,40,80,.1); }
.person-card .pc-main { flex: 1; min-width: 0; }
.person-card .pc-name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.person-card .pc-title { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.person-card .pc-dept { font-size: 11.5px; color: var(--text-3); }

/* ------------------------------------------------------------------ 审批 */
.ap-layout { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ap-tabs {
  display: flex; gap: 4px; padding: 10px 24px 0; background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; flex: 0 0 auto;
}
.ap-tab {
  padding: 9px 14px 12px; font-size: 13.5px; color: var(--text-2); position: relative; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.ap-tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.ap-tab .cnt { font-size: 11px; color: var(--red); margin-left: 4px; }
.ap-body { flex: 1; overflow-y: auto; padding: 14px 24px 24px; }
.ap-list { display: flex; flex-direction: column; gap: 10px; max-width: 920px; }
.ap-card {
  background: #fff; border-radius: 11px; padding: 14px 16px; box-shadow: var(--shadow);
  display: flex; gap: 13px; align-items: flex-start; cursor: pointer; transition: .15s;
  border-left: 3px solid transparent;
}
.ap-card:hover { box-shadow: 0 6px 18px rgba(20,40,80,.1); transform: translateY(-1px); }
.ap-card.pending { border-left-color: var(--orange); }
.ap-card.approved { border-left-color: var(--green); }
.ap-card.rejected { border-left-color: var(--red); }
.ap-card .ap-type {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; display: grid; place-items: center;
  font-size: 18px; background: #f2f6fd;
}
.ap-card .ap-main { flex: 1; min-width: 0; }
.ap-card .ap-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-card .ap-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.ap-card .ap-amount { font-size: 15px; font-weight: 600; color: var(--orange); }
.ap-card .ap-right { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.detail-mask, .modal-mask {
  position: fixed; inset: 0; background: rgba(15, 25, 45, .45); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 14px; width: 560px; max-width: 100%; max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(10,25,50,.28); overflow: hidden;
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.modal.wide { width: 680px; }
.modal-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-head .x { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; color: var(--text-3); font-size: 16px; }
.modal-head .x:hover { background: #f4f6fa; }
.modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex: 0 0 auto; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-full { grid-column: 1 / -1; }
.type-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; margin-bottom: 18px; }
.type-opt {
  padding: 12px 6px; border-radius: 10px; border: 1px solid #e5e8ee; text-align: center; transition: .15s; background: #fbfcfe;
}
.type-opt:hover { border-color: var(--primary); background: #fff; }
.type-opt.sel { border-color: var(--primary); background: var(--primary-weak); font-weight: 600; color: var(--primary); }
.type-opt .to { display: block; font-size: 19px; margin-bottom: 4px; }
.type-opt .tt { font-size: 12.5px; }

.flow { padding: 4px 0 0; }
.flow-step { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.flow-step:last-child { padding-bottom: 0; }
.flow-step .fs-line {
  position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: #e9ecf0;
}
.flow-step:last-child .fs-line { display: none; }
.flow-step .fs-dot {
  width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; background: #f2f4f8; color: var(--text-3); z-index: 1;
}
.flow-step.approved .fs-dot { background: #e6f8ef; color: var(--green); }
.flow-step.rejected .fs-dot { background: #ffeceb; color: var(--red); }
.flow-step.pending .fs-dot { background: #fff3e6; color: var(--orange); }
.flow-step .fs-main { flex: 1; min-width: 0; padding-top: 2px; }
.flow-step .fs-name { font-size: 13.5px; font-weight: 500; display: flex; gap: 8px; align-items: center; }
.flow-step .fs-comment { font-size: 12.5px; color: var(--text-2); margin-top: 4px; background: #f7f9fc; padding: 7px 10px; border-radius: 7px; }
.flow-step .fs-time { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.flow-step .fs-who {
  flex: 0 0 56px; display: flex; flex-direction: column; align-items: center;
  gap: 2px; font-size: 11px; color: var(--text-3); padding-top: 1px;
}
.kv { display: flex; padding: 8px 0; border-bottom: 1px dashed #f0f2f6; font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { width: 92px; flex: 0 0 92px; color: var(--text-3); }
.kv .v { flex: 1; color: var(--text); word-break: break-word; }

/* ------------------------------------------------------------------ 考勤 */
.att-top { display: grid; grid-template-columns: 330px 1fr; gap: 14px; align-items: start; }
.clock-card {
  background: linear-gradient(160deg, #0b4fc4, #1677ff 58%, #469fff);
  border-radius: var(--radius); padding: 22px; color: #fff; text-align: center;
  box-shadow: 0 10px 26px rgba(22,119,255,.24);
}
.clock-card .cc-date { font-size: 12.5px; opacity: .82; letter-spacing: .5px; }
.clock-card .cc-time { font-size: 34px; font-weight: 700; letter-spacing: 2px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.clock-card .cc-shift { font-size: 12px; opacity: .78; margin-bottom: 18px; }
.clock-btn {
  width: 122px; height: 122px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.45); color: #fff;
  font-size: 15px; font-weight: 600; line-height: 1.35; transition: .18s; backdrop-filter: blur(4px);
}
.clock-btn:hover:not(:disabled) { background: rgba(255,255,255,.3); transform: scale(1.03); }
.clock-btn:disabled { opacity: .5; cursor: not-allowed; }
.clock-card .cc-result { font-size: 12.5px; opacity: .9; min-height: 20px; }
.att-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.att-stat {
  background: #fff; border-radius: 10px; padding: 13px 14px; box-shadow: var(--shadow);
}
.att-stat .as-l { font-size: 12px; color: var(--text-3); }
.att-stat .as-n { font-size: 21px; font-weight: 700; margin-top: 2px; }
.att-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 440px; }
.att-table th {
  text-align: left; padding: 10px 12px; color: var(--text-3); font-weight: 500; font-size: 12.5px;
  background: #f7f9fc; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.att-table td { padding: 10px 12px; border-bottom: 1px solid #f2f4f8; }
.att-table tr:last-child td { border-bottom: none; }
.att-table tr:hover td { background: #fbfcfe; }

/* 外出签到 */
.att-left, .att-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.oc-card { padding: 16px 18px 18px; }
.oc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.oc-head b { font-size: 14px; color: var(--text); }
.oc-sub { font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.oc-live-tag {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 0 6px; border-radius: 4px;
  font-size: 10.5px; line-height: 16px; background: rgba(255,255,255,.28); color: #fff;
}
.oc-form { display: flex; flex-direction: column; gap: 8px; }
.oc-form input, .oc-form select {
  width: 100%; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 8px;
  font-size: 12.5px; background: #fff; color: var(--text); outline: none;
}
.oc-form input:focus, .oc-form select:focus { border-color: var(--primary); }
.oc-form .btn { width: 100%; }
.oc-form .row { display: flex; gap: 8px; }
.oc-geo-tip { font-size: 11.5px; color: var(--text-3); margin-top: 8px; line-height: 1.5; }
.oc-active {
  background: linear-gradient(135deg, #eef7ff, #f6fbff); border: 1px solid #d6e8ff;
  border-radius: 10px; padding: 13px 14px;
}
.oc-a-top { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--primary); }
.oc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.16); animation: ocPulse 1.6s infinite; }
.oc-a-since { margin-left: auto; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.oc-a-main { margin: 8px 0 4px; font-size: 13px; color: var(--text); line-height: 1.6; }
.oc-a-main em { font-style: normal; color: var(--text-3); font-size: 12px; margin-left: 6px; }
.oc-a-exp { margin-left: 8px; font-size: 11.5px; color: var(--primary); background: #e8f2ff; padding: 1px 6px; border-radius: 4px; }
.oc-active .btn { width: 100%; margin-top: 10px; }
.oc-list { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.oc-list-t { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.oc-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.oc-item + .oc-item { border-top: 1px solid #f6f8fb; }
.oc-item.live { color: var(--primary); }
.oi-time { color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.oi-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oi-main em { font-style: normal; color: var(--text-3); font-size: 11.5px; margin-left: 6px; }
.oi-dur { color: var(--text-3); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.oc-tip { font-size: 12.5px; color: var(--text-3); background: #f7f9fc; border-radius: 8px; padding: 12px 14px; line-height: 1.6; }
.oc-empty { margin-top: 12px; font-size: 12px; color: var(--text-3); text-align: center; padding: 8px 0 2px; }
@keyframes ocPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(22,119,255,.16); }
  50% { box-shadow: 0 0 0 6px rgba(22,119,255,.06); }
}

/* 钉钉式外勤打卡：打卡卡内次级按钮 + 弹窗 */
.cc-out-btn {
  display: block; margin: 10px auto 0; padding: 6px 18px; border-radius: 16px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.4);
  color: #fff; font-size: 12.5px; line-height: 1.5; transition: .16s;
}
.cc-out-btn:hover:not(:disabled) { background: rgba(255,255,255,.28); }
.cc-out-btn:disabled { opacity: .5; cursor: not-allowed; }
.cc-out-btn.live { background: #fff; border-color: #fff; color: var(--primary); font-weight: 600; }
.cc-out-btn.live span { font-variant-numeric: tabular-nums; font-weight: 400; }
.oc-modal-tip {
  font-size: 12.5px; color: var(--text-3); background: #f5f8ff; border-radius: 8px;
  padding: 9px 12px; margin-bottom: 14px;
}
.oc-field { margin-bottom: 13px; }
.oc-field label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.oc-field label i { font-style: normal; color: var(--red); }
.oc-field input, .oc-field select {
  width: 100%; padding: 9px 11px; border: 1px solid #dcdfe6; border-radius: 8px;
  font-size: 13px; background: #fff; color: var(--text); outline: none;
}
.oc-field input:focus, .oc-field select:focus { border-color: var(--primary); }
.oc-place-row { display: flex; gap: 8px; }
.oc-place-row input { flex: 1; min-width: 0; }
.oc-place-row .btn { flex: 0 0 auto; white-space: nowrap; }
.oc-modal-note { font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-top: 4px; }

/* 钉钉式审批详情：顶部状态横幅 */
.ap-banner {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 10px; margin-bottom: 16px;
}
.ap-banner .ab-ic {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 16px; background: rgba(255,255,255,.6); flex: 0 0 34px;
}
.ap-banner .ab-tx { display: flex; flex-direction: column; gap: 2px; }
.ap-banner .ab-tx b { font-size: 15px; }
.ap-banner .ab-tx span { font-size: 12px; opacity: .8; }
.ap-banner.pending { background: #fff7e8; color: #b76a00; }
.ap-banner.approved { background: #e8f9ef; color: #0a7f46; }
.ap-banner.rejected { background: #ffecec; color: #c4352b; }
.ap-banner.gray { background: #f2f4f8; color: var(--text-2); }

.seg { display: inline-flex; background: #f2f4f8; border-radius: 8px; padding: 2px; }
.seg button { padding: 5px 13px; border-radius: 7px; font-size: 12.5px; color: var(--text-2); }
.seg button.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(20,40,80,.1); }

/* ------------------------------------------------------------------ 移动端 */
.mobile-tabbar { display: none; }
@media (max-width: 900px) {
  .sidebar { display: none; }
  .mobile-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 56px; background: #fff;
    border-top: 1px solid var(--line); z-index: 60; padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--text-3); font-size: 11px; position: relative;
  }
  .mobile-tabbar button.active { color: var(--primary); }
  .mobile-tabbar button .mi { font-size: 18px; line-height: 1; }
  .mobile-tabbar button .mbadge {
    position: absolute; top: 4px; left: 50%; margin-left: 8px; min-width: 15px; height: 15px;
    background: var(--red); color: #fff; font-size: 10px; line-height: 15px; border-radius: 8px; padding: 0 4px;
  }
  .main { padding-bottom: 56px; }
  .page-head { padding: 12px 14px; }
  .page-body { padding: 12px 14px 20px; }
  .dash-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-grid > :nth-child(4) { grid-column: 1 / -1; }
  .dash-hero { padding: 16px 18px; flex-wrap: wrap; gap: 10px; }
  .dash-hero .hero-clock { display: none; }
  .quick { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .wb-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 4px; }
  .wb-ico { width: 44px; height: 44px; font-size: 20px; }
  .wb-nm { font-size: 12px; max-width: 68px; }
  .att-top { grid-template-columns: 1fr; }
  .att-stats { grid-template-columns: repeat(2, 1fr); }
  .login-card { flex-direction: column; width: 420px; }
  .login-intro { display: none; }
  .login-form { padding: 30px 24px; }
  .im-side { width: 100%; flex: 1 1 auto; border-right: none; }
  .im-main { display: none; }
  .im-layout.chat-open .im-side { display: none; }
  .im-layout.chat-open .im-main { display: flex; }
  .chat-body { padding: 12px 12px; }
  .msg .m-body { max-width: 78%; }
  .chat-composer { flex-basis: 34%; min-height: 172px; max-height: 270px; }
  .chat-composer .chat-input { padding: 6px 9px 9px; }
  .chat-input textarea { min-height: 78px; }
  .org-tree {
    width: 100%; flex: 0 0 auto; border-right: none; border-bottom: 1px solid var(--line);
    max-height: 168px; padding: 8px;
  }
  .org-layout { flex-direction: column; }
  .org-list { padding: 12px; }
  .org-cards { grid-template-columns: 1fr; }
  .ap-tabs { padding: 6px 14px 0; }
  .ap-body { padding: 12px 14px 20px; }
  .ap-card .ap-right .tag { display: none; }
  .modal { max-height: 92vh; }
  .modal-foot .btn { flex: 1; justify-content: center; }
  .cc-out-btn { padding: 7px 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .type-picker { grid-template-columns: repeat(3, 1fr); }
  .page-body.ap-body { padding: 0; display: flex; flex-direction: column; }
}
@media (min-width: 901px) {
  .page-body.ap-body { padding: 0; display: flex; flex-direction: column; }
}

/* ------------------------------------------------------------------ 管理后台 */
.adm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.adm-stats .stat-card { padding: 16px 18px; }
.adm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.adm-tip { margin-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.6; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap .att-table { min-width: 640px; }
.ta-r { text-align: right; white-space: nowrap; }
.dept-cell { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.dept-cell .tree-line { color: var(--text-3); }
.u-cell { display: flex; align-items: center; gap: 9px; min-width: 132px; }
.u-cell .u-name { font-size: 13.5px; }
.u-cell .u-sub { font-size: 11.5px; color: var(--text-3); }
.u-filter input {
  padding: 6px 11px; border: 1px solid #dcdfe6; border-radius: 8px; font-size: 12.5px;
  outline: none; background: #fbfcfe; width: 220px; max-width: 100%;
}
.u-filter input:focus { border-color: var(--primary); background: #fff; }

/* 角色与权限 */
.role-layout { display: grid; grid-template-columns: 262px 1fr; gap: 14px; align-items: start; }
.role-side { position: sticky; top: 0; }
.role-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px;
  cursor: pointer; transition: .15s; border: 1px solid transparent;
}
.role-item:hover { background: #f7f9fc; }
.role-item.on { background: var(--primary-weak); border-color: rgba(22,119,255,.25); }
.role-item .ri-name { font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.role-item .ri-sub { font-size: 11.5px; color: var(--text-3); }
.role-desc { font-size: 12.5px; color: var(--text-3); margin: -6px 0 12px; }
.scope-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 10px 12px; background: #f7f9fc; border-radius: 9px; font-size: 13px; }
.scope-item { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.scope-item.locked, .perm-item.locked { cursor: default; color: var(--text-2); }
.perm-matrix { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.perm-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.pg-head { display: flex; align-items: baseline; gap: 10px; padding: 9px 12px; background: #f7f9fc; font-size: 13px; }
.pg-head b { font-weight: 600; }
.pg-head span { font-size: 11.5px; color: var(--text-3); }
.pg-items { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 12px; }
.perm-item { display: flex; align-items: center; gap: 8px; padding: 5px 4px; font-size: 13px; border-radius: 6px; cursor: pointer; }
.perm-item:hover { background: #f7f9fc; }
.perm-item span { flex: 1; }
.perm-item .pk { font-size: 11px; color: #b4bcc8; font-style: normal; font-family: ui-monospace, Consolas, monospace; }
.role-foot { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.role-foot .spacer { flex: 1; }
.perm-count { font-size: 12.5px; color: var(--text-3); }
.role-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: #f2f5fa; font-size: 12.5px; cursor: pointer; border: 1px solid transparent; transition: .15s;
}
.role-chip.on { background: var(--primary-weak); border-color: rgba(22,119,255,.35); color: var(--primary); }
.role-chip input { display: none; }

@media (max-width: 900px) {
  .adm-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .adm-two { grid-template-columns: 1fr; }
  .role-layout { grid-template-columns: 1fr; }
  .role-side { position: static; }
  .pg-items { grid-template-columns: 1fr; }
  .perm-item .pk { display: none; }
  .u-filter input { width: 100%; }
  .page-head { flex-wrap: wrap; row-gap: 8px; }
  .page-head h2 { white-space: nowrap; }
  .page-head .sub { white-space: nowrap; }
  .seg { max-width: 100%; overflow-x: auto; }
  .seg button { white-space: nowrap; }
}


/* ------------------------------------------------------------------ 审批流程与数据 */
.adm-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.adm-bar .card-title { font-size: 15px; }
.adm-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; line-height: 1.6; }
.adm-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.adm-filters select, .adm-filters input {
  padding: 7px 10px; border: 1px solid #dcdfe6; border-radius: 8px; font-size: 12.5px;
  background: #fbfcfe; outline: none; min-width: 120px;
}
.adm-filters select:focus, .adm-filters input:focus { border-color: var(--primary); background: #fff; }
.adm-filters #df-q { min-width: 180px; }
.att-table th { font-size: 12px; color: var(--text-3); font-weight: 600; text-align: left; }
.att-table td { font-size: 13px; }
.att-table .mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: var(--text-3); }
.row-off { opacity: .55; }
.link { color: var(--primary); cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
.tpl-icon { font-size: 16px; margin-right: 4px; }
.ch-mini { display: inline-block; padding: 1px 7px; border-radius: 6px; background: #f2f5fa; font-size: 11.5px; color: var(--text-2); }
.ch-arrow { color: var(--text-3); font-style: normal; margin: 0 3px; font-size: 11px; }

/* 流程设计器 */
.ed-head {
  display: flex; align-items: center; gap: 10px; margin: 18px 0 8px;
  font-size: 13px; font-weight: 600; padding-top: 14px; border-top: 1px dashed var(--line);
}
.ed-head span { font-weight: 400; font-size: 11.5px; color: var(--text-3); flex: 1; }
.ed-row {
  display: flex; align-items: center; gap: 6px; padding: 6px; margin-bottom: 6px;
  background: #f9fbfd; border: 1px solid var(--line); border-radius: 8px; flex-wrap: wrap;
}
.ed-row .ed-idx {
  width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; background: var(--primary-weak);
  color: var(--primary); font-size: 11.5px; display: grid; place-items: center;
}
.ed-row input, .ed-row select {
  padding: 6px 9px; border: 1px solid #dcdfe6; border-radius: 7px; font-size: 12.5px;
  background: #fff; outline: none;
}
.ed-row [data-fk="label"] { flex: 1 1 150px; min-width: 110px; }
.ed-row [data-fk="type"] { flex: 0 0 90px; }
.ed-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.ed-opts { flex: 1 1 130px; }
.ed-opts.hide { display: none; }
.ed-step [data-sk="label"] { flex: 0 1 110px; min-width: 90px; }
.ed-step [data-sk="userId"], .ed-step [data-sk="roleId"] { flex: 0 1 130px; min-width: 104px; }
.ed-cond { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ed-cond select, .ed-cond input { padding: 5px 7px; font-size: 12px; }
.ed-cond input { width: 62px; }
.chain-preview {
  margin-top: 12px; padding: 10px 12px; background: #f7f9fc; border-radius: 9px;
  font-size: 12.5px; color: var(--text-2); line-height: 1.9;
}
.chain-preview .ch-node { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.chain-preview i { font-style: normal; color: var(--text-3); margin: 0 4px; }
.chain-preview em { font-style: normal; color: var(--orange); font-size: 11.5px; }
.chain-preview .ch-branch {
  display: block; margin: 5px 0; padding: 7px 10px; background: #f4f8ff;
  border: 1px solid #dbe6fb; border-radius: 8px;
}
.chain-preview .ch-branch b { color: var(--primary); font-weight: 600; }
.chain-preview .ch-branch-rule { display: block; margin-top: 4px; color: var(--text-2); }
.chain-preview .ch-branch-arrow { color: var(--text-3); margin: 0 5px; }
.chain-preview .ch-empty { color: var(--text-3); }
.chain-preview { line-height: 1.55; }
.chain-preview-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.chain-preview-head b { font-size: 13px; color: var(--text); }
.chain-preview-head span { font-size: 11.5px; color: var(--text-3); }
.chain-v { position: relative; }
.chain-v-row { position: relative; display: flex; align-items: flex-start; gap: 10px; padding-bottom: 14px; }
.chain-v-row:last-child { padding-bottom: 0; }
.chain-v-line { position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: #e9ecf0; }
.chain-v-row:last-child .chain-v-line { display: none; }
.chain-v-dot {
  width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; background: #f2f4f8; color: var(--text-3); z-index: 1;
}
.chain-v-dot.done { background: #e6f8ef; color: var(--green); }
.chain-v-dot.branch { background: #eef5ff; color: var(--primary); font-size: 13px; }
.chain-v-main { flex: 1; min-width: 0; padding-top: 1px; }
.chain-v-title { font-size: 13px; font-weight: 500; color: var(--text); }
.chain-v-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.chain-v-who { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--text-3); }
.chain-v-branch { margin-bottom: 12px; }
.chain-v-branch-list { margin-left: 10px; padding: 2px 0 0 20px; border-left: 2px solid #e9ecf0; }
.chain-v-branch-card { margin-bottom: 10px; padding: 8px 10px; background: #fff; border: 1px solid #e6eaf2; border-radius: 8px; }
.chain-v-branch-card:last-child { margin-bottom: 0; }
.chain-v-cond { display: flex; flex-direction: column; gap: 2px; margin-bottom: 7px; }
.chain-v-cond b { font-size: 12px; color: var(--primary); }
.chain-v-cond span { font-size: 11.5px; color: var(--text-2); word-break: break-word; }
.chain-v-branch-card .chain-v { margin-top: 2px; }
.chain-v-branch-card .chain-v-row { padding-bottom: 10px; }
.chain-v-branch-card .chain-v-row:last-child { padding-bottom: 0; }
.chain-v-empty { font-size: 11.5px; color: var(--text-3); }

/* 审批详情：节点标题、评论 */
.ap-node-title { font-size: 11.5px; color: var(--text-3); background: #f2f5fa; padding: 1px 6px; border-radius: 5px; }
.ap-comments { margin-top: 6px; }
.ap-comments .sub-inline { font-size: 11.5px; color: var(--text-3); font-weight: 400; margin-left: 4px; }
.ap-cm { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.ap-cm:last-child { border-bottom: none; }
.ap-cm-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-3); }
.ap-cm-head b { color: var(--text-1); font-weight: 600; }
.ap-cm-body { font-size: 13px; margin-top: 3px; line-height: 1.6; word-break: break-word; }
.ap-cm-empty { font-size: 12.5px; color: var(--text-3); padding: 6px 0; }
.ap-cm-input { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.ap-cm-input textarea {
  flex: 1; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 8px; font-size: 13px;
  outline: none; resize: vertical; font-family: inherit;
}
.ap-cm-input textarea:focus { border-color: var(--primary); }
.ap-create-head {
  display: flex; align-items: center; gap: 10px; padding: 1px 2px 12px; margin-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.ap-create-ico {
  width: 36px; height: 36px; display: grid; place-items: center; flex: none;
  background: var(--primary-weak); border-radius: 10px; font-size: 19px;
}
.ap-create-head b { display: block; font-size: 14px; color: var(--text-1); }
.ap-create-head em { display: block; margin-top: 2px; font-style: normal; font-size: 11.5px; color: var(--text-3); }
.ap-create-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.ap-editsec { background: #fbfdff; border: 1px dashed #bcd2f4; border-radius: 10px; padding: 12px 14px 14px; margin-bottom: 16px; }
.ap-editsec .ap-create-form { margin-top: 2px; }
.ap-create-form .field-full { grid-column: 1 / -1; }
.ap-create-form .field { margin-bottom: 0; }

@media (max-width: 900px) {
  .adm-bar { flex-direction: column; align-items: stretch; }
  .adm-filters select, .adm-filters input { flex: 1 1 120px; min-width: 0; }
  .adm-filters #df-q { flex: 1 1 100%; }
  .att-table { min-width: 720px; }
  .ed-row { flex-wrap: wrap; }
  .ed-row [data-fk="label"] { flex: 1 1 100%; }
  .ap-create-form { grid-template-columns: 1fr; }
}
/* ==================== 审批流程：钉钉式列表 ==================== */
.fl-page { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 20px; }
.fl-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.fl-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: #f4f6f9; padding: 4px; border-radius: 10px; }
.fl-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: var(--text-2); font-size: 13.5px; }
.fl-tab em { font-style: normal; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 8px; background: #e9ecf1; color: var(--text-3); }
.fl-tab.sel { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 4px rgba(20, 40, 80, .1); }
.fl-tab.sel em { background: var(--primary-weak); color: var(--primary); }
.fl-create { position: relative; }
.fl-create-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: #fff; border-radius: 12px; box-shadow: 0 12px 34px rgba(20, 40, 80, .18); padding: 6px; z-index: 40; }
.fl-create-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 9px; }
.fl-create-menu button b { display: block; font-size: 13.5px; color: var(--text); }
.fl-create-menu button span { display: block; font-size: 12px; color: var(--text-3); }
.fl-create-menu button.on:hover { background: #f2f8ff; }
.fl-create-menu button:disabled { opacity: .6; cursor: not-allowed; }
.fl-tip { font-size: 12.5px; color: var(--text-3); margin: 2px 0 12px; }
.fl-list { display: flex; flex-direction: column; }
.fl-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.fl-row.off { opacity: .62; }
.fl-ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: #f2f6ff; display: grid; place-items: center; font-size: 19px; }
.fl-main { flex: 1; min-width: 0; }
.fl-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; }
.fl-chain { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin: 5px 0 4px; }
.fl-chip { font-size: 12px; color: var(--text-2); background: #f4f6f9; border-radius: 6px; padding: 1px 7px; }
.fl-chip.cond { background: #fff4e6; color: #d46b08; }
.fl-arrow { font-style: normal; color: var(--text-3); font-size: 11px; margin: 0 3px; }
.fl-meta { font-size: 12px; color: var(--text-3); }
.fl-pend { color: var(--orange); }
.fl-upd { font-size: 12px; color: var(--text-3); white-space: nowrap; text-align: right; }
.fl-time { color: var(--text-2); }
.fl-ops { display: flex; gap: 14px; flex: 0 0 auto; }
.fl-op { font-size: 13px; color: var(--primary); padding: 2px; }
.fl-op:hover { text-decoration: underline; }
.fl-more { position: absolute; right: 0; top: calc(100% - 6px); z-index: 35; background: #fff; border-radius: 10px; box-shadow: 0 10px 30px rgba(20, 40, 80, .16); padding: 4px; min-width: 150px; }
.fl-more button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.fl-more button:hover { background: #f5f7fb; }
.fl-more button.danger { color: var(--red); }

/* ==================== 钉钉式流程设计器 ==================== */
.dg-mask { position: fixed; inset: 0; z-index: 1200; background: #f5f6f8; display: flex; }
.dg-shell { display: flex; flex-direction: column; width: 100%; height: 100%; background: #f5f6f8; }
.dg-top { display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dg-topleft { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.dg-logo { width: 34px; height: 34px; border-radius: 9px; background: #f2f6ff; display: grid; place-items: center; font-size: 18px; }
.dg-title { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.dg-sub { font-size: 11.5px; color: var(--text-3); }
.dg-tabs { display: flex; gap: 2px; margin: 0 auto; }
.dg-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13.5px; color: var(--text-2); border-bottom: 2px solid transparent; }
.dg-tab i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #d9dee7; display: grid; place-items: center; font-size: 11px; color: var(--text-3); }
.dg-tab.on { color: var(--primary); font-weight: 600; border-color: var(--primary); }
.dg-tab.on i { border-color: var(--primary); background: var(--primary); color: #fff; }
.dg-topright { display: flex; align-items: center; gap: 8px; }
.dg-x { width: 30px; height: 30px; border-radius: 6px; color: var(--text-3); font-size: 15px; }
.dg-x:hover { background: #f2f3f5; }
.dg-main { flex: 1; min-height: 0; overflow: auto; }
.dg-pane { padding: 22px 26px 40px; }
.dg-narrow { max-width: 760px; margin: 0 auto; }
.dg-card { background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 6px 22px 20px; }
.dg-row { display: flex; align-items: flex-start; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.dg-row:last-child { border-bottom: none; }
.dg-lb { width: 96px; flex: 0 0 96px; font-size: 13px; color: var(--text-2); padding-top: 8px; font-weight: 500; }
.dg-lb i { font-style: normal; color: var(--red); margin-left: 3px; }
.dg-ctlwrap { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dg-ctlwrap input, .dg-ctlwrap select { flex: 1; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 8px; outline: none; background: #fff; }
.dg-ctlwrap input:focus, .dg-ctlwrap select:focus { border-color: var(--primary); }
.dg-cnt { font-size: 11.5px; color: var(--text-3); }
.dg-iconpick { display: flex; gap: 6px; flex-wrap: wrap; }
.dg-iconbtn { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 17px; background: #fff; }
.dg-iconbtn.on { border-color: var(--primary); background: var(--primary-weak); }
.dg-note { margin: 14px 4px 0; font-size: 12.5px; color: var(--text-3); line-height: 1.8; }
.dg-sec { margin: 18px 0 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.dg-sec:first-child { margin-top: 12px; }
.dg-switchline { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 4px; }
.dg-kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; color: var(--text-2); border-bottom: 1px dashed var(--line); }
.dg-kv b { color: var(--text); font-weight: 500; }
.dg-hint { font-size: 12px; color: var(--text-3); margin: 4px 0 0; line-height: 1.7; }
.dg-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: 0 0 40px; }
.dg-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.dg-switch i { position: absolute; inset: 0; background: #d7dbe2; border-radius: 12px; transition: .2s; }
.dg-switch i:before { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.dg-switch input:checked + i { background: var(--primary); }
.dg-switch input:checked + i:before { transform: translateX(18px); }
.dg-formwrap { display: grid; grid-template-columns: 236px minmax(0, 1fr) 300px; height: 100%; min-height: 0; }
.dg-palette { background: #fff; border-right: 1px solid var(--line); overflow: auto; padding: 12px; }
.dg-pal-h { font-size: 13px; font-weight: 600; color: var(--text); padding: 2px 4px 10px; }
.dg-palgroup { margin-bottom: 12px; }
.dg-paltitle { font-size: 12px; color: var(--text-3); padding: 6px 4px; }
.dg-palgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dg-palbtn { display: flex; align-items: center; gap: 6px; padding: 9px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12.5px; color: var(--text-2); text-align: left; }
.dg-palbtn:hover { border-color: var(--primary); color: var(--primary); background: #f5f9ff; }
.dg-palbtn.off { opacity: .5; cursor: not-allowed; }
.dg-palic { font-size: 13px; line-height: 1; }
.dg-paltip { font-size: 11.5px; color: var(--text-3); padding: 6px 4px; line-height: 1.6; }
.dg-canvaswrap { overflow: auto; padding: 18px 22px 40px; background: #f5f6f8; }
.dg-canvasbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 720px; margin: 0 auto 10px; font-size: 12.5px; color: var(--text-3); }
.dg-canvasbar b { font-size: 13px; color: var(--text); }
.dg-canvas { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: 20px 22px 24px; }
.dg-formtitle { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.dg-formdesc { font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }
.dg-item { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; transition: .15s; }
.dg-item:hover { background: #fafbfd; }
.dg-item.sel { border-color: var(--primary); background: #f7faff; box-shadow: 0 0 0 2px rgba(22, 119, 255, .08); }
.dg-item.dragging { opacity: .4; }
.dg-item.over { border-top: 2px solid var(--primary); }
.dg-itembody { flex: 1; min-width: 0; }
.dg-itemlabel { font-size: 13.5px; color: var(--text); line-height: 1.7; }
.dg-star { font-style: normal; color: var(--red); margin-right: 2px; }
.dg-ctl { display: flex; align-items: center; gap: 8px; margin-top: 3px; padding: 8px 10px; background: #f5f6f8; border-radius: 8px; min-height: 38px; }
.dg-ctl span { flex: 1; font-size: 13px; color: #a0a7b3; }
.dg-ctl-lines { min-height: 64px; align-items: flex-start; }
.dg-chev, .dg-ic { font-style: normal; color: #a0a7b3; font-size: 13px; }
.dg-notetxt { font-size: 12.5px; color: var(--text-3); margin-top: 4px; line-height: 1.8; background: #fafbfd; border-radius: 8px; padding: 8px 10px; }
.dg-itemtools { display: flex; gap: 2px; opacity: 0; transition: .15s; }
.dg-item:hover .dg-itemtools, .dg-item.sel .dg-itemtools { opacity: 1; }
.dg-tool { padding: 2px 5px; border-radius: 6px; color: var(--text-3); font-size: 12.5px; }
.dg-tool:hover { background: var(--primary-weak); color: var(--primary); }
.dg-addhint { display: block; width: 100%; margin-top: 10px; padding: 11px; border: 1px dashed #cdd4de; border-radius: 10px; color: var(--text-3); font-size: 12.5px; }
.dg-addhint:hover { border-color: var(--primary); color: var(--primary); background: #f7faff; }
.dg-insp { background: #fff; border-left: 1px solid var(--line); overflow: auto; }
.dg-insp-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.dg-insp-body { padding: 14px 16px 30px; }
.dg-insp-body .dg-lb { display: block; width: auto; padding: 0; font-size: 12.5px; color: var(--text-3); margin: 12px 0 5px; font-weight: 400; }
.dg-insp-body input, .dg-insp-body textarea, .dg-insp-body select { width: 100%; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 8px; outline: none; background: #fff; font-size: 13px; }
.dg-insp-body input:focus, .dg-insp-body textarea:focus { border-color: var(--primary); }
.dg-radios { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.dg-radios label { display: flex; align-items: center; gap: 6px; }
.dg-radios label.off { color: var(--text-3); opacity: .7; }
.dg-checkline { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; }
.dg-insp-empty { padding: 30px 18px; color: var(--text-3); font-size: 12.5px; line-height: 1.8; }
.dg-flowpane { padding: 18px 22px 40px; }
.dg-flowbar { max-width: 980px; margin: 0 auto 12px; }
.dg-flowbar b { font-size: 13.5px; }
.dg-flowbar span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.dg-flow { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; }
.dg-line { position: relative; height: 20px; width: 2px; background: #e3e8f0; margin: 0 auto; }
.dg-line:after {
  content: "+"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 18px; height: 18px; border-radius: 50%; background: #fff; color: #b9c2cf;
  border: 1px solid #e3e8f0; font-size: 13px; line-height: 16px; text-align: center;
}
.dg-node-start, .dg-node-end { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.08); border: 1px solid #e6ebf3; }
.dg-event-h { background: #2b3b64; color: #fff; font-size: 12.5px; font-weight: 600; padding: 7px 13px; }
.dg-node-end .dg-event-h { background: #8a94a6; }
.dg-event-b { display: flex; flex-direction: column; gap: 2px; padding: 9px 13px; }
.dg-event-b b { font-size: 13px; color: #263043; }
.dg-event-b span { font-size: 11.5px; color: #98a2b3; }
.dg-node { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.08); border: 1px solid #e6ebf3; }
.dg-node-t { display: flex; align-items: center; justify-content: space-between; padding: 7px 12px; background: #f39b1e; color: #fff; }
.dg-node-kind { font-size: 12.5px; font-weight: 600; color: #fff; }
.dg-node-t .dg-tool { color: rgba(255,255,255,.85); background: transparent; border: 0; font-size: 11.5px; cursor: pointer; }
.dg-node-t .dg-tool:hover { color: #fff; background: rgba(255,255,255,.14); }
.dg-node-r { display: flex; align-items: center; gap: 10px; padding: 7px 13px; flex-wrap: wrap; border-top: 1px solid #f1f3f7; }
.dg-node-r:first-of-type { border-top: 0; }
.dg-node-r > label { width: 74px; flex: 0 0 74px; font-size: 12.5px; color: #697386; }
.dg-node-r select, .dg-node-r input { flex: 1; min-width: 120px; padding: 7px 9px; border: 1px solid #dcdfe6; border-radius: 6px; outline: none; background: #fff; font-size: 13px; }
.dg-cond { display: flex; gap: 6px; flex: 1; flex-wrap: wrap; }
.dg-cond select { flex: 1 1 120px; }
.dg-cond input { flex: 0 1 90px; min-width: 70px; }
.dg-permbtn { flex: none; }
.dg-perm-sum { font-size: 11.5px; color: #8892a3; }
.dg-perm-wrap { display: grid; gap: 12px; }
.dg-perm-tip { padding: 9px 11px; border-radius: 8px; background: #f6f9fe; color: #5f6b7a; font-size: 12px; line-height: 1.7; }
.dg-perm-table { border: 1px solid #e4e9f1; border-radius: 9px; overflow: auto; max-height: 54vh; background: #fff; }
.dg-perm-head, .dg-perm-row { display: grid; grid-template-columns: minmax(150px, 1fr) 76px 76px 76px; align-items: center; gap: 6px; padding: 9px 12px; }
.dg-perm-head { position: sticky; top: 0; z-index: 1; background: #f7f9fc; color: #687385; font-size: 12px; font-weight: 600; border-bottom: 1px solid #e9edf4; }
.dg-perm-head span:not(:first-child) { text-align: center; }
.dg-perm-row { border-bottom: 1px solid #f0f3f7; min-height: 48px; }
.dg-perm-row:last-child { border-bottom: 0; }
.dg-perm-name b { display: block; font-size: 13px; color: #263244; font-weight: 500; }
.dg-perm-name em { display: block; margin-top: 2px; font-style: normal; font-size: 11px; color: #9aa4b2; }
.dg-perm-opt { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: #5f6b7a; cursor: pointer; }
.dg-perm-opt input { width: auto; margin: 0; }
.dg-perm-empty { padding: 24px; text-align: center; color: #9aa4b2; font-size: 12px; }
.dg-addnode { padding: 9px; border: 1px dashed #cdd4de; border-radius: 6px; color: #2f6fed; font-size: 12.5px; background: #fff; }
.dg-addnode:hover { border-color: #2f6fed; background: #f7faff; }
.dg-flowadd { display: flex; gap: 8px; }
.dg-flowadd .dg-addnode { flex: 1; }
.dg-addbranch { color: #0f8a5f; border-color: #b7e3d0; }
.dg-addbranch:hover { border-color: #0f8a5f; background: #f3fbf7; }

/* 条件分支 */
.dg-branchnode { border: 1px dashed #9bc5f5; border-radius: 8px; background: #f7faff; padding: 10px; }
.dg-branch-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 0 2px 8px; }
.dg-branch-head b { display: block; font-size: 13px; color: #1b4f87; }
.dg-branch-head span { display: block; margin-top: 2px; font-size: 11.5px; color: #6b7c93; }
.dg-branch-head .dg-tool, .dg-branch-ops .dg-tool {
  border: 0; background: transparent; color: #708096; cursor: pointer; font-size: 12px; padding: 2px 5px; border-radius: 4px;
}
.dg-branch-head .dg-tool:hover, .dg-branch-ops .dg-tool:hover { color: #1b4f87; background: #e8f2ff; }
.dg-branchcols { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; padding-bottom: 3px; }
.dg-branchcol {
  flex: 1 0 226px; max-width: 340px; min-width: 0; background: #fff; border: 1px solid #dbe6f3; border-radius: 7px;
  box-shadow: 0 1px 3px rgba(16,24,40,.05); padding: 8px;
}
.dg-branchcol.is-default { border-color: #d7dee8; background: #fbfcfe; }
.dg-branch-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.dg-branch-title { display: flex; align-items: center; gap: 5px; min-width: 0; }
.dg-branch-tag { display: inline-block; padding: 2px 6px; border-radius: 4px; background: #e8f6ef; color: #0f8a5f; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.dg-branch-tag.def { background: #eef1f5; color: #697386; }
.dg-branch-pri { color: #8a95a6; font-size: 10.5px; white-space: nowrap; }
.dg-branch-ops { display: flex; align-items: center; gap: 1px; }
.dg-branch-default { padding: 8px; border-radius: 5px; background: #f2f4f7; color: #7a8598; font-size: 12px; text-align: center; }
.dg-bconds { margin-bottom: 7px; }
.dg-bcond-head { display: flex; align-items: center; gap: 4px; margin-bottom: 5px; font-size: 11.5px; color: #697386; }
.dg-bcond-head select { flex: 1; min-width: 0; height: 25px; padding: 0 4px; border: 1px solid #dcdfe6; border-radius: 4px; background: #fff; font-size: 11.5px; }
.dg-bcond-add { border: 0; background: transparent; color: #2f6fed; font-size: 11px; cursor: pointer; white-space: nowrap; padding: 2px; }
.dg-bcond-row { display: grid; grid-template-columns: minmax(0,1.15fr) 62px minmax(0,.9fr) 16px; gap: 3px; margin-bottom: 4px; align-items: center; }
.dg-bcond-row select, .dg-bcond-row input {
  width: 100%; min-width: 0; height: 27px; padding: 0 5px; border: 1px solid #dcdfe6; border-radius: 4px; background: #fff; font-size: 11.5px; font-family: inherit; outline: none;
}
.dg-bcond-row select:focus, .dg-bcond-row input:focus { border-color: #2f6fed; }
.dg-bcond-del { border: 0; background: transparent; color: #b2bccb; font-size: 12px; cursor: pointer; padding: 0; }
.dg-bcond-del:hover { color: #d9534f; }
.dg-branchsteps { padding-top: 2px; }
.dg-branchsteps .dg-line { height: 13px; }
.dg-branchsteps .dg-node { box-shadow: none; }
.dg-node-sub .dg-node-t { padding: 6px 8px; }
.dg-node-sub .dg-node-kind { font-size: 11.5px; }
.dg-node-sub .dg-node-r { padding: 5px 8px; gap: 5px; }
.dg-node-sub .dg-node-r > label { width: 54px; flex-basis: 54px; font-size: 11.5px; }
.dg-node-sub .dg-node-r select, .dg-node-sub .dg-node-r input { min-width: 72px; padding: 5px 6px; font-size: 12px; }
.dg-node-sub .dg-cond input { flex-basis: 60px; min-width: 48px; }
.dg-branch-empty { padding: 10px 6px; border: 1px dashed #e3e8f0; border-radius: 5px; color: #9aa4b2; font-size: 11.5px; text-align: center; }
.dg-branch-add { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.dg-branch-add button { flex: 1; min-width: 82px; padding: 6px 4px; border: 1px dashed #cdd4de; border-radius: 5px; background: #fff; color: #2f6fed; font-size: 11.5px; cursor: pointer; }
.dg-branch-add button:hover { border-color: #2f6fed; background: #f7faff; }
.dg-branch-add button[data-addchildbranch] { color: #0f8a5f; border-color: #b7e3d0; }
.dg-branch-add button[data-addchildbranch]:hover { border-color: #0f8a5f; background: #f3fbf7; }
.dg-pv { max-width: 520px; margin: 0 auto; }
.dg-pvhero { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dg-pvhero b { font-size: 15px; }
.dg-pvhero span { font-size: 12.5px; color: var(--text-3); }
.dg-pvcard { padding: 10px 0; }
.dg-pvrow { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.dg-pvlabel { font-size: 13px; color: var(--text-2); }
.dg-pvchain { margin-top: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.9; }
.mobile-only, .dg-pvrow .dg-ctl { pointer-events: none; }

@media (max-width: 980px) {
  .dg-formwrap { grid-template-columns: 1fr; }
  .dg-palette { border-right: none; border-bottom: 1px solid var(--line); max-height: 240px; }
  .dg-insp { border-left: none; border-top: 1px solid var(--line); }
  .dg-pane { padding: 14px; }
  .dg-top { gap: 10px; padding: 8px 12px; }
  .dg-tabs { margin: 0; overflow: auto; width: 100%; order: 3; }
  .dg-topright { order: 2; margin-left: auto; }
  .dg-lb { width: 78px; flex-basis: 78px; }
  .dg-node-r > label { width: 64px; flex-basis: 64px; }
  .dg-flow, .dg-flowbar { max-width: 100%; }
  .dg-branchcol { flex-basis: 210px; }
  .dg-bcond-row { grid-template-columns: minmax(0,1fr) 58px minmax(0,.8fr) 14px; }
  .fl-row { flex-wrap: wrap; }
  .fl-upd { display: none; }
  .fl-op { padding: 6px 2px; }
}

/* 弹窗需高于全屏设计器，避免预览被遮挡 */
.modal-mask { z-index: 1300; }

/* ================= 日志管理（日志中心） ================= */
.lg-toolbar { padding: 14px 16px; }
.lg-filters { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.lg-field { display: flex; flex-direction: column; gap: 5px; }
.lg-field label { font-size: 12px; color: var(--text-3); }
.lg-field select, .lg-field input {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-size: 13px; color: var(--text); font-family: inherit;
}
.lg-field select { min-width: 120px; }
.lg-field.grow { flex: 1; min-width: 200px; }
.lg-field.grow input { width: 100%; }
.lg-dates { display: flex; align-items: center; gap: 6px; }
.lg-dates input { padding: 0 6px; }
.lg-sep { color: var(--text-3); }
.lg-actions { display: flex; gap: 8px; margin-left: auto; }

.lg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.lg-head .card-title { margin: 0; }
.lg-retention {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-3);
}
.lg-retention select, .lg-size select {
  height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; font-size: 12px; color: var(--text);
}
.lg-table td { font-size: 12.5px; }
.lg-ts { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lg-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 12px; line-height: 18px; white-space: nowrap;
}
.lg-badge.info { background: #eef4ff; color: #1b6cf0; }
.lg-badge.warn { background: #fff4e5; color: #c26a00; }
.lg-badge.error { background: #ffecec; color: #d43b3b; }
.lg-mod { color: var(--text-2); white-space: nowrap; }
.lg-act { font-weight: 600; white-space: nowrap; }
.lg-detail {
  color: var(--text-2); max-width: 520px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.lg-ip { color: var(--text-3); font-family: ui-monospace, Consolas, monospace; }
.lg-row:hover td { background: #f7f9fc; }
.lg-pager {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  font-size: 12px; color: var(--text-3);
}
.lg-pager .spacer { flex: 1; }

@media (max-width: 560px) {
  .lg-filters { flex-direction: column; align-items: stretch; }
  .lg-actions { margin-left: 0; flex-wrap: wrap; }
  .lg-head { flex-wrap: wrap; }
  .lg-retention { margin-left: 0; }
  .lg-detail { max-width: 160px; }
}

/* ------------------------------------------------------------------ 工作汇报（日志） */
.ipt {
  width: 100%; padding: 8px 10px; border: 1px solid #e2e6ec; border-radius: 8px;
  background: #f7f8fa; outline: none; transition: all .15s;
}
.ipt:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(22,119,255,.12); }
.rp-layout { display: flex; gap: 14px; align-items: flex-start; }
.rp-side {
  width: 232px; flex: none; background: #fff; border-radius: var(--radius); padding: 12px 8px;
  box-shadow: var(--shadow); max-height: calc(100vh - 160px); overflow: auto;
}
.rp-side-title {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px 8px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.rp-nav {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px;
  border-radius: 8px; color: var(--text-2); text-align: left; font-size: 13px;
  background: none; border: none; cursor: pointer;
}
.rp-nav:hover { background: #f5f7fa; }
.rp-nav.active { background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.rp-nav.rp-sub { padding-left: 24px; font-size: 12.5px; }
.rp-ico { width: 16px; text-align: center; color: var(--text-3); }
.rp-nav.active .rp-ico { color: var(--primary); }
.rp-dot { width: 6px; height: 6px; border-radius: 50%; background: #ccd3dd; flex: none; }
.rp-tpl-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-count {
  margin-left: auto; background: #ffece8; color: #e5484d; border-radius: 9px;
  font-size: 11px; padding: 0 6px; line-height: 16px; flex: none;
}
.rp-divider { height: 1px; background: var(--line); margin: 8px 4px; }
.rp-main {
  flex: 1; min-width: 0; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 18px; min-height: 460px;
}
.rp-empty { padding: 52px 12px; text-align: center; color: var(--text-3); line-height: 2; font-size: 13px; }
.rp-empty.err { color: var(--red); }
.rp-tip { color: var(--text-3); font-size: 12px; }
.rp-list-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.rp-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); margin-left: auto; }
.rp-date { font-size: 12px; color: var(--text-3); margin: 14px 2px 4px; font-weight: 500; }
.rp-row { display: flex; align-items: center; gap: 12px; padding: 11px 8px; border-radius: 8px; cursor: pointer; }
.rp-row:hover { background: #f7f9fc; }
.rp-avatar .avatar { width: 34px; height: 34px; border-radius: 8px; font-size: 12px; }
.rp-info { flex: 1; min-width: 0; }
.rp-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-sub { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.rp-badge {
  font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 4px;
  background: #f2f3f5; color: var(--text-3); border: 1px solid transparent;
}
.rp-badge.unread { background: #e8f1ff; color: var(--primary); border-color: #b9d4ff; }
.rp-badge.read { background: #f2f3f5; color: var(--text-3); }
.rp-badge.off { background: #fff1f0; color: var(--red); }
.rp-tag {
  font-size: 11px; font-weight: 400; background: #f4f6fa; color: #6b7785;
  border-radius: 4px; padding: 0 6px; line-height: 18px;
}
.rp-tag.gray { background: #f7f7f7; color: #9aa4b0; }
.rp-time { font-size: 11px; color: var(--text-3); }
.rp-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-pick-card {
  text-align: left; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  background: #fff; transition: all .15s; cursor: pointer;
}
.rp-pick-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(22,119,255,.12); }
.rp-pick-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rp-pick-desc { font-size: 12px; color: var(--text-2); min-height: 34px; }
.rp-pick-meta { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }
.rp-form-tip { background: #f7f9fc; border-radius: 8px; padding: 9px 12px; color: var(--text-3); font-size: 12px; margin-bottom: 12px; line-height: 1.8; }
.rp-field { margin-bottom: 13px; }
.rp-field.full { grid-column: 1 / -1; }
.rp-field-list { max-height: 52vh; overflow: auto; padding-right: 4px; }
.rp-label { font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.rp-label em { color: var(--red); font-style: normal; margin-right: 3px; }
.rp-ipt { width: 100%; resize: vertical; }
.rp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.rp-frows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 9px; }
.rp-frow {
  display: grid; grid-template-columns: 1.1fr 110px 70px 1.2fr auto; gap: 8px; align-items: center;
  background: #f9fafc; border: 1px solid var(--line); border-radius: 8px; padding: 8px;
}
.rp-frow .ipt { padding: 6px 9px; background: #fff; }
.rp-fops { display: flex; gap: 4px; }
.rp-toolbar { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.rp-toolbar .spacer { flex: 1; }
.rp-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.rp-filters .ipt { width: auto; min-width: 130px; padding: 6px 9px; }
.rp-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rp-stat {
  flex: 1; min-width: 96px; background: #f7f9fc; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column;
}
.rp-stat b { font-size: 19px; color: var(--primary); line-height: 1.3; }
.rp-stat span { font-size: 12px; color: var(--text-3); }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-table th {
  text-align: left; font-weight: 500; color: var(--text-2); font-size: 12.5px;
  padding: 9px 10px; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.rp-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rp-clickable { cursor: pointer; }
.rp-clickable:hover td { background: #f7f9fc; }
.rp-ops { white-space: nowrap; }
.rp-ops .btn { margin-right: 4px; }
.rp-pager { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.rp-pager .rp-tip { margin-right: auto; }
.rp-detail-meta {
  display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-3);
  padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.rp-detail-meta b { color: var(--text); }
.rp-detail-fields { max-height: 48vh; overflow: auto; }
.rp-df { margin-bottom: 12px; }
.rp-df-label { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
.rp-df-value { font-size: 13.5px; color: var(--text); background: #f9fafc; border-radius: 8px; padding: 10px 12px; line-height: 1.75; }
.rp-detail-foot { border-top: 1px solid var(--line); padding-top: 10px; font-size: 12px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rp-person { background: #f2f3f5; border-radius: 4px; padding: 1px 7px; }
.rp-person.on { background: #e9f8f0; color: #00a35f; }

@media (max-width: 900px) {
  .rp-layout { flex-direction: column; }
  .rp-side { width: 100%; max-height: none; }
  .rp-main { width: 100%; padding: 12px; }
  .rp-picker, .rp-form-grid { grid-template-columns: 1fr; }
  .rp-frow { grid-template-columns: 1fr 1fr; }
  .rp-frow .rp-fops { grid-column: 1 / -1; justify-content: flex-end; }
  .rp-table { font-size: 12px; }
  .rp-toolbar { flex-wrap: wrap; }
}
/* 汇报表格：窄屏横向滚动 */
.rp-table-wrap { overflow-x: auto; }
.rp-table { min-width: 680px; }

.rp-table th, .rp-table td { white-space: nowrap; }
.rp-desc { white-space: normal; max-width: 240px; }

/* ---------------- 表单设计器：数据权限 / 上传控件 ---------------- */
.dg-upload {
  display: flex; align-items: center; gap: 8px; border: 1px dashed #cfd8e6; border-radius: 8px;
  padding: 12px; color: #8a93a6; font-size: 12.5px; background: #fafbfe;
}
.dg-accrow {
  display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #eef1f6;
}
.dg-accrow:last-child { border-bottom: none; }
.dg-acclabel { width: 150px; flex: 0 0 150px; font-size: 13px; color: #3b4559; padding-top: 4px; }
.dg-acclabel em { display: block; font-style: normal; font-size: 11.5px; color: #9aa4b6; margin-top: 2px; }
.dg-accchips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.dg-accchip {
  display: inline-flex; align-items: center; gap: 5px; background: #eef4ff; color: #2f5fc4;
  border: 1px solid #dbe6ff; border-radius: 14px; padding: 2px 8px 2px 10px; font-size: 12px;
}
.dg-accchip i { cursor: pointer; font-style: normal; color: #7b8aa6; font-size: 11px; }
.dg-accchip i:hover { color: #d84a4a; }
.dg-accempty { color: #a6b0c2; font-size: 12px; }
.dg-accbtn { flex: 0 0 auto; border: 1px solid #d8e0ee; background: #fff; color: #2f6fed; border-radius: 7px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.dg-accbtn:hover { background: #f2f6ff; }
.dg-accpick input[type="text"], .dg-accpick > input { width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 8px; margin-bottom: 8px; }
.dg-accpick-list { max-height: 46vh; overflow: auto; }
.dg-accpick-row { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 8px; cursor: pointer; }
.dg-accpick-row:hover { background: #f6f9ff; }
.dg-accpick-av {
  width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  color: #fff; font-size: 11px; flex: 0 0 26px;
}
.dg-accpick-main { display: flex; flex-direction: column; gap: 1px; }
.dg-accpick-main b { font-size: 13px; font-weight: 600; color: #263043; }
.dg-accpick-main em { font-style: normal; font-size: 11.5px; color: #97a1b3; }

/* 发起表单：图片 / 附件上传 */
.ap-filehint { font-style: normal; font-weight: 400; font-size: 11.5px; color: #9aa4b6; margin-left: 6px; }
.ap-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px; }
.ap-img { position: relative; display: inline-block; width: 82px; height: 82px; border-radius: 8px; overflow: hidden; border: 1px solid #e3e8f0; background: #f7f9fc; }
.ap-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-img i {
  position: absolute; right: 3px; top: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; font-style: normal; font-size: 11px; line-height: 17px; text-align: center; cursor: pointer;
}
.ap-files { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 8px; }
.ap-file { display: flex; align-items: center; gap: 8px; background: #f7f9fc; border: 1px solid #e6ebf3; border-radius: 8px; padding: 7px 10px; font-size: 12.5px; }
.ap-file a { color: #2f5fc4; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-file-size { color: #9aa4b6; font-size: 11.5px; }
.ap-file i { margin-left: auto; font-style: normal; color: #9aa4b6; cursor: pointer; }
.ap-file i:hover { color: #d84a4a; }
.ap-file-empty { color: #a6b0c2; font-size: 12px; }
.ap-upbtn { display: inline-flex; align-items: center; cursor: pointer; }
.ap-kv-imgs { display: flex; flex-wrap: wrap; gap: 7px; }
.ap-kv-img { width: 74px; height: 74px; object-fit: cover; border-radius: 7px; border: 1px solid #e3e8f0; display: block; }
.ap-kv-files { display: flex; flex-direction: column; gap: 4px; }
.ap-kv-files a { color: #2f5fc4; text-decoration: none; font-size: 12.5px; }

@media (max-width: 760px) {
  .dg-accrow { flex-wrap: wrap; }
  .dg-acclabel { width: 100%; flex: 1 0 100%; padding-top: 0; }
}

/* ---------------- 表单设计器：权限组（对齐钉钉权限管理样式） ---------------- */
.dg-permcard { padding: 0; overflow: hidden; }
.dg-permhead { padding: 16px 18px 10px; border-bottom: 1px solid #eef1f6; }
.dg-permhead .dg-sec { margin: 0 0 4px; }
.dg-permhead .dg-hint { margin: 0; line-height: 1.7; }
.dg-pg { margin: 10px 14px; background: #f8f9fb; border: 1px solid #edf0f5; border-radius: 10px; padding: 12px 14px 8px; }
.dg-pg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.dg-pg-head b { font-size: 13px; color: #2b3447; }
.dg-pg-del { border: 0; background: transparent; color: #9aa4b6; font-size: 12px; cursor: pointer; padding: 2px 4px; }
.dg-pg-del:hover { color: #d84a4a; }
.dg-pg-row { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; border-top: 1px dashed #e9edf3; }
.dg-pg-row:first-of-type { border-top: 0; }
.dg-pg-row > label { width: 96px; flex: 0 0 96px; color: #5b6578; font-size: 12.5px; padding-top: 5px; }
.dg-pg-ctl { flex: 1; min-width: 0; }
.dg-pg-members, .dg-pg-depts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 28px; }
.dg-pg-chip { display: inline-flex; align-items: center; gap: 5px; background: #fff; color: #2f5fc4; border: 1px solid #dbe6ff; border-radius: 13px; padding: 2px 8px 2px 10px; font-size: 12px; }
.dg-pg-chip i { cursor: pointer; font-style: normal; color: #8e99ab; font-size: 11px; }
.dg-pg-chip i:hover { color: #d84a4a; }
.dg-pg-add { border: 1px dashed #cfd8e6; background: #fff; color: #2f6fed; border-radius: 13px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.dg-pg-add:hover { border-color: #2f6fed; background: #f4f8ff; }
.dg-pg-scope { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 3px; }
.dg-pg-scope label, .dg-pg-ops label, .dg-outside label { display: inline-flex; align-items: center; gap: 5px; color: #4c566a; font-size: 12.5px; cursor: pointer; }
.dg-pg-scope input, .dg-pg-ops input, .dg-outside input { margin: 0; accent-color: #2f6fed; }
.dg-pg-depts { margin-top: 8px; }
.dg-pg-ops { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-top: 3px; }
.dg-pg-ops label:first-child { font-weight: 600; color: #2b3447; }
.dg-pg-new { display: block; width: calc(100% - 28px); margin: 12px 14px; border: 1px dashed #cfd8e6; background: #fff; color: #2f6fed; border-radius: 8px; padding: 9px; font-size: 12.5px; cursor: pointer; }
.dg-pg-new:hover { border-color: #2f6fed; background: #f5f9ff; }
.dg-pg-new em { font-style: normal; color: #9aa4b6; font-size: 11.5px; }
.dg-outside { border-top: 1px solid #eef1f6; padding: 12px 18px 14px; background: #fbfcfe; }
.dg-outside-title { margin: 0 0 8px; color: #2b3447; font-size: 12.5px; font-weight: 600; }
.dg-outside label { display: flex; margin-top: 6px; }
@media (max-width: 760px) {
  .dg-pg-row { flex-wrap: wrap; gap: 4px; }
  .dg-pg-row > label { width: 100%; flex: 1 0 100%; padding-top: 0; }
  .dg-pg-scope, .dg-pg-ops { gap: 7px 12px; }
}
/* 明细/表格 与 关联审批单 */
.dg-detailprev { border: 1px solid #e3e8f0; border-radius: 8px; overflow: hidden; background: #fbfcff; }
.dg-detailprev table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.dg-detailprev th, .dg-detailprev td { padding: 6px 8px; font-size: 11.5px; color: #7a8496; border-right: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-detailprev th { background: #f3f6fb; color: #5a6475; font-weight: 500; }
.dg-detailprev tr:last-child td { border-bottom: none; }
.dg-detailprev .dg-dp-x { width: 30px; text-align: center; color: #b8c0cf; border-right: none; }
.dg-detailadd { padding: 6px 8px; color: #2f6fed; font-size: 11.5px; background: #fff; }
.dg-cols { display: flex; flex-direction: column; gap: 7px; }
.dg-colrow { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 6px; border: 1px solid #e6eaf2; border-radius: 8px; background: #fbfcfe; }
.dg-col-label { flex: 1 1 100%; min-width: 0; height: 28px; padding: 0 8px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 12px; }
.dg-col-type { height: 28px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 12px; background: #fff; }
.dg-colreq { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #6b7487; }
.dg-colreq input { accent-color: #2f6fed; }
.dg-coldel { margin-left: auto; width: 24px; height: 24px; border: none; background: transparent; color: #b3bac7; cursor: pointer; }
.dg-coldel:hover { color: #d84a4a; }
.dg-colopts { flex: 1 1 100%; height: 28px; padding: 0 8px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 12px; }
.dg-coladd { width: 100%; margin-top: 7px; border: 1px dashed #cfd8e6; background: #fff; color: #2f6fed; border-radius: 7px; padding: 6px; font-size: 12px; cursor: pointer; }
.dg-coladd:hover { border-color: #2f6fed; background: #f5f9ff; }
.dg-insp-body select#dg-fi-reftpl, .dg-insp-body select#dg-fi-refstatus { width: 100%; height: 34px; border: 1px solid #dcdfe6; border-radius: 7px; padding: 0 8px; font-size: 12.5px; background: #fff; margin-bottom: 4px; }
.ap-detail { border: 1px solid #e3e8f0; border-radius: 9px; overflow: hidden; background: #fff; }
.ap-detail-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ap-detail-table th, .ap-detail-table td { padding: 7px 9px; border-right: 1px solid #edf0f5; border-bottom: 1px solid #edf0f5; text-align: left; vertical-align: middle; font-size: 12.5px; }
.ap-detail-table th { background: #f5f7fb; color: #4c566a; font-weight: 500; white-space: nowrap; }
.ap-detail-table th:last-child, .ap-detail-table td:last-child { border-right: none; }
.ap-detail-table tr:last-child td { border-bottom: none; }
.ap-detail-table td input, .ap-detail-table td select, .ap-detail-table td textarea { width: 100%; min-width: 0; border: 1px solid #dcdfe6; border-radius: 6px; padding: 5px 7px; font-size: 12.5px; background: #fff; box-sizing: border-box; }
.ap-detail-table td textarea { resize: vertical; }
.ap-detail-table .req { color: #d84a4a; font-style: normal; margin-right: 2px; }
.ap-detail .ap-dx { width: 34px; text-align: center; }
.ap-ddel { border: none; background: transparent; color: #b3bac7; cursor: pointer; font-size: 13px; }
.ap-ddel:hover { color: #d84a4a; }
.ap-detailfoot { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: #fbfcfe; border-top: 1px solid #edf0f5; }
.ap-detailcnt { color: #8a94a6; font-size: 12px; }
.ap-kv-wide { display: block !important; }
.ap-kv-wide .k { width: auto !important; flex-basis: auto !important; margin-bottom: 6px; }
.ap-kv-detail { width: 100%; border: 1px solid #e3e8f0; border-radius: 8px; overflow: auto; }
.ap-kv-detail .ap-detail-table th, .ap-kv-detail .ap-detail-table td { font-size: 12px; }
.ap-ref { display: inline-flex; align-items: center; gap: 4px; color: #2f6fed; background: #f2f7ff; border-radius: 13px; padding: 3px 10px; font-size: 12.5px; }

/* ------------------------------------------------------------------ 群设置 */
.chat-notice {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 16px;
  background: #fffbe6; border-bottom: 1px solid #ffe58f; color: #7c5c00;
  font-size: 12.5px; cursor: pointer; flex: 0 0 auto;
}
.chat-notice b { color: #a16a00; flex: 0 0 auto; }
.chat-notice span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gs-page { padding: 2px 2px 10px; }
.gs-hero {
  display: flex; align-items: center; gap: 14px; padding: 16px 16px 18px;
  background: linear-gradient(135deg, #f3f8ff, #fff 68%); border: 1px solid #e5edfb;
  border-radius: 14px; margin-bottom: 12px;
}
.gs-logo {
  width: 52px; height: 52px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 20px;
  background: linear-gradient(135deg, #1677ff, #53a8ff);
  box-shadow: 0 6px 16px rgba(22, 119, 255, .2);
}
.gs-hero-main { flex: 1; min-width: 0; }
.gs-hero-title { display: flex; align-items: center; gap: 8px; }
.gs-hero-title h2 { font-size: 18px; margin: 0; line-height: 1.3; }
.gs-name-input {
  border: 1px solid transparent; background: transparent; font-size: 18px; font-weight: 650;
  padding: 1px 6px; border-radius: 7px; width: min(300px, 100%); min-width: 120px;
}
.gs-name-input:hover, .gs-name-input:focus { border-color: #bad6ff; background: #fff; outline: none; }
.gs-meta { color: #86909c; font-size: 12.5px; margin-top: 4px; }
.gs-qr-btn { flex: 0 0 auto; }
.gs-card {
  background: #fff; border: 1px solid #e8edf5; border-radius: 12px;
  margin-bottom: 10px; overflow: hidden;
}
.gs-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid #f0f3f8; background: #fbfcfe;
}
.gs-card-head b { font-size: 13.5px; }
.gs-card-head span { color: #98a2b3; font-size: 12px; }
.gs-link { color: var(--primary); font-size: 12.5px; padding: 2px 4px; border-radius: 5px; }
.gs-link:hover { background: #eef5ff; }
.gs-link.danger { color: #d84a4a; margin-left: auto; }
.gs-note { padding: 9px 14px 2px; color: #86909c; font-size: 12px; }
.gs-note .gs-link { font-size: 12px; }
.gs-empty { padding: 14px; color: #98a2b3; font-size: 12.5px; }
.gs-admin-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid #f5f7fb; }
.gs-admin-row:first-of-type { border-top: none; }
.gs-admin-main { flex: 1; min-width: 0; }
.gs-admin-main b { display: block; font-size: 13px; }
.gs-admin-main span { display: block; color: #98a2b3; font-size: 11.5px; }
.gs-members { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 8px; padding: 14px; }
.gs-member { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.gs-member .avatar { width: 42px; height: 42px; border-radius: 9px; font-size: 13px; }
.gs-member b { font-size: 12px; font-weight: 500; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-member span { color: #98a2b3; font-size: 10.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-role { position: absolute; top: -3px; right: 2px; font-size: 9px; font-style: normal; color: #fff; background: #1677ff; border-radius: 7px; padding: 1px 4px; }
.gs-role.owner { background: #ff8f1f; }
.gs-member-add { border: 1px dashed #d6dfec; border-radius: 10px; min-height: 72px; justify-content: center; color: #86909c; background: #fafcff; }
.gs-member-add i { font-style: normal; font-size: 22px; line-height: 1; color: #1677ff; }
.gs-member-add b { color: #4e5969; }
.gs-member-add:hover { border-color: #9cc7ff; background: #f3f8ff; }
.gs-member-add.gs-member-remove i { color: #d84a4a; }
.gs-link-line {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; border-top: 1px solid #f0f3f8; color: #4e5969; font-size: 12.5px; text-align: left;
}
.gs-link-line:hover { background: #f8fbff; color: var(--primary); }
.gs-link-line span { color: #98a2b3; }
.gs-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-top: 1px solid #f2f4f8; }
.gs-row:first-child { border-top: none; }
.gs-row-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gs-row-main b { font-size: 13px; font-weight: 500; }
.gs-row-main em { color: #98a2b3; font-size: 11.5px; font-style: normal; line-height: 1.45; }
.gs-switch-row.is-disabled { opacity: .55; }
.gs-switch { position: relative; flex: 0 0 auto; width: 38px; height: 21px; display: inline-block; }
.gs-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.gs-switch i { position: absolute; inset: 0; background: #d7dee9; border-radius: 12px; transition: .2s; }
.gs-switch i::after { content: ''; position: absolute; width: 17px; height: 17px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: .2s; }
.gs-switch input:checked + i { background: #1677ff; }
.gs-switch input:checked + i::after { transform: translateX(17px); }
.gs-switch input:disabled + i { opacity: .5; }
.gs-select {
  border: 0; background: #f5f8fd; color: #4e5969; font-size: 12px;
  border-radius: 7px; padding: 5px 6px; flex: 0 0 auto; max-width: 48%;
}
.gs-select:disabled { color: #98a2b3; background: #f7f8fa; }
.gs-value { color: #86909c; font-size: 12px; flex: 0 0 auto; }
.gs-value.muted { color: #b3bac7; }
.gs-value.gs-green { color: #00a870; }
.gs-perm-list .gs-row { padding: 10px 14px; }
.gs-textarea {
  display: block; width: calc(100% - 28px); margin: 4px 14px 14px; min-height: 64px;
  border: 1px solid #e1e7f0; border-radius: 8px; padding: 8px 10px; resize: vertical;
  font-size: 12.5px; line-height: 1.55; background: #fbfcfe;
}
.gs-textarea:read-only { color: #6b778c; background: #f7f8fa; }
.gs-textarea:focus, .gs-input:focus { border-color: #9cc7ff; outline: none; background: #fff; }
.gs-input { border: 1px solid #e1e7f0; border-radius: 7px; padding: 6px 9px; font-size: 12.5px; width: 48%; background: #fbfcfe; text-align: right; }
.gs-apps { display: flex; gap: 12px; padding: 12px 14px 14px; border-top: 1px solid #f2f4f8; }
.gs-apps button { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 72px; color: #4e5969; font-size: 11.5px; }
.gs-apps i { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #eef5ff; color: #1677ff; font-style: normal; font-size: 19px; }
.gs-apps button:hover i { background: #dceaff; }
.gs-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 2px; }
.gs-danger { color: #d84a4a; background: #fff5f5; border: 1px solid #ffe0e0; border-radius: 8px; padding: 7px 12px; font-size: 12.5px; }
.gs-danger:hover { background: #ffecec; border-color: #ffc9c9; }
.gs-pick-list { max-height: 50vh; overflow: auto; }
.gs-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 4px; border-bottom: 1px solid #f2f4f8; text-align: left; }
.gs-pick-row:hover { background: #f8fbff; }
.gs-pick-row span { flex: 1; min-width: 0; }
.gs-pick-row b { display: block; font-size: 13px; }
.gs-pick-row em { display: block; color: #98a2b3; font-size: 11.5px; font-style: normal; }
.gs-pick-row i { font-style: normal; color: var(--primary); font-size: 12px; }
.gs-perm-help p { margin: 0 0 10px; color: #4e5969; font-size: 13px; line-height: 1.7; }
.gs-qr-wrap { display: flex; justify-content: center; padding: 10px 0; }
.gs-qr-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 20px; border: 1px solid #e5edfb; border-radius: 14px; background: #fbfdff; }
.gs-qr-grid { width: 210px; height: 210px; display: grid; grid-template-columns: repeat(21, 1fr); grid-template-rows: repeat(21, 1fr); gap: 0; padding: 8px; background: #fff; border: 1px solid #e6ecf5; }
.gs-qr-grid i { display: block; background: #fff; }
.gs-qr-grid i.on { background: #101828; }
.gs-qr-card b { font-size: 14px; }
.gs-qr-card span { color: #86909c; font-size: 12px; }
.gs-qr-card em { color: #b3bac7; font-size: 11px; font-style: normal; }
@media (max-width: 900px) {
  .gs-members { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gs-row { align-items: flex-start; }
  .gs-select { max-width: 54%; }
  .gs-hero { align-items: flex-start; }
  .gs-qr-btn { margin-left: auto; }
}

/* ------------------------------------------------------------------ 审批单中心 */
.ap-hub-top {
  flex: 0 0 auto; display: flex; align-items: center; gap: 18px;
  padding: 13px 24px; background: linear-gradient(120deg, #f3f7ff 0%, #fff 62%);
  border-bottom: 1px solid #e6edf8;
}
.ap-hub-brand { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.ap-hub-logo {
  width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1677ff, #5aa9ff); color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 4px 10px rgba(22,119,255,.18);
}
.ap-hub-brand b { display: block; font-size: 15px; line-height: 1.25; }
.ap-hub-brand em { display: block; font-style: normal; color: #98a2b3; font-size: 11px; margin-top: 1px; }
.ap-mode-nav { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ap-mode {
  position: relative; padding: 9px 18px; border-radius: 8px; color: #4e5969; font-size: 13.5px;
  transition: .15s; white-space: nowrap;
}
.ap-mode:hover { color: #0b57c2; background: rgba(22,119,255,.06); }
.ap-mode.active { color: #0b4fa8; font-weight: 650; background: #fff; box-shadow: 0 2px 8px rgba(20,50,100,.08); }
.ap-mode.active::after {
  content: ""; position: absolute; left: 18px; right: 18px; bottom: -14px; height: 2px; background: #1677ff;
}
.ap-mode-cnt { display: inline-flex; min-width: 17px; height: 17px; padding: 0 5px; margin-left: 5px; border-radius: 9px; align-items: center; justify-content: center; background: #f5222d; color: #fff; font-size: 10px; vertical-align: 1px; }
.ap-hub-right { min-width: 100px; text-align: right; color: #98a2b3; font-size: 12px; }
.ap-view { flex: 1; min-height: 0; overflow: hidden; background: #f7f9fc; }
.ap-catalog { height: 100%; overflow-y: auto; padding: 17px 24px 30px; }
.ap-search-row { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.ap-search {
  flex: 1; max-width: 540px; display: flex; align-items: center; gap: 8px; height: 40px;
  background: #fff; border: 1px solid #e3eaf4; border-radius: 10px; padding: 0 11px;
  box-shadow: 0 2px 9px rgba(20,50,100,.04); transition: .15s;
}
.ap-search:focus-within { border-color: #8fc0ff; box-shadow: 0 0 0 3px rgba(22,119,255,.09); }
.ap-search-ico { color: #8f9bab; font-size: 17px; line-height: 1; transform: rotate(-20deg); }
.ap-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: 13.5px; }
.ap-search-clear { color: #b3bac7; font-size: 12px; padding: 2px 4px; border-radius: 4px; }
.ap-search-clear:hover { color: #4e5969; background: #f2f5fa; }
.ap-quick { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.ap-quick-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; color: #4e5969; font-size: 12.5px; border-radius: 7px; white-space: nowrap; }
.ap-quick-item:hover { background: #eef5ff; color: var(--primary); }
.ap-quick-item b { color: #1f2329; font-size: 14px; font-weight: 600; }
.ap-quick-item span { color: #4e5969; }
.ap-quick-item i { color: #98a2b3; font-style: normal; }
.ap-catbar { display: flex; gap: 2px; overflow-x: auto; margin: 13px 0 15px; border-bottom: 1px solid #e5ebf4; }
.ap-catbar::-webkit-scrollbar { height: 0; }
.ap-cat {
  padding: 9px 13px 11px; color: #4e5969; font-size: 13px; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .15s;
}
.ap-cat:hover { color: var(--primary); }
.ap-cat.active { color: #0b57c2; font-weight: 600; border-bottom-color: #1677ff; }
.ap-tpl-section { background: #fff; border: 1px solid #e8edf5; border-radius: 12px; padding: 13px 15px 15px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(20,40,80,.035); }
.ap-tpl-head { display: flex; align-items: center; gap: 7px; color: #4e5969; margin-bottom: 11px; }
.ap-tpl-head b { font-size: 13px; font-weight: 550; }
.ap-tpl-head span { color: #a0a8b6; font-size: 11px; }
.ap-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 10px; }
.ap-tpl-card {
  display: flex; align-items: center; gap: 11px; min-width: 0; padding: 11px 12px;
  border: 1px solid #e8edf5; border-radius: 10px; background: #fff; text-align: left;
  transition: .15s;
}
.ap-tpl-card:hover { border-color: #b7d6ff; background: #fbfdff; box-shadow: 0 7px 18px rgba(20,80,180,.09); transform: translateY(-1px); }
.ap-tpl-ico {
  width: 37px; height: 37px; flex: 0 0 auto; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: #eef5ff; font-size: 20px;
}
.ap-tpl-main { flex: 1; min-width: 0; }
.ap-tpl-main b { display: block; font-size: 13px; font-weight: 550; color: #1f2329; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-tpl-main em { display: block; color: #98a2b3; font-size: 11px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.ap-tpl-arrow { color: #b3bac7; font-size: 14px; flex: 0 0 auto; }
.ap-empty { color: #98a2b3; font-size: 13px; text-align: center; padding: 46px 10px; }
.ap-empty.err { color: #d84a4a; }
.ap-list-view { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.ap-list-top { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 24px 0; background: #fff; }
.ap-back { color: #4e5969; font-size: 12.5px; padding: 5px 8px; border-radius: 7px; }
.ap-back:hover { background: #f2f5fa; color: var(--primary); }
.ap-list-title { font-size: 14px; font-weight: 600; color: #1f2329; }
@media (max-width: 900px) {
  .ap-catalog { padding: 14px 14px 24px; }
  .ap-search-row { flex-direction: column; align-items: stretch; gap: 9px; }
  .ap-search { max-width: none; }
  .ap-quick { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .ap-list-top { padding: 10px 14px 0; }
}
@media (max-width: 640px) {
  .ap-hub-top { flex-wrap: wrap; gap: 8px 12px; padding: 11px 16px; }
  .ap-hub-brand { min-width: 0; }
  .ap-hub-right { display: none; }
  .ap-mode-nav { flex: 1 1 100%; justify-content: flex-start; overflow-x: auto; }
  .ap-mode.active::after { bottom: -4px; }
}
@media (max-width: 520px) {
  .ap-tpl-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ 文档中心 */
.dc-page { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #f5f7fb; }
.dc-head {
  flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  padding: 18px 24px 15px; background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border-bottom: 1px solid var(--line);
}
.dc-head-main { flex: 1; min-width: 0; }
.dc-title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dc-title-row h2 { margin: 0; font-size: 19px; letter-spacing: .3px; color: #1f2329; }
.dc-sub { font-size: 12px; color: #98a2b3; }
.dc-search {
  display: flex; align-items: center; gap: 8px; max-width: 460px; height: 36px; padding: 0 12px;
  border: 1px solid #e2e7ef; border-radius: 9px; background: #fff;
}
.dc-search span { color: #98a2b3; font-size: 16px; line-height: 1; }
.dc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: #1f2329; }
.dc-search input::placeholder { color: #a8b0bd; }
.dc-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,119,255,.1); }
.dc-head-actions { display: flex; gap: 9px; flex: 0 0 auto; }
.dc-head-actions .btn { background: #fff; border: 1px solid #e1e6ef; }
.dc-head-actions .btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }

.dc-body { flex: 1; min-height: 0; display: flex; }
.dc-side {
  width: 172px; flex: 0 0 172px; padding: 12px 10px 18px; background: #fff;
  border-right: 1px solid var(--line); overflow-y: auto;
}
.dc-side-item {
  width: 100%; height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 10px; border-radius: 8px; color: #4e5969; font-size: 13px; text-align: left; transition: .15s;
}
.dc-side-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-side-item em { font-style: normal; font-size: 11px; color: #98a2b3; background: #f2f4f8; border-radius: 10px; padding: 0 7px; line-height: 18px; }
.dc-side-item:hover { background: #f4f7fb; color: #1f2329; }
.dc-side-item.active { background: var(--primary-weak); color: var(--primary); font-weight: 550; }
.dc-side-item.active em { background: #fff; color: var(--primary); }
.dc-side-title { margin: 17px 10px 7px; font-size: 11.5px; letter-spacing: .4px; color: #98a2b3; }
.dc-tree { display: flex; flex-direction: column; gap: 2px; }
.dc-tree-row {
  width: 100%; min-height: 31px; display: flex; align-items: center; gap: 6px; border-radius: 7px;
  color: #4e5969; font-size: 12.5px; text-align: left; overflow: hidden; transition: .15s;
}
.dc-tree-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-tree-row:hover { background: #f4f7fb; color: #1f2329; }
.dc-tree-row.active { background: #f0f6ff; color: var(--primary); }
.dc-tree-ic { color: #b1bac7; font-size: 11px; flex: 0 0 auto; }
.dc-tree-empty { color: #a8b0bd; font-size: 12px; padding: 10px 12px; }
.dc-root-row { margin-bottom: 2px; padding-left: 10px; }
.dc-root-row.active { background: #f0f6ff; color: var(--primary); }

.dc-main { flex: 1; min-width: 0; overflow-y: auto; padding: 14px 20px 30px; }
.dc-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; min-height: 26px; }
.dc-crumb { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: #98a2b3; font-size: 12.5px; }
.dc-crumb-link { color: #4e5969; padding: 2px 4px; border-radius: 5px; }
.dc-crumb-link:hover { color: var(--primary); background: #f0f6ff; }
.dc-crumb-sep { color: #c6ccd6; }
.dc-crumb-now { color: #1f2329; font-weight: 550; }
.dc-count { color: #98a2b3; font-size: 12px; white-space: nowrap; }
.dc-grid { min-height: 200px; }
.dc-grid-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 11px; }
.dc-section-title { font-size: 12px; color: #98a2b3; letter-spacing: .3px; margin: 4px 2px 8px; }
.dc-section-title:not(:first-child) { margin-top: 18px; }
.dc-card {
  position: relative; display: flex; align-items: flex-start; gap: 11px; min-height: 88px; padding: 14px 38px 13px 13px;
  background: #fff; border: 1px solid #e8ecf2; border-radius: 11px; cursor: pointer; transition: .16s;
  box-shadow: 0 1px 2px rgba(20, 40, 80, .02);
}
.dc-card:hover { border-color: #c8d9f6; box-shadow: 0 4px 14px rgba(20, 60, 120, .08); transform: translateY(-1px); }
.dc-card-icon {
  width: 38px; height: 44px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 8px;
  background: #eef5ff; color: var(--primary); font-size: 19px;
}
.dc-card-icon.folder { background: #fff4e6; color: #e69023; }
.dc-card-main { flex: 1; min-width: 0; }
.dc-card-name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.dc-card-name b { font-size: 13.5px; font-weight: 600; color: #1f2329; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-role { flex: 0 0 auto; font-size: 10.5px; line-height: 18px; padding: 0 6px; border-radius: 4px; }
.dc-role.manage { color: #0e9c96; background: #e6fbfa; }
.dc-role.edit { color: var(--primary); background: var(--primary-weak); }
.dc-role.download { color: #8a5b00; background: #fff4df; }
.dc-role.view { color: #7d8798; background: #f2f4f8; }
.dc-role.none { color: #a8b0bd; background: #f7f8fa; }
.dc-card-sum { margin-top: 5px; color: #7b8698; font-size: 12px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dc-card-meta { margin-top: 8px; color: #a4adba; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-kebab {
  position: absolute; right: 7px; top: 7px; width: 27px; height: 27px; border-radius: 7px;
  color: #98a2b3; font-size: 17px; line-height: 1; display: grid; place-items: center;
}
.dc-kebab:hover { background: #f2f4f8; color: #1f2329; }
.dc-empty { background: #fff; border: 1px dashed #dfe5ee; border-radius: 13px; padding: 46px 18px; text-align: center; color: #86909c; }
.dc-empty-ic { font-size: 30px; color: #c1cad7; margin-bottom: 8px; }
.dc-empty h3 { margin: 0 0 6px; font-size: 14px; color: #4e5969; }
.dc-empty p { margin: 0 0 16px; font-size: 12.5px; color: #98a2b3; }
.dc-loading { padding: 60px 15px; text-align: center; color: #98a2b3; font-size: 13px; }

.dc-field { margin-bottom: 14px; }
.dc-field label { display: block; font-size: 12.5px; color: #4e5969; margin-bottom: 6px; }
.dc-field input, .dc-field select {
  width: 100%; height: 38px; padding: 0 11px; border: 1px solid #dcdfe6; border-radius: 8px; outline: none; background: #fbfcfe;
}
.dc-field input:focus, .dc-field select:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(22,119,255,.12); }
.dc-tip { font-size: 12px; color: #98a2b3; line-height: 1.7; }

.dc-preview { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.dc-preview-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: #8a94a6; font-size: 11.5px; }
.dc-preview-kind { padding: 2px 7px; border-radius: 5px; background: #f2f6fd; color: var(--primary); font-weight: 600; }
.dc-preview-stage { border: 1px solid #e8ecf3; border-radius: 10px; overflow: hidden; background: #f8fafc; min-height: 420px; }
.dc-preview-frame { width: 100%; height: 58vh; min-height: 420px; border: 0; display: block; background: #fff; }
.dc-preview-loading, .dc-preview-error { min-height: 420px; display: grid; place-items: center; padding: 24px; text-align: center; color: #98a2b3; font-size: 13px; }
.dc-preview-error { color: #d93026; }
.dc-editor { display: flex; flex-direction: column; min-height: 0; }
.dc-editor-title { width: 100%; border: 0; outline: 0; padding: 2px 0 10px; font-size: 21px; font-weight: 650; color: #1f2329; background: transparent; }
.dc-editor-title::placeholder { color: #b4bcc8; }
.dc-toolbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 7px; border: 1px solid #e4e9f0; border-bottom: 0; border-radius: 9px 9px 0 0; background: #fafbff; }
.dc-toolbar button { height: 28px; min-width: 29px; padding: 0 7px; border-radius: 6px; color: #596579; font-size: 12.5px; }
.dc-toolbar button:hover { background: #eaf2ff; color: var(--primary); }
.dc-tool-sep { width: 1px; height: 16px; background: #e1e6ef; margin: 0 3px; }
.dc-editor-body {
  min-height: 300px; max-height: 48vh; overflow-y: auto; padding: 14px 16px; outline: 0; background: #fff;
  border: 1px solid #e4e9f0; border-radius: 0 0 9px 9px; font-size: 14px; line-height: 1.85; color: #202938;
}
.dc-editor-body:empty::before { content: attr(data-placeholder); color: #b4bcc8; pointer-events: none; }
.dc-editor-body h2 { font-size: 20px; margin: 10px 0 6px; }
.dc-editor-body h3 { font-size: 16px; margin: 8px 0 4px; }
.dc-editor-body blockquote { margin: 8px 0; padding: 4px 12px; border-left: 3px solid #cfe0ff; color: #65748a; background: #f8fbff; }
.dc-editor-body ul, .dc-editor-body ol { padding-left: 24px; margin: 6px 0; }
.dc-editor-status { padding: 7px 2px 0; color: #98a2b3; font-size: 11.5px; text-align: right; }
.dc-foot-hint { margin-right: auto; color: #98a2b3; font-size: 11.5px; align-self: center; }

.dc-perm-scope { display: flex; flex-direction: column; gap: 9px; margin-bottom: 13px; }
.dc-perm-scope label { display: flex; gap: 9px; align-items: flex-start; padding: 11px 12px; border: 1px solid #e5eaf1; border-radius: 9px; cursor: pointer; }
.dc-perm-scope label:has(input:checked) { border-color: #bcd6ff; background: #f7fbff; }
.dc-perm-scope input { margin-top: 5px; accent-color: var(--primary); }
.dc-perm-scope span { display: flex; flex-direction: column; gap: 2px; }
.dc-perm-scope b { font-size: 13px; font-weight: 550; color: #1f2329; }
.dc-perm-scope i { font-size: 11.5px; color: #98a2b3; font-style: normal; }
.dc-owner-line { margin: 2px 0 13px; padding: 8px 11px; border-radius: 8px; background: #f7f9fc; color: #718096; font-size: 12px; }
.dc-owner-line b { color: #1f2329; }
.dc-perm-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #4e5969; font-size: 12.5px; margin-bottom: 6px; }
.dc-perm-title em { font-style: normal; color: #98a2b3; font-size: 11px; }
.dc-perm-list { border: 1px solid #edf0f5; border-radius: 9px; max-height: 330px; overflow-y: auto; }
.dc-perm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-bottom: 1px solid #f0f2f6; }
.dc-perm-row:last-child { border-bottom: 0; }
.dc-perm-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dc-perm-user div { min-width: 0; display: flex; flex-direction: column; }
.dc-perm-user b { font-size: 12.5px; font-weight: 550; color: #1f2329; }
.dc-perm-user span { color: #98a2b3; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-perm-row select { width: 92px; height: 31px; padding: 0 5px; border: 1px solid #e0e5ee; border-radius: 7px; background: #fff; font-size: 12px; color: #4e5969; }

.dc-actions { display: flex; flex-direction: column; gap: 4px; }
.dc-actions button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 10px 11px; border-radius: 8px; text-align: left; }
.dc-actions button:hover { background: #f5f8fd; }
.dc-actions button span { color: #1f2329; font-size: 13px; font-weight: 550; }
.dc-actions button small { color: #98a2b3; font-size: 11.5px; }
.dc-actions button.danger span { color: var(--red); }

@media (max-width: 900px) {
  .dc-head { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px 16px 12px; }
  .dc-head-actions { justify-content: flex-end; }
  .dc-search { max-width: none; }
  .dc-side { width: 148px; flex-basis: 148px; padding: 10px 8px 16px; }
  .dc-main { padding: 11px 14px 24px; }
  .dc-grid-row { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
}
@media (max-width: 620px) {
  .dc-side { width: 122px; flex-basis: 122px; }
  .dc-side-item { padding: 0 7px; font-size: 12px; }
  .dc-side-item em { display: none; }
  .dc-main { padding: 9px 10px 20px; }
  .dc-grid-row { grid-template-columns: 1fr; }
  .dc-head-actions .btn { flex: 1; justify-content: center; }
  .dc-editor-body { min-height: 240px; max-height: 42vh; }
}
/* 文件管理器列表与操作菜单 */
.dc-top-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.dc-sort-wrap { display: flex; align-items: center; gap: 5px; color: #98a2b3; font-size: 11.5px; white-space: nowrap; }
.dc-sort-wrap select {
  height: 28px; max-width: 124px; padding: 0 6px; border: 1px solid #e2e7ef; border-radius: 6px;
  background: #fff; color: #4e5969; font-size: 11.5px; outline: 0;
}
.dc-sort-wrap select:focus { border-color: var(--primary); }
.dc-list { min-height: 220px; background: #fff; border: 1px solid #e8ecf2; border-radius: 10px; overflow: hidden; }
.dc-list-head, .dc-row {
  display: grid; grid-template-columns: minmax(0,1fr) 74px 92px 66px 30px;
  align-items: center; gap: 8px;
}
.dc-list-head {
  height: 34px; padding: 0 12px; background: #fafbfc; border-bottom: 1px solid #edf0f5;
  color: #8a94a6; font-size: 11.5px; position: sticky; top: 0; z-index: 2;
}
.dc-head-name { padding-left: 38px; }
.dc-head-more { width: 30px; }
.dc-row {
  height: 56px; padding: 0 12px; border-bottom: 1px solid #f2f4f8; cursor: pointer;
  transition: background .12s;
}
.dc-row:last-child { border-bottom: 0; }
.dc-row:hover { background: #f7faff; }
.dc-name-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.dc-ic {
  width: 29px; height: 33px; flex: 0 0 29px; display: grid; place-items: center;
  border-radius: 6px; font-size: 13px; font-weight: 650;
}
.dc-ic-folder { background: #fff4e6; color: #e69023; font-size: 15px; }
.dc-ic-doc { background: #eef5ff; color: #1677ff; font-size: 15px; }
.dc-ic-file { font-size: 9px; letter-spacing: .2px; }
.dc-ic-file.xls { background: #e8f8ef; color: #138a4b; }
.dc-ic-file.doc { background: #fff1f0; color: #d4380d; }
.dc-ic-file.ppt { background: #fff5e6; color: #d46b08; }
.dc-ic-file.zip { background: #f3f0ff; color: #7048c8; }
.dc-ic-file.img { background: #eef7ff; color: #1677ff; }
.dc-ic-file.other { background: #f2f4f8; color: #718096; }
.dc-name-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dc-name-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
.dc-name-line b { font-size: 13px; font-weight: 550; color: #1f2329; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-name-text small { color: #a2abb8; font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-col-owner, .dc-col-time { color: #7d8798; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-col-size { color: #98a2b3; font-size: 11px; text-align: right; white-space: nowrap; }
.dc-row .dc-kebab {
  position: static; width: 28px; height: 28px; border-radius: 6px; color: #98a2b3;
  font-size: 16px; display: grid; place-items: center;
}
.dc-row .dc-kebab:hover { background: #eaf2ff; color: var(--primary); }
.dc-role { flex: 0 0 auto; font-size: 10px; line-height: 17px; padding: 0 5px; border-radius: 4px; }
.dc-role.edit { color: var(--primary); background: var(--primary-weak); }
.dc-role.download { color: #8a5b00; background: #fff4df; }
.dc-role.view { color: #7d8798; background: #f2f4f8; }
.dc-empty-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.dc-context {
  position: fixed; z-index: 1200; width: 178px; padding: 5px; background: #fff;
  border: 1px solid #e3e8ef; border-radius: 9px; box-shadow: 0 10px 28px rgba(20,40,80,.16);
}
.dc-context button {
  width: 100%; height: 32px; padding: 0 10px; border-radius: 6px; display: flex; align-items: center;
  color: #4e5969; font-size: 12.5px; text-align: left;
}
.dc-context button:hover { background: #f5f8fd; color: #1f2329; }
.dc-context button.danger { color: #d4380d; }
.dc-detail { display: flex; flex-direction: column; border: 1px solid #edf0f5; border-radius: 9px; overflow: hidden; }
.dc-detail > div { display: grid; grid-template-columns: 86px minmax(0,1fr); gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f2f4f8; font-size: 12px; }
.dc-detail > div:last-child { border-bottom: 0; }
.dc-detail span { color: #98a2b3; }
.dc-detail b { color: #1f2329; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 900px) {
  .dc-list-head, .dc-row { grid-template-columns: minmax(0,1fr) 88px 30px; }
  .dc-col-owner, .dc-col-size { display: none; }
  .dc-head-name { padding-left: 0; }
  .dc-col-time { text-align: left; }
  .dc-topline { align-items: flex-start; flex-wrap: wrap; }
  .dc-top-right { margin-left: auto; }
}
@media (max-width: 620px) {
  .dc-head-actions { justify-content: flex-start; flex-wrap: wrap; }
  .dc-head-actions .btn { flex: 0 1 auto; }
  .dc-top-right { width: 100%; justify-content: space-between; margin-left: 0; }
  .dc-list { border-radius: 8px; }
  .dc-list-head, .dc-row { padding-left: 8px; padding-right: 8px; gap: 5px; }
  .dc-row { height: 52px; }
  .dc-ic { width: 26px; height: 30px; flex-basis: 26px; }
  .dc-name-line b { font-size: 12.5px; }
  .dc-detail > div { grid-template-columns: 74px minmax(0,1fr); }
}

@media (min-width: 561px) {
  .dc-list-head, .dc-row { grid-template-columns: minmax(0,1fr) 74px 92px 66px 30px; }
  .dc-col-owner, .dc-col-size { display: block; }
  .dc-head-name { padding-left: 38px; }
}

/* 审批意见输入器（钉钉式确认同意） */
.ap-composer { display: flex; flex-direction: column; gap: 12px; }
.ap-cp-subtitle { font-size: 15px; font-weight: 600; color: var(--text-1); line-height: 1.45; }
.ap-cp-text { width: 100%; min-height: 210px; padding: 4px 2px; border: 0; outline: 0; resize: vertical; font: inherit; font-size: 16px; line-height: 1.7; color: var(--text-1); background: transparent; }
.ap-cp-text::placeholder { color: #c3c7ce; }
.ap-cp-rec-head { font-size: 12.5px; color: var(--text-3); }
.ap-cp-rec { display: flex; flex-wrap: wrap; gap: 9px; margin-top: -4px; }
.ap-cp-chip { padding: 7px 14px; border: 0; border-radius: 999px; background: #f1f2f4; color: var(--text-1); font-size: 13px; cursor: pointer; }
.ap-cp-chip:hover { background: #e7e9ed; }
.ap-cp-atts { display: none; flex-wrap: wrap; gap: 8px; }
.ap-cp-att { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #f5f6f8; display: grid; place-items: center; }
.ap-cp-att img { width: 100%; height: 100%; object-fit: cover; }
.ap-cp-att.file { width: auto; max-width: 210px; height: 34px; padding: 0 26px 0 8px; display: flex; align-items: center; gap: 6px; background: #f5f6f8; font-size: 12.5px; }
.ap-cp-att.file b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-cp-att i { position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-style: normal; font-size: 11px; line-height: 18px; text-align: center; cursor: pointer; }
.ap-cp-uploading { font-size: 12.5px; color: var(--text-3); padding: 8px 0; }
.ap-cp-tools { display: flex; align-items: center; gap: 20px; padding-top: 2px; }
.ap-cp-tool { width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--text-1); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.ap-cp-tool:hover { background: #f2f3f5; }
.ap-cp-forward { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.ap-cp-forward input { width: 16px; height: 16px; accent-color: #1677ff; }
.ap-cp-submit { width: 100%; height: 44px; font-size: 15px; }
.ap-att-view { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.ap-att-img img { width: 58px; height: 58px; object-fit: cover; border-radius: 6px; border: 1px solid #e6e8eb; }
.ap-att-file { display: inline-flex; align-items: center; gap: 5px; max-width: 220px; padding: 5px 8px; border-radius: 6px; background: #f5f6f8; color: var(--text-2); font-size: 12px; text-decoration: none; }
.ap-att-file:hover { background: #eef0f3; }
.ap-mention-list { max-height: 55vh; overflow: auto; }
.ap-mention-row { cursor: pointer; }
.ap-mention-row:hover { background: #f6f7f9; }
@media (max-width: 620px) {
  .ap-cp-text { min-height: 170px; }
  .ap-cp-tools { gap: 14px; }
}.ap-cm-launch .btn { flex: 1; justify-content: flex-start; color: var(--text-3); font-weight: 400; }
/* 加签 */
.ap-addsign { display: flex; flex-direction: column; gap: 12px; }
.ap-addsign-sub { font-size: 15px; font-weight: 600; color: var(--text-1); }
.ap-addsign-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px; border-radius: 10px; background: #f2f3f5; }
.ap-addsign-seg button { border: 0; border-radius: 7px; background: transparent; height: 36px; color: var(--text-2); font-size: 14px; cursor: pointer; }
.ap-addsign-seg button.on { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 35, 65, .12); }
.ap-addsign-tip { font-size: 12.5px; color: var(--text-3); margin-top: -2px; }
.ap-addsign-list { max-height: 42vh; overflow: auto; border-top: 1px solid var(--line-1); }
.ap-addsign-row { cursor: pointer; border-radius: 8px; }
.ap-addsign-row:hover { background: #f6f7f9; }
.ap-addsign-row.sel { background: #eef5ff; box-shadow: inset 3px 0 0 var(--primary); }

/* 表单高级设置 */
.dg-adv-choice { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 10px; }
.dg-adv-choice label { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border: 1px solid var(--line-1); border-radius: 8px; cursor: pointer; background: #fff; }
.dg-adv-choice label:has(input:checked) { border-color: #b9cff8; background: #f4f8ff; }
.dg-adv-choice input { margin-top: 2px; }
.dg-adv-choice span { font-size: 13px; color: var(--text-1); line-height: 1.45; }
.dg-adv-off { opacity: .56; }
.dg-adv-off .dg-switch { pointer-events: none; }
.dg-adv-inline { align-items: center; }
.dg-adv-numwrap { display: flex; align-items: center; gap: 8px; }
.dg-adv-numwrap input { width: 76px; height: 34px; border: 1px solid var(--line-1); border-radius: 8px; padding: 0 9px; font-size: 13px; }
.dg-adv-numwrap input:disabled { background: #f4f5f7; color: var(--text-3); }
.dg-adv-numwrap span { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.dg-adv-note { margin-top: 8px; }
.dg-adv-label { flex: 0 0 128px; width: 128px; white-space: nowrap; }