/* WanLink · 内部平台样式 v3
   取向：干净但不寡淡 —— WanLink 薄荷绿→天蓝渐变做品牌记忆点，
   卡片有轻悬浮感，头像走圆形（与晚晚云一致） */
:root {
  --accent: #2d7d5a;
  --accent-deep: #1f5e42;
  --accent-weak: #e9f3ed;
  --grad: linear-gradient(135deg, #38a379 0%, #5b8fd8 100%);
  --grad-soft: linear-gradient(135deg, rgba(56, 163, 121, .10), rgba(91, 143, 216, .10));
  --bg: #f4f6f5;
  --card: #ffffff;
  --text: #14181c;
  --text-2: #59636b;
  --text-3: #8f979d;
  --line: #e6e9e8;
  --line-strong: #d6dbd9;
  --shadow: 0 1px 2px rgba(18, 28, 24, .04), 0 8px 22px -10px rgba(18, 28, 24, .08);
  --radius: 12px;
  --radius-sm: 8px;
  --ok: #2f7d4f;
  --warn: #a86a12;
  --bad: #b93a2f;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px; line-height: 1.55;
  overscroll-behavior-y: none;
}

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 234px; flex: none; padding: 18px 12px;
  border-right: 1px solid var(--line);
  background: #fff;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 2px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-mark {
  width: 32px; height: 32px; flex: none;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* logo 源图自带圆形与四角透明，不再垫底色 */
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { font-size: 14.5px; font-weight: 650; letter-spacing: -.1px; }
.brand-sub { font-size: 11px; color: var(--text-3); margin-top: -1px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 11px; border-radius: 9px; cursor: pointer;
  color: var(--text-2); font-size: 13.5px;
  position: relative; transition: background .13s, color .13s;
}
.nav-item:hover { background: #f3f6f4; }
.nav-item.on {
  background: var(--accent-weak); color: var(--accent-deep); font-weight: 550;
}
.nav-item.on::before {
  content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px;
  width: 2.5px; border-radius: 3px; background: var(--grad);
}
.nav-item .ic { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-item .avatar.nav { margin: -1px 0; }
.nav-badge {
  margin-left: auto; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: #c8452f; color: #fff;
  font-size: 10.5px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: 980px; margin: 0 auto; padding: 28px 30px 88px; }
.topbar { display: none; }

/* ---------- 通用 ---------- */
.hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.page-title { font-size: 22px; font-weight: 650; letter-spacing: -.4px; margin: 0 0 2px; }
.page-sub { color: var(--text-3); font-size: 12.5px; margin: 2px 0 18px; }
.hd .btn { margin-top: 4px; flex: none; }
.sec-title {
  font-size: 11.5px; font-weight: 600; color: var(--text-3);
  letter-spacing: .4px; margin: 22px 2px 8px;
}

.card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  overflow: hidden;
}
.card.pad { padding: 16px 17px; }
.list { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 11px; padding: 11px 15px;
  cursor: pointer; transition: background .12s;
}
.row + .row { border-top: 1px solid var(--line); }
.row:hover { background: #fafbfa; }
.row .grow { flex: 1; min-width: 0; }
.row .t1 { font-size: 14px; font-weight: 500; letter-spacing: -.1px; }
.row .t2 { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.chev { width: 6px; height: 11px; flex: none; opacity: .3; }

/* ---------- 头像（圆形，和晚晚云一致） ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; font-weight: 550; letter-spacing: -.2px;
  overflow: hidden; position: relative;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 27px; height: 27px; font-size: 11px; }
.avatar.nav { width: 24px; height: 24px; font-size: 10.5px; }
.avatar.lg { width: 54px; height: 54px; font-size: 20px; }
.avatar.xl { width: 74px; height: 74px; font-size: 27px; }

/* 我的页：头像可点，悬浮出现「更换」遮罩 */
.av-wrap { position: relative; width: 74px; height: 74px; flex: none; cursor: pointer; }
.av-edit {
  position: absolute; left: 0; right: 0; bottom: 0; height: 24px;
  background: rgba(17, 24, 21, .55); color: #fff;
  font-size: 10.5px; display: flex; align-items: center; justify-content: center;
  border-radius: 0 0 37px 37px; opacity: 0; transition: opacity .15s;
  backdrop-filter: blur(2px);
}
.av-wrap:hover .av-edit, .av-edit.busy { opacity: 1; }

.btn {
  border: none; border-radius: 8px; padding: 7.5px 15px;
  font-size: 13.5px; font-weight: 550; cursor: pointer;
  background: var(--accent); color: #fff;
  transition: background .12s, opacity .12s, transform .06s;
}
.btn:hover { background: var(--accent-deep); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.btn.ghost { background: #f1f3f2; color: var(--text); }
.btn.ghost:hover { background: #e7eae9; }
.btn.danger { background: #fbeeec; color: var(--bad); }
.btn.danger:hover { background: #f6e2df; }
.btn.wide { width: 100%; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-3); margin: 0 0 5px 1px; }
.input, textarea.input, select.input {
  width: 100%; padding: 9.5px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fbfcfb;
  outline: none; font-size: 14px; transition: border-color .12s, background .12s, box-shadow .12s;
}
.input:focus, textarea.input:focus {
  background: #fff; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 125, 90, .10);
}
textarea.input { resize: vertical; min-height: 76px; line-height: 1.6; }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 5px; font-size: 11px; font-weight: 500; letter-spacing: .1px;
}
.tag.pending { background: #fdf2e2; color: var(--warn); }
.tag.approved { background: #e8f3ec; color: var(--ok); }
.tag.rejected { background: #fbecea; color: var(--bad); }
.tag.gray { background: #f0f2f1; color: var(--text-3); }

.tabs2 { display: inline-flex; gap: 15px; margin-bottom: 14px; }
.tabs2 button {
  border: none; background: none; padding: 3px 0 5px; cursor: pointer;
  font-size: 13px; color: var(--text-3); position: relative;
}
.tabs2 button.on { color: var(--text); font-weight: 550; }
.tabs2 button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; border-radius: 2px; background: var(--grad);
}

.segmented {
  display: flex; background: #edf0ee; border-radius: 9px;
  padding: 2px; gap: 2px; margin-bottom: 14px;
}
.segmented button {
  flex: 1; border: none; background: transparent; padding: 5px 0;
  border-radius: 7px; font-size: 13px; font-weight: 500;
  color: var(--text-2); cursor: pointer; transition: background .15s, color .15s;
}
.segmented button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2.5px rgba(0,0,0,.07); }

.empty { text-align: center; color: var(--text-3); font-size: 13px; padding: 34px 10px; }

/* ---------- 工作台 ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.hello h1 {
  font-size: 23px; font-weight: 650; letter-spacing: -.5px; margin: 0;
  background: linear-gradient(120deg, var(--text) 55%, #3c7a63);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hello .d { color: var(--text-3); font-size: 12.5px; margin-top: 3px; -webkit-text-fill-color: var(--text-3); }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.quick {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 11px 12px; cursor: pointer; display: flex; align-items: center; gap: 9px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.quick:hover {
  border-color: #cfe0d6; transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(18,28,24,.05), 0 10px 22px -10px rgba(18,28,24,.12);
}
.quick .qi {
  width: 28px; height: 28px; border-radius: 8px; margin: 0; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent-deep);
}
.quick span { font-size: 12px; color: var(--text-2); }

.stat-row { display: flex; gap: 9px; margin-top: 9px; }
.stat {
  flex: 1; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  border-radius: 10px; padding: 11px 13px; cursor: pointer;
  display: flex; align-items: baseline; gap: 7px;
  transition: border-color .15s, transform .15s;
}
.stat:hover { border-color: #cfe0d6; transform: translateY(-1px); }
.stat .n {
  font-size: 20px; font-weight: 650; letter-spacing: -.4px; line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.stat .l { font-size: 11.5px; color: var(--text-3); margin: 0; }
.stat.hot .n {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.clock-card {
  background: var(--grad);
  border-radius: var(--radius); padding: 17px 19px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  box-shadow: 0 8px 20px -8px rgba(56, 130, 160, .45);
}
.clock-card .lab { font-size: 11.5px; opacity: .75; letter-spacing: .2px; }
.clock-card .big { font-size: 22px; font-weight: 650; letter-spacing: -.4px; margin-top: 1px; }
.clock-card .btn { background: #fff; color: var(--accent-deep); }
.clock-card .btn:hover { background: #eef4f0; }
.clock-card .btn:disabled { background: rgba(255,255,255,.16); color: rgba(255,255,255,.7); }

/* ---------- 组织 ---------- */
.org-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px 15px; }
.org-row + .org-row { border-top: 1px solid var(--line); }
.org-side { width: 116px; flex: none; padding-top: 1px; }
.org-name { font-size: 13.5px; font-weight: 600; letter-spacing: -.1px; display: flex; align-items: center; gap: 6px; }
.org-cnt {
  font-size: 10.5px; font-weight: 500; color: var(--text-3);
  background: #f1f3f2; border-radius: 999px; padding: 1px 7px;
}
.chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: flex; align-items: center; gap: 7px; padding: 4px 11px 4px 4px;
  border-radius: 999px; background: #f4f6f5; cursor: pointer;
  transition: background .13s;
}
.chip:hover { background: #eaefec; }
.chip .nm { font-size: 12.5px; font-weight: 500; line-height: 1.25; }
.chip .ti { font-size: 10.5px; color: var(--text-3); line-height: 1.25; }
.chip.add {
  background: transparent; border: 1px dashed var(--line-strong);
  color: var(--text-3); font-size: 12px; padding: 5px 11px;
  align-self: center;
}
.chip.add:hover { background: #f4f7f5; color: var(--text-2); border-color: #c6ccc9; }
.chip.none { background: none; padding: 0; color: var(--text-3); font-size: 12px; cursor: default; }

/* ---------- 审批 ---------- */
.appr-icon {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-weak); color: var(--accent-deep);
}
.steps { padding: 3px 15px 13px; }
.step { display: flex; gap: 11px; position: relative; padding-bottom: 13px; }
.step:last-child { padding-bottom: 2px; }
.step .dot {
  width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none;
  background: #d7dcd9; box-shadow: 0 0 0 3px #fff;
}
.step.done .dot { background: var(--ok); }
.step.rej .dot { background: var(--bad); }
.step.now .dot { background: var(--accent); }
.step:not(:last-child)::before {
  content: ""; position: absolute; left: 3px; top: 15px; bottom: 0;
  width: 1px; background: var(--line-strong);
}

.detail-grid { display: grid; grid-template-columns: 86px 1fr; gap: 9px 12px; padding: 14px 17px; }
.detail-grid .k { color: var(--text-3); font-size: 12.5px; }
.detail-grid .v { font-size: 13.5px; }

/* ---------- 公告 ---------- */
.news-item { padding: 14px 16px; cursor: pointer; }
.news-item + .news-item { border-top: 1px solid var(--line); }
.news-title { font-size: 14px; font-weight: 550; letter-spacing: -.1px; }
.news-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; display: flex; gap: 7px; align-items: center; }
.news-body { font-size: 13.5px; color: var(--text-2); line-height: 1.8; white-space: pre-wrap; margin-top: 10px; }
.dot-unread { width: 6px; height: 6px; border-radius: 50%; background: #c8452f; display: inline-block; flex: none; }

/* ---------- 沟通 ---------- */
.chat-wrap { display: flex; height: calc(100vh - 118px); min-height: 440px; gap: 10px; }
.chat-list { width: 200px; flex: none; overflow: auto; }
.chat-main { flex: 1; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
.chat-head { padding: 11px 15px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 550; }
.msgs { flex: 1; overflow: auto; padding: 15px; display: flex; flex-direction: column; gap: 10px; }
.msgs > .msg:first-child { margin-top: auto; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg > div { max-width: min(76%, 500px); min-width: 0; }
.msg .bubble {
  background: #f2f4f3; border-radius: 12px; padding: 7.5px 12px;
  font-size: 13.5px; max-width: 100%; white-space: pre-wrap; word-break: break-word;
}
.msg.me { flex-direction: row-reverse; }
.msg.me .bubble { background: var(--accent); color: #fff; }
.msg .who { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.chat-input { display: flex; gap: 8px; padding: 9px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; border: 1px solid var(--line); background: #fbfcfb; border-radius: 8px; padding: 8px 11px; outline: none; }
.chat-input input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(45,125,90,.08); }

/* ---------- 工牌 ---------- */
.badge-card {
  border-radius: var(--radius); padding: 19px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #1d5c45 0%, #2a5674 100%);
  box-shadow: 0 10px 24px -10px rgba(32, 84, 100, .5);
}
.badge-card::after {
  content: ""; position: absolute; right: -40px; top: -50px;
  width: 150px; height: 150px; border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}
.badge-top { display: flex; align-items: center; gap: 12px; }
.badge-top .av {
  width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 600;
  overflow: hidden;
}
.badge-top .av img { width: 100%; height: 100%; object-fit: cover; }
.badge-name { font-size: 18px; font-weight: 600; letter-spacing: -.3px; }
.badge-title { font-size: 11.5px; opacity: .75; }
.badge-meta { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; font-size: 12px; }
.badge-meta .k { opacity: .55; font-size: 10.5px; letter-spacing: .2px; }
.badge-meta .v { font-weight: 500; margin-top: 1px; }
.qr-box { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px 14px 12px; text-align: center; margin-top: 10px; }
.qr-box .qr { width: 188px; height: 188px; margin: 0 auto; }
.qr-box .qr svg { width: 100%; height: 100%; display: block; }
.qr-tip { font-size: 11.5px; color: var(--text-3); margin-top: 6px; }

/* ---------- 考勤 ---------- */
.att-summary { display: flex; gap: 8px; }
.att-big { font-size: 26px; font-weight: 650; letter-spacing: -.6px; }

/* ---------- 成本 ---------- */
.cost-head { padding: 15px 17px 17px; }
.cost-head .k { font-size: 11.5px; color: var(--text-3); }
.cost-head .v {
  font-size: 31px; font-weight: 650; letter-spacing: -1px; line-height: 1.15;
  font-variant-numeric: tabular-nums; margin-top: 1px;
}
.cost-head .v i { font-size: 17px; font-weight: 500; font-style: normal; margin-right: 3px; opacity: .55; }
.cost-head .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.cost-head .sub b { color: var(--text-2); font-weight: 550; font-variant-numeric: tabular-nums; }
.bars { padding: 4px 17px 17px; display: flex; flex-direction: column; gap: 9px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.bar-row .top .amt { color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-track { height: 6px; border-radius: 3px; background: #edf0ee; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 3px; background: var(--grad); }
.cost-item { display: flex; align-items: center; gap: 10px; padding: 9px 15px; }
.cost-item + .cost-item { border-top: 1px solid var(--line); }
.cost-item .amt { font-size: 13.5px; font-weight: 550; font-variant-numeric: tabular-nums; }
.mask-note {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: #f4f6f5; border-radius: 8px; color: var(--text-3); font-size: 12.5px;
}

/* ---------- 我的 ---------- */
.profile { display: flex; align-items: center; gap: 14px; padding: 19px 17px; }
.profile .nm { font-size: 17.5px; font-weight: 650; letter-spacing: -.3px; }
.profile .ti { font-size: 12.5px; color: var(--text-3); }

/* ---------- 晚晚邮箱（低饱和深红） ---------- */
.mail {
  --accent: #8f3a42; --accent-deep: #6f2c33; --accent-weak: #f8eef0;
  --mline: #ece4e4; --mweak: #fbf6f6;
}
.mhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mhd-l { display: flex; align-items: center; gap: 11px; min-width: 0; }
.mlogo {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  background: linear-gradient(150deg, #a5565c, #6f2c33);
  color: #fff; font-size: 15px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.mtitle { font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.maddr { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.mbtn { background: #8f3a42; }
.mbtn:hover { background: #6f2c33; }

.mtabs { display: flex; gap: 16px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.mtabs button {
  border: none; background: none; padding: 8px 0 9px; cursor: pointer;
  font-size: 13px; color: var(--text-3); position: relative;
}
.mtabs button.on { color: var(--text); font-weight: 550; }
.mtabs button.on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: #8f3a42; border-radius: 2px;
}

.mbody {
  display: flex; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  height: calc(100vh - 214px); min-height: 420px;
}
.mside { width: 178px; flex: none; border-right: 1px solid var(--line); padding: 12px 10px; }
.mside-t { font-size: 10.5px; color: var(--text-3); letter-spacing: .4px; padding: 4px 8px 6px; }
.mf {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
}
.mf:hover { background: var(--mweak); }
.mf.on { background: #f7ebec; color: #6f2c33; font-weight: 550; }
.mf em {
  margin-left: auto; font-style: normal; font-size: 10.5px; font-weight: 600;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #8f3a42; color: #fff; display: flex; align-items: center; justify-content: center;
}
.mstate { font-size: 11.5px; padding: 4px 8px; border-radius: 6px; display: inline-block; }
.mstate.ok { background: #eaf3ee; color: #2f7d4f; }
.mstate.warn { background: #fdf2e2; color: #a86a12; }
.mhint { font-size: 11.5px; color: var(--text-3); line-height: 1.6; padding: 4px 8px; }

.mlist { width: 292px; flex: none; border-right: 1px solid var(--line); overflow: auto; }
.mlist-h {
  font-size: 11.5px; color: var(--text-3); padding: 11px 14px 7px;
  position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line);
}
.mitem { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f4f1f1; }
.mitem:hover { background: var(--mweak); }
.mitem.on { background: #f7ebec; }
.mitem.unread .mi-sub { font-weight: 600; color: var(--text); }
.mi-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.mi-who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mi-time { flex: none; }
.mi-sub {
  font-size: 13px; color: var(--text-2); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mi-flag {
  display: inline-block; font-size: 10px; color: #a86a12; background: #fdf2e2;
  padding: 1px 6px; border-radius: 4px; margin-top: 4px;
}

.mread { flex: 1; min-width: 0; overflow: auto; display: flex; flex-direction: column; }
.mread-empty { align-items: center; justify-content: center; }
.me-t { font-size: 13.5px; color: var(--text-2); }
.me-s { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.mr-h { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.mi-back { border: none; background: none; font-size: 16px; color: var(--text-3); cursor: pointer; padding: 0 2px; }
.mr-sub { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.mr-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.mi-del { border: none; background: none; font-size: 12.5px; color: var(--bad); cursor: pointer; }
.mr-body {
  padding: 16px 18px; font-size: 13.5px; line-height: 1.85; color: var(--text-2);
  white-space: pre-wrap; word-break: break-word; flex: 1;
}
.mr-note {
  margin: 0 18px 12px; padding: 9px 12px; border-radius: 8px;
  background: #fdf2e2; color: #8a5300; font-size: 12px;
}
.msec { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.mrow { display: flex; align-items: center; gap: 11px; padding: 11px 14px; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mt1 { font-size: 13.5px; font-weight: 500; }
.mt2 { font-size: 11.5px; color: var(--text-3); margin-top: 1px; }
.merr { font-size: 11.5px; color: #a86a12; margin-top: 3px; }
.mcheck { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }

/* ---------- 移动端 ---------- */
.tabbar { display: none; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .content { padding: 14px 14px 92px; max-width: 100%; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: calc(env(safe-area-inset-top) + 9px) 14px 9px;
    position: sticky; top: 0; z-index: 20;
    background: rgba(244, 246, 245, .92);
    backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .tt { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
  .page-title { font-size: 19px; }
  .hello h1 { font-size: 20px; }
  .grid4 { gap: 7px; }
  .quick { padding: 10px 4px 8px; }
  .quick .qi { width: 26px; height: 26px; }
  .quick span { font-size: 11.5px; }
  .stat-row { gap: 6px; }
  .stat { padding: 9px 8px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .stat .n { font-size: 18px; }
  .stat .l { font-size: 10.5px; white-space: nowrap; letter-spacing: -.2px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 5px 2px calc(env(safe-area-inset-bottom) + 5px);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line);
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 3px 0; color: var(--text-3); font-size: 10px; cursor: pointer;
  }
  .tab.on { color: var(--accent-deep); }
  .tab .ic { width: 20px; height: 20px; }
  .tab .dotb {
    position: absolute; margin-left: 15px; margin-top: -1px;
    width: 6px; height: 6px; border-radius: 50%; background: #c8452f;
  }

  .mbody { flex-direction: column; height: auto; min-height: 0; }
  .mside { display: none; }
  .mlist { width: 100%; border-right: none; overflow: visible; }
  .mbody.reading .mlist { display: none; }
  .mread { min-height: calc(100vh - 250px); }
  .mread-empty { display: none; }
  .mtabs { gap: 13px; overflow: auto; }
  .mtabs button { white-space: nowrap; font-size: 12.5px; }
  .mhead { margin-bottom: 10px; }
  .chat-wrap { height: calc(100vh - 178px); }
  .chat-list { display: block; width: 100%; }
  .hd .page-title { display: none; }
  .hd .page-sub { margin-top: 0; }
  .org-row { flex-direction: column; gap: 7px; padding: 11px 12px; }
  .org-side { width: auto; display: flex; align-items: center; gap: 7px; }
  .chips { gap: 5px; width: 100%; }
  .chip { flex: 0 0 auto; max-width: 100%; }
  .chip.add { display: none; }
  .chips:empty { display: none; }
  .detail-grid { grid-template-columns: 76px 1fr; }
  .badge-meta { grid-template-columns: 1fr 1fr; }
  .cost-head { gap: 20px; padding: 14px 14px 12px; }
  .cost-head .v { font-size: 22px; }
}

.fade-enter-active, .fade-leave-active { transition: opacity .14s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(820px 460px at 88% -12%, rgba(91, 143, 216, .16), transparent 62%),
    radial-gradient(760px 440px at -8% 108%, rgba(56, 163, 121, .15), transparent 62%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 360px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 2px 6px rgba(18,28,24,.04), 0 24px 48px -20px rgba(18,28,24,.14);
  padding: 30px 26px 24px;
}
.login-logo {
  width: 56px; height: 56px; margin: 0 auto 16px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.login-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.login-card h1 {
  font-size: 19px; font-weight: 650; text-align: center; margin: 0 0 3px; letter-spacing: -.3px;
}
.login-card p { text-align: center; color: var(--text-3); font-size: 12.5px; margin: 0 0 20px; }
.err-line { color: var(--bad); font-size: 12.5px; margin: -4px 0 10px 1px; }

/* ---------- 弹层与提示 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 60; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(20, 24, 28, .38); backdrop-filter: blur(3px);
}
.sheet {
  width: 100%; max-width: 340px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(18, 28, 24, .3);
  animation: sheetIn .18s ease-out;
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(6px); } }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 80px);
  background: #1b2420; color: #fff;
  padding: 8px 15px; border-radius: 8px; font-size: 13px;
  z-index: 100; max-width: 80vw; text-align: center;
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, .4);
}
@media (min-width: 861px) { .toast { bottom: 26px; } }

@media (max-width: 860px) {
  .sheet-mask { align-items: flex-end; padding: 0; }
  .sheet { max-width: 100%; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheetIn { from { transform: translateY(100%); } }
}

/* ==================================================================
   v3 · 视觉升级（保留 v2 全部类名，仅覆盖与新增）
   品牌：WanLink 薄荷绿→天蓝；新增水印、企业管理、标签体系
   ================================================================== */
:root {
  --accent: #2d7d5a;
  --accent-deep: #1f5e42;
  --accent-weak: #e9f3ed;
  --grad: linear-gradient(135deg, #38a379 0%, #5b8fd8 100%);
  --bg: #f4f6f5;
  --line: #e6e9e8;
  --shadow: 0 1px 2px rgba(18, 28, 24, .04), 0 8px 22px -10px rgba(18, 28, 24, .08);
  --radius: 14px;
}
html, body { background: var(--bg); }

/* 登录后的全屏溯源水印：不拦截点击，覆盖所有内容 */
.wm-layer {
  position: fixed; inset: 0; z-index: 9000;
  pointer-events: none !important; background-repeat: repeat;
}

/* 侧栏 */
.sidebar {
  padding: 20px 12px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
  border-right: 1px solid var(--line);
}
.brand { padding: 2px 10px 20px; gap: 11px; }
.brand-mark { width: 36px; height: 36px; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.25px; }
.brand-sub { font-size: 10.5px; letter-spacing: .3px; }
.nav-group {
  font-size: 10.5px; font-weight: 600; color: var(--text-3);
  letter-spacing: .9px; padding: 0 11px 7px;
}
.nav-item { padding: 8px 11px; border-radius: 10px; margin-bottom: 1px; }
.nav-item.on::before { left: -12px; top: 8px; bottom: 8px; width: 3px; }
.side-company {
  margin: 0 3px 10px; padding: 12px 13px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 163, 121, .10), rgba(91, 143, 216, .10));
  border: 1px solid rgba(91, 143, 216, .18);
}
.sc-label { font-size: 10px; letter-spacing: .7px; color: var(--text-3); font-weight: 600; }
.sc-name {
  font-size: 13px; font-weight: 650; line-height: 1.4;
  margin: 4px 0 8px; word-break: break-all;
}

/* 顶栏（桌面端也常驻，移动端沿用原规则） */
.topbar-right { display: flex; align-items: center; gap: 8px; }
.tb-no {
  font-size: 11.5px; color: var(--text-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2px;
}
@media (min-width: 861px) {
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 30px; position: sticky; top: 0; z-index: 20;
    background: rgba(245, 247, 246, .88);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .tt { font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
  .content { padding-top: 24px; }
}

/* 标签（独立于组织页的 .chip，避免串味） */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1.65;
  background: #eef2f0; color: var(--text-2);
  border: 1px solid transparent; white-space: nowrap; cursor: default;
}
.tag.enterprise, .tag.ok { background: #e9f3ed; color: #1f5e42; border-color: #d4e8dc; }
.tag.personal { background: #eaf1fb; color: #3b65a5; border-color: #d5e3f6; }
.tag.off { background: #f6efec; color: #a76142; border-color: #ebd9cf; }
.tag.company {
  display: inline-block; background: #fff; color: var(--text-2);
  border-color: var(--line); max-width: 230px;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .2px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* 企业管理页 */
.cmp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 4px; }
.cmp-stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.cmp-stat::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--grad);
}
.cs-num { font-size: 26px; font-weight: 700; letter-spacing: -.6px; line-height: 1.2; }
.cs-label { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.cmp-card { padding: 14px 16px; }
.cmp-card-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.cmp-hd-t { font-size: 12px; color: var(--text-3); }
.cmp-org {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-top: 1px solid var(--line);
}
.cmp-card-hd + .cmp-org { border-top: 0; }
.cmp-org-ic {
  width: 38px; height: 38px; flex: none; border-radius: 11px;
  background: var(--grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 650;
}
.cmp-org-main { flex: 1; min-width: 0; }
.cmp-org-name {
  font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.cmp-org-meta { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }
.cmp-org-meta .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #eef4f0; padding: 1px 6px; border-radius: 5px;
  cursor: pointer; color: var(--accent-deep);
}
.cmp-org-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cmp-filters {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: 8px; margin-bottom: 12px;
}
.cmp-filters .input { padding: 7px 10px; font-size: 13px; }
.cmp-table { width: 100%; }
.cmp-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.cmp-th, .cmp-tr {
  display: grid; align-items: center; gap: 10px; padding: 9px 4px;
  grid-template-columns: 1.7fr .8fr .8fr 1.4fr .6fr auto;
}
.cmp-th {
  font-size: 11px; color: var(--text-3); font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.cmp-tr { border-bottom: 1px solid var(--line); font-size: 13px; }
.cmp-tr:last-child { border-bottom: 0; }
.cmp-tr:hover { background: #fafcfb; }
.cmp-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cmp-sub {
  font-size: 11.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cmp-tip {
  font-size: 11.5px; color: var(--text-3); background: #f6f9f7;
  border-radius: 8px; padding: 9px 11px; line-height: 1.65; margin-top: 6px;
}
.sheet.wide { max-width: 460px; }
.sheet-hd { font-size: 16px; font-weight: 650; padding: 20px 22px 2px; }
.sheet-bd { padding: 12px 22px 4px; max-height: 60vh; overflow: auto; }
.sheet-ft {
  padding: 12px 22px 20px; display: flex;
  gap: 10px; justify-content: flex-end;
}
.login-foot {
  text-align: center; color: var(--text-3);
  font-size: 11px; margin-top: 18px; line-height: 1.6;
}
.login-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 3px 14px; margin-top: 7px;
}
.login-links a {
  color: var(--accent-deep); text-decoration: none; white-space: nowrap;
}
.login-links a:hover { text-decoration: underline; }

/* 卡片与按钮的微质感 */
.card, .list { transition: box-shadow .18s, transform .18s; }
.btn { box-shadow: 0 1px 2px rgba(16, 36, 28, .06); }
.btn:hover { box-shadow: 0 4px 10px -4px rgba(16, 36, 28, .22); }

@media (max-width: 860px) {
  .topbar-right .tag, .topbar-right .tb-no { display: none; }
  .cmp-stats { gap: 8px; }
  .cmp-stat { padding: 12px; }
  .cs-num { font-size: 20px; }
  .cmp-filters { grid-template-columns: 1fr 1fr; }
  .cmp-filters .input:first-child { grid-column: 1 / -1; }
  .cmp-table { overflow-x: auto; }
  .cmp-th, .cmp-tr { min-width: 620px; }
  .cmp-org { flex-wrap: wrap; }
  .cmp-org-act { width: 100%; justify-content: flex-start; }
  .sheet.wide { max-width: 100%; }
}

/* ==================== OA v2：管理面板 / 通讯录 / 沟通 ==================== */
.mini { font-size: 11.5px; color: var(--text-3); font-weight: 400; line-height: 1.5; }
.ops { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.badge.off { background: #f1f3f2; color: var(--text-3); }
.tag.me { background: var(--accent-weak); color: var(--accent-deep); }
.login-legal { display: flex; justify-content: center; gap: 16px; margin-top: 9px;
  padding-top: 9px; border-top: 1px solid var(--line); }
.login-legal a { color: var(--text-3); font-size: 11px; text-decoration: none; white-space: nowrap; }
.login-legal a:hover { color: var(--accent-deep); text-decoration: underline; }

/* --- 管理面板 --- */
.adm-wrap { max-width: 1180px; }
.adm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.adm-sub { font-size: 13px; color: var(--text-2); margin-top: 5px; display: flex; align-items: center; gap: 8px; }
.adm-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.adm-tabs button { border: 0; background: transparent; padding: 10px 15px; font-size: 13.5px;
  color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit;
  display: flex; align-items: center; gap: 6px; }
.adm-tabs button:hover { color: var(--accent-deep); }
.adm-tabs button.on { color: var(--accent-deep); font-weight: 700; border-bottom-color: var(--accent); }
.adm-tabs .sup-dot { font-size: 9.5px; background: #fdf1e5; color: #a86a12; padding: 1px 5px; border-radius: 4px; }
.adm-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.adm-grid .stat { text-align: center; }
.st-n { font-size: 26px; font-weight: 700; color: var(--accent-deep); line-height: 1.2; }
.st-t { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.adm-wide { grid-column: 1 / -1; }
.adm-wide h3 { margin: 0 0 8px; font-size: 15px; }
.adm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.adm-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.adm-bar h3 { margin: 0; font-size: 15px; }
.adm-search { display: flex; gap: 8px; }
.adm-search .input { width: 240px; }
.adm-scroll { overflow-x: auto; }
.adm-scroll .cmp-table { min-width: 760px; }
.adm-note { background: var(--accent-weak); color: var(--accent-deep); font-size: 12.5px;
  line-height: 1.7; padding: 10px 13px; border-radius: 8px; margin-bottom: 14px; }
.adm-newurl { background: #f3f8f5; border: 1px solid #cfe6d8; border-radius: 9px;
  padding: 12px; margin: 12px 0; word-break: break-all; }
.adm-newurl .mono { font-size: 13px; margin: 6px 0 10px; }
.adm-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.adm-filters .input { width: auto; max-width: 170px; }
.adm-filters span { color: var(--text-3); font-size: 12px; }
.kv { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0;
  border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.kv > span { color: var(--text-3); }
.kv > b { font-weight: 600; text-align: right; word-break: break-all; }

/* --- 通讯录 --- */
.ct-wrap { max-width: 1180px; }
.ct-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.ct-side h3 { margin: 0 0 12px; font-size: 14px; }
.ct-dept { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px;
  border-radius: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ct-dept:hover { background: #f3f6f4; }
.ct-dept.on { background: var(--accent-weak); color: var(--accent-deep); font-weight: 700; }
.ct-dept.sub { padding-left: 24px; font-size: 12.5px; }
.ct-dept span { font-size: 11px; color: var(--text-3); }
.ct-side-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.ct-search { margin-bottom: 14px; }
.ct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.ct-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 14px;
  display: flex; align-items: center; gap: 12px; cursor: pointer; transition: .15s; }
.ct-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.ct-av { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 17px; font-weight: 600; }
.ct-av img { width: 100%; height: 100%; object-fit: cover; }
.ct-av.lg { width: 56px; height: 56px; font-size: 22px; }
.ct-info { flex: 1; min-width: 0; }
.ct-name { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ct-name .tag { font-size: 10px; padding: 1px 6px; }
.ct-role { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.ct-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.ct-detail-hd { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }

/* --- 沟通 --- */
.im-wrap { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 0;
  height: calc(100vh - 118px); min-height: 500px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.im-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.im-list-hd { padding: 14px 14px 12px; border-bottom: 1px solid var(--line); }
.im-btns { display: flex; gap: 6px; margin-top: 9px; }
.im-btns .btn { flex: 1; }
.im-item { display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer;
  border-bottom: 1px solid #f2f4f3; overflow-y: auto; }
.im-item:hover { background: #f7f9f8; }
.im-item.on { background: var(--accent-weak); }
.im-item.notice .im-ic { background: #fdf1e5; color: #a86a12; }
.im-ic { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 10px; background: #e9f0f5;
  color: #456; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.im-body { flex: 1; min-width: 0; }
.im-t { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.im-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-p { font-size: 11.5px; color: var(--text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-badge { background: var(--bad); color: #fff; font-size: 10px; min-width: 17px; height: 17px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.im-main { display: flex; flex-direction: column; min-width: 0; }
.im-hd { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex;
  align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.im-hd-btns { display: flex; gap: 6px; }
.im-members { padding: 10px 16px; background: #f8faf9; border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px; max-height: 120px; overflow-y: auto; }
.im-mem { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 7px; padding: 4px 8px; font-size: 12px; }
.im-msgs { flex: 1; overflow-y: auto; padding: 16px; background: #f7f9f8; }
.im-msg { display: flex; gap: 9px; margin-bottom: 14px; align-items: flex-start; }
.im-msg.mine { flex-direction: row-reverse; }
.im-msg.sys { justify-content: center; }
.im-sys { font-size: 11.5px; color: var(--text-3); background: #eceff0; padding: 4px 12px; border-radius: 20px; }
.im-av { width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: #6d8598; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.im-bubble-wrap { max-width: 72%; display: flex; flex-direction: column; }
.im-msg.mine .im-bubble-wrap { align-items: flex-end; }
.im-name { font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.im-bubble { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; font-size: 13.5px; line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.im-msg.mine .im-bubble { background: var(--accent); border-color: var(--accent); color: #fff; }
.im-bubble.emoji { font-size: 26px; background: transparent; border: 0; padding: 2px; }
.im-bubble.oa { background: #fff; border-color: #f0dcc0; max-width: 420px; }
.oa-t { font-size: 13px; font-weight: 700; color: #a86a12; margin-bottom: 5px; }
.oa-b { font-size: 13px; color: var(--text-2); white-space: normal; }
.oa-l { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--accent-deep); }
.im-time { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
.im-img { max-width: 240px; max-height: 220px; border-radius: 7px; display: block; }
.im-file { text-decoration: none; color: inherit; }
.im-msg.mine .im-file { color: #fff; }
.im-composer { border-top: 1px solid var(--line); padding: 10px 14px; display: flex; gap: 10px;
  align-items: flex-end; position: relative; background: #fff; }
.im-composer.notice { justify-content: center; padding: 14px; }
.im-tools { display: flex; gap: 4px; position: relative; }
.im-tool { width: 32px; height: 32px; border: 0; background: #f1f3f2; border-radius: 7px;
  cursor: pointer; font-size: 15px; }
.im-tool:hover { background: #e4e9e6; }
.im-emoji { position: absolute; bottom: 38px; left: 0; width: 252px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; box-shadow: var(--shadow); z-index: 5; }
.im-emoji button { border: 0; background: transparent; font-size: 19px; cursor: pointer; padding: 3px; border-radius: 5px; }
.im-emoji button:hover { background: #f1f3f2; }
.im-input { flex: 1; min-height: 60px; max-height: 140px; resize: vertical; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 13.5px; font-family: inherit; outline: none; }
.im-input:focus { border-color: var(--accent); }
.im-pick { display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-bottom: 1px solid var(--line); cursor: pointer; }
.im-pick:hover { background: #f7f9f8; }
.im-pick-info { flex: 1; font-size: 13px; }
.hm-admin { margin-top: 18px; padding: 12px 14px; background: var(--accent-weak);
  border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .adm-grid { grid-template-columns: repeat(2, 1fr); }
  .ct-layout { grid-template-columns: 1fr; }
  .ct-side { order: 2; }
  .im-wrap { grid-template-columns: 1fr; height: auto; }
  .im-list { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .im-main { min-height: 420px; }
  .adm-search .input { width: 100%; }
}

/* ================= 阶段十：工具 / 云空间 / 电子签 ================= */
.tw-wrap, .dv-wrap, .sg-wrap { max-width: 1180px; }
.tw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.tw-quota { min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 13px; }
.tw-quota .bar-track { margin-top: 7px; }
.bar-track { height: 6px; background: #eaf0ed; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--grad); border-radius: 6px; transition: width .3s; }
.tw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tw-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  cursor: pointer; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.tw-card:hover { transform: translateY(-2px); border-color: #9ccbb5; }
.tw-card.off { opacity: .55; }
.tw-ic { font-size: 24px; line-height: 1; margin-bottom: 9px; }
.tw-n { font-weight: 650; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.tw-d { color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.tw-links { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.tw-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tw-note { margin: 12px 0; padding: 10px 13px; background: #fbfaf3; border: 1px solid #eee8d0;
  border-radius: 9px; color: #7a6b3d; font-size: 12.5px; line-height: 1.75; }
.tw-form { margin: 12px 0; padding: 16px; }
.tw-frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.tw-frow > label { min-width: 82px; color: var(--text-2); font-size: 13px; }
.tw-frow > .input, .tw-frow > select { flex: 1; min-width: 130px; }
.tw-seals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.tw-seal { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 11px; padding: 12px; }
.tw-seal-img { width: 108px; height: 74px; flex: none; background: #f6f9f8; border: 1px solid var(--line);
  border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tw-seal-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tw-verify { margin-top: 14px; padding: 18px; }
.tw-result { margin-top: 14px; padding: 13px 15px; background: #f2f9f5; border: 1px solid #d9ecdf; border-radius: 9px; }
.tw-result .t1 { font-weight: 650; margin-bottom: 6px; }
.tw-sum { font-size: 12.5px; color: #2b6b4f; margin: 8px 0; word-break: break-all;
  font-family: ui-monospace, Consolas, monospace; }
.tw-out { display: block; padding: 8px 10px; margin-top: 6px; background: #fff; border: 1px solid #cfe6d7;
  border-radius: 8px; color: var(--accent-deep); font-size: 13px; }
.tw-out:hover { background: var(--accent-weak); }

/* 云空间 */
.dv-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.dv-switch button { padding: 8px 15px; border: 1px solid var(--line); background: #fff; border-radius: 8px;
  cursor: pointer; font-size: 13px; }
.dv-switch button.on { background: var(--accent-weak); border-color: #9ccbb5; color: var(--accent-deep); font-weight: 600; }
.dv-switch button.ghost { margin-left: auto; color: var(--text-2); }
.dv-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dv-crumb { font-size: 13px; color: var(--text-2); }
.dv-crumb span, .dv-crumb a { cursor: pointer; }
.dv-crumb a:hover { color: var(--accent); }
.dv-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.dv-actions .input.sm { width: 150px; padding: 6px 9px; }
.dv-folders { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 12px; }
.dv-folder { padding: 8px 13px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; font-size: 13px; }
.dv-folder:hover { border-color: #9ccbb5; }
.dv-table { background: #fff; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.dv-th, .dv-tr { display: grid; grid-template-columns: minmax(160px,2.4fr) .8fr 1fr 1fr 1fr 1.2fr 1.4fr;
  gap: 8px; padding: 10px 14px; align-items: center; }
.dv-th { background: #f7faf8; color: var(--text-2); font-size: 12px; font-weight: 600; }
.dv-tr { border-top: 1px solid var(--line); font-size: 13px; }
.dv-tr:hover { background: #fafcfb; }
.dv-tr.dead { opacity: .6; }
.dv-name { cursor: pointer; font-weight: 550; word-break: break-all; }
.dv-name:hover { color: var(--accent); }
.dv-ops { display: flex; gap: 9px; flex-wrap: wrap; }
.dv-ops a { cursor: pointer; font-size: 12.5px; }
.dv-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2);
  padding: 10px 12px; background: #f7faf8; border-radius: 8px; margin-bottom: 12px; }
.dv-checks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 8px 0; }
.dv-checks label, .chips .chip { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; max-height: 150px; overflow: auto; }
.chip { padding: 5px 9px; background: #f4f8f6; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.dv-share-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.dv-share, .dv-log { display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-bottom: 1px dashed var(--line); font-size: 12.5px; flex-wrap: wrap; }
.dv-log .grow { flex: 1; min-width: 120px; }
.dv-share .mini.mono { flex: 1; }

/* 电子签 */
.sg-list { display: flex; flex-direction: column; gap: 9px; margin-top: 14px; }
.sg-item { display: flex; align-items: center; gap: 13px; background: #fff; border: 1px solid var(--line);
  border-radius: 11px; padding: 13px 15px; cursor: pointer; }
.sg-item:hover { border-color: #9ccbb5; }
.sg-ic { font-size: 22px; }
.sg-signers { display: flex; gap: 9px; flex-wrap: wrap; }
.sg-signer { display: flex; align-items: center; gap: 9px; padding: 8px 11px; background: #f7faf8;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; flex-wrap: wrap; }
.sg-sheet { max-width: 900px; }
.sg-pager { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.sg-preview { position: relative; width: 100%; max-width: 640px; margin: 0 auto; border: 1px solid var(--line);
  background: #fff; box-shadow: var(--shadow); line-height: 0; }
.sg-preview img { width: 100%; height: auto; display: block; }
.sg-preview.new { cursor: crosshair; }
.sg-slot { position: absolute; border: 2px dashed #2f7fc4; background: rgba(47,127,196,.10);
  color: #1d5c93; font-size: 11px; line-height: 1.2; display: flex; align-items: center;
  justify-content: center; text-align: center; pointer-events: none; }
.sg-preview.new .sg-slot { pointer-events: auto; cursor: pointer; }
.sg-btns { display: flex; gap: 9px; flex-wrap: wrap; margin: 14px 0; }

/* 工作台新增 */
.hm-panels { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 14px 0; }
.hm-panel { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 13px 15px;
  cursor: pointer; box-shadow: var(--shadow); }
.hm-panel:hover { border-color: #9ccbb5; }
.hm-pv { font-size: 21px; font-weight: 680; margin: 4px 0 7px; }
.hm-panel .bar-track { margin-bottom: 8px; }
.mini.hot { color: var(--bad); }

/* 管理面板开关 */
.cfg-group { margin-top: 16px; }
.cfg-group h4 { margin: 0 0 8px; font-size: 14px; color: var(--accent-deep); }
.cfg-item { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px dashed var(--line); }
.cfg-item label { cursor: pointer; }
.cfg-item .input.sm { width: 96px; padding: 5px 8px; }

/* 聊天撤回 / 文件失效 */
.im-bubble.recalled { background: transparent; color: var(--text-3); font-style: italic;
  border: 1px dashed var(--line-strong); }
.im-filegone { padding: 8px 11px; background: rgba(0,0,0,.035); border-radius: 7px;
  color: var(--text-3); font-size: 12.5px; }
.im-recall { margin-left: 8px; border: 0; background: transparent; color: var(--text-3);
  font-size: 11px; cursor: pointer; padding: 0 2px; }
.im-recall:hover { color: var(--accent); text-decoration: underline; }

@media (max-width: 860px) {
  .tw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tw-seals, .hm-panels { grid-template-columns: 1fr; }
  .dv-checks { grid-template-columns: 1fr; }
  .dv-th { display: none; }
  .dv-tr { grid-template-columns: minmax(0,1fr) auto; gap: 4px 10px; }
  .dv-tr > span:nth-child(2), .dv-tr > span:nth-child(4),
  .dv-tr > span:nth-child(5), .dv-tr > span:nth-child(6) { display: none; }
  .dv-tr .dv-ops { grid-column: 1 / -1; }
  .tw-head { flex-direction: column; }
  .tw-quota { width: 100%; }
  .sg-item { flex-wrap: wrap; }
  .quick span { white-space: nowrap; font-size: 11px; letter-spacing: -.2px; }
  .quick { padding-left: 2px; padding-right: 2px; }
}

/* 邀请二维码弹层 */
.qr-mask { position: fixed; inset: 0; z-index: 120; background: rgba(16,24,38,.66); display: flex; align-items: center; justify-content: center; padding: 20px; }
.qr-panel { position: relative; background: #fff; border-radius: 16px; padding: 26px 24px 22px; box-shadow: 0 24px 70px rgba(20,32,50,.28); display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 92vw; }
.qr-panel h3 { margin: 0; font-size: 16px; }
.qr-panel img { width: 240px; height: 240px; object-fit: contain; image-rendering: pixelated; }
.qr-panel .mini { margin: 0; text-align: center; color: var(--text-3); }
.qr-x { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 24px; color: var(--text-3); cursor: pointer; line-height: 1; }
.qr-x:hover { color: var(--text); }
@media (max-width: 720px) { .qr-panel img { width: 200px; height: 200px; } }
