/* ============================================================
   企微待办管家 · 设计规范
   浅色主题 / 企业微信蓝 / 8px 栅格 / 简洁高信息密度
   ============================================================ */
:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #fafbfd;
  --line: #e9ecf2;
  --line-strong: #dbe0e9;
  --text: #1a1f26;
  --text-2: #4b5563;
  --muted: #8b95a5;
  --primary: #2b6be8;
  --primary-dark: #1f56c4;
  --primary-soft: #ecf2fe;
  --ok: #10a06a;
  --ok-soft: #e8f7f0;
  --warn: #dd8a06;
  --warn-soft: #fef5e4;
  --danger: #df4a55;
  --danger-soft: #fdeced;
  --purple: #7b5cf0;
  --purple-soft: #f0edfe;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -16px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 64px -24px rgba(16, 24, 40, .28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }
svg { display: block; }

/* ---------------------------------------------------------- 布局 */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: 228px; flex: 0 0 228px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 20px 14px 14px;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 22px; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #3a7bf0, #1f56c4);
  color: #fff; font-weight: 700; font-size: 17px;
  display: grid; place-items: center;
  box-shadow: 0 6px 14px -6px rgba(43, 107, 232, .8);
}
.brand-logo.lg { width: 46px; height: 46px; font-size: 21px; border-radius: 13px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 14.5px; letter-spacing: .2px; }
.brand-text span { font-size: 11px; color: var(--muted); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 9px;
  color: var(--text-2); font-size: 13.5px;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; fill: currentColor; opacity: .75; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600;
  background: var(--danger); color: #fff; border-radius: 20px;
  padding: 0 6px; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
}
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.side-tip {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 11px;
}
.side-tip-title { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.side-tip-text { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.user-mini {
  display: flex; align-items: center; gap: 9px;
  padding: 8px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel);
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600;
  background: #6b7d99;
}
.user-mini-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.user-mini-info strong { font-size: 12.5px; }
.user-mini-info span { font-size: 10.5px; color: var(--muted); }
.icon-logout {
  margin-left: auto; border: 0; background: transparent; color: var(--muted);
  padding: 4px; border-radius: 6px;
}
.icon-logout:hover { background: var(--panel-2); color: var(--danger); }
.icon-logout svg { width: 15px; height: 15px; fill: currentColor; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 72px; padding: 0 26px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 15;
}
.topbar-left h1 { font-size: 19px; margin: 0; font-weight: 650; letter-spacing: .2px; }
.topbar-left p { margin: 1px 0 0; font-size: 12px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.today { font-size: 12px; color: var(--muted); margin-right: 4px; }

.view { padding: 22px 26px 48px; max-width: 1440px; width: 100%; }

/* ---------------------------------------------------------- 组件 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--panel);
  font-size: 13px; color: var(--text-2); font-weight: 500;
  transition: all .15s;
}
.btn:hover { border-color: #c8d0dd; color: var(--text); background: var(--panel-2); }
.btn-primary {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: 0 6px 14px -8px rgba(43, 107, 232, .9);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; }
.btn-ghost.active { background: var(--primary-soft); border-color: #c9dafb; color: var(--primary); font-weight: 600; }
.btn-sm { height: 29px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn-danger { color: var(--danger); border-color: #f3c8cb; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: #eaa9ae; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.plus { font-size: 16px; line-height: 1; margin-top: -1px; }

.icon-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--panel); display: grid; place-items: center; color: var(--text-2);
  transition: all .15s;
}
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; fill: currentColor; }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 650; }
.card-head p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.link { font-size: 12px; color: var(--primary); }
.link:hover { text-decoration: underline; }

/* ---------------------------------------------------------- KPI */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 16px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 76px; height: 76px; border-radius: 50%; background: var(--primary-soft); opacity: .55;
}
.kpi.danger::after { background: var(--danger-soft); }
.kpi.warn::after { background: var(--warn-soft); }
.kpi.ok::after { background: var(--ok-soft); }
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-num { font-size: 29px; font-weight: 680; letter-spacing: -.6px; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 11.5px; color: var(--muted); }
.kpi-sub b { color: var(--text-2); font-weight: 600; }
.kpi.danger .kpi-num { color: var(--danger); }
.kpi.ok .kpi-num { color: var(--ok); }
.kpi.warn .kpi-num { color: var(--warn); }
.kpi-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-2-wide { grid-template-columns: 1.6fr 1fr; }
.grid-remind { grid-template-columns: 1fr 1.15fr; }

.legend { display: flex; gap: 12px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

/* ---------------------------------------------------------- 图表 */
.chart-box { min-height: 210px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 76px; align-items: center; gap: 10px; margin-bottom: 11px; }
.bar-name { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 9px; border-radius: 6px; background: #f0f2f6; display: flex; overflow: hidden; }
.bar-seg { height: 100%; transition: width .5s ease; }
.bar-val { font-size: 11.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.bar-val b { color: var(--text); font-weight: 600; }

.donut-wrap { display: flex; align-items: center; gap: 18px; min-height: 210px; }
.donut { position: relative; width: 148px; height: 148px; flex: 0 0 148px; }
.donut svg { transform: rotate(-90deg); }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.donut-center strong { font-size: 24px; font-weight: 680; line-height: 1; }
.donut-center span { font-size: 11px; color: var(--muted); margin-top: 4px; }
.donut-legend { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.dl-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dl-item i { width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.dl-item span { color: var(--text-2); }
.dl-item b { margin-left: auto; font-variant-numeric: tabular-nums; }

.priority-list { display: flex; flex-direction: column; gap: 13px; }
.pr-item { display: grid; grid-template-columns: 90px 1fr 46px; gap: 10px; align-items: center; }
.pr-name { font-size: 12px; color: var(--text-2); }
.pr-track { height: 8px; border-radius: 5px; background: #f0f2f6; overflow: hidden; }
.pr-fill { height: 100%; border-radius: 5px; }
.pr-num { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-2); }

.o-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.o-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  background: var(--panel-2);
}
.o-code { font-size: 10.5px; font-weight: 700; color: var(--primary); letter-spacing: .4px; }
.o-name { font-size: 12.5px; font-weight: 600; margin: 1px 0 8px; }
.o-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.o-track { height: 5px; border-radius: 4px; background: #e7eaf0; overflow: hidden; }
.o-fill { height: 100%; background: var(--primary); border-radius: 4px; }

.risk-list { display: flex; flex-direction: column; }
.risk-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
  cursor: pointer;
}
.risk-item:last-child { border-bottom: 0; }
.risk-item:hover .risk-title { color: var(--primary); }
.risk-title {
  font-size: 12.5px; font-weight: 500; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .15s;
}
.risk-meta { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 0; }

/* ---------------------------------------------------------- 表格 */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px;
  min-width: 228px; transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: #a9c4f7; box-shadow: 0 0 0 3px rgba(43, 107, 232, .1); }
.search svg { width: 15px; height: 15px; fill: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; font-size: 13px; width: 100%; color: var(--text); }
select {
  height: 34px; padding: 0 26px 0 10px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--panel);
  font-size: 12.5px; color: var(--text-2); outline: 0;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center; background-size: 16px;
  transition: border-color .15s;
}
select:focus { border-color: #a9c4f7; box-shadow: 0 0 0 3px rgba(43, 107, 232, .1); }
.spacer { flex: 1; }

.table-card { padding: 0; overflow: hidden; }
.table-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted); gap: 12px; flex-wrap: wrap;
}
.seg { display: inline-flex; background: #f1f3f7; border-radius: 7px; padding: 2px; }
.seg button {
  border: 0; background: transparent; font-size: 11.5px; color: var(--text-2);
  padding: 4px 10px; border-radius: 5px; transition: all .15s;
}
.seg button.active { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.seg-lg { margin-bottom: 14px; padding: 3px; }
.seg-lg button { font-size: 13px; padding: 7px 18px; }

.table-scroll { overflow-x: auto; }
.table-scroll.short { max-height: 420px; overflow-y: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px;
  padding: 9px 12px; background: var(--panel-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #f1f3f7; vertical-align: middle; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: #f8fafd; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-sm td { padding: 9px 12px; font-size: 12px; }
.t-title { font-weight: 550; color: var(--text); display: flex; align-items: center; gap: 6px; }
.td-o { white-space: nowrap; }
.t-sub {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px;
}
.t-seq { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.owner-cell { display: flex; align-items: center; gap: 7px; }
.owner-cell .avatar { width: 24px; height: 24px; flex-basis: 24px; font-size: 10.5px; }
.owner-cell div { display: flex; flex-direction: column; line-height: 1.25; }
.owner-cell span { font-size: 10.5px; color: var(--muted); }
.due { font-variant-numeric: tabular-nums; font-size: 12px; }
.due small { display: block; font-size: 10.5px; color: var(--muted); }
.due.overdue { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.row-actions { display: flex; gap: 6px; white-space: nowrap; flex-wrap: nowrap; }
.row-actions button {
  border: 0; background: transparent; color: var(--primary); font-size: 11.5px; padding: 2px 4px; border-radius: 4px;
}
.row-actions button:hover { background: var(--primary-soft); }
.row-actions button.danger { color: var(--danger); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 20px; font-size: 11px; font-weight: 500; white-space: nowrap;
}
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.green { background: var(--ok-soft); color: var(--ok); }
.badge.orange { background: var(--warn-soft); color: var(--warn); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.gray { background: #f1f3f7; color: var(--text-2); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 12px 18px; border-top: 1px solid var(--line); }
.pager button {
  min-width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--panel); font-size: 12px; color: var(--text-2);
}
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .info { font-size: 11.5px; color: var(--muted); margin-right: auto; }

/* ---------------------------------------------------------- 审批 */
.approval-list { display: flex; flex-direction: column; gap: 12px; }
.approval-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
}
.ap-head { display: flex; align-items: flex-start; gap: 10px; }
.ap-title { font-size: 14px; font-weight: 600; }
.ap-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ap-body { margin: 12px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px; }
.ap-field { font-size: 12px; }
.ap-field span { color: var(--muted); display: block; font-size: 10.5px; }
.ap-note {
  background: var(--panel-2); border: 1px dashed var(--line-strong);
  border-radius: 9px; padding: 9px 11px; font-size: 12px; color: var(--text-2);
}
.ap-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.ap-foot textarea {
  flex: 1; min-width: 180px; height: 34px; resize: none; border-radius: 8px;
  border: 1px solid var(--line-strong); padding: 7px 10px; font-family: inherit; font-size: 12px; outline: 0;
}
.ap-foot textarea:focus { border-color: #a9c4f7; box-shadow: 0 0 0 3px rgba(43,107,232,.1); }
.ap-result { font-size: 12px; color: var(--text-2); }
.ap-wait { font-size: 11px; }
.ap-wait.long { color: var(--danger); }

/* ---------------------------------------------------------- 提醒 */
.notify-list { display: flex; flex-direction: column; max-height: 520px; overflow-y: auto; }
.notify-item { display: flex; gap: 10px; padding: 11px 2px; border-bottom: 1px dashed var(--line); }
.notify-item:last-child { border-bottom: 0; }
.notify-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: 0 0 7px; }
.notify-item.read .notify-dot { background: #d5dbe5; }
.notify-item.read .n-title { color: var(--muted); font-weight: 400; }
.n-title { font-size: 12.5px; font-weight: 550; }
.n-body { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: pre-line; }
.n-time { font-size: 10.5px; color: #a7b0be; margin-top: 3px; }
.reminder-status { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------------------------------------------------------- 成员/设置 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.field > span em { color: var(--danger); font-style: normal; margin-left: 2px; }
.field input, .field select, .field textarea {
  height: 34px; border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 0 10px; font-size: 12.5px; font-family: inherit; color: var(--text);
  outline: 0; background: var(--panel); width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 62px; padding: 8px 10px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #a9c4f7; box-shadow: 0 0 0 3px rgba(43, 107, 232, .1);
}
.field.full { grid-column: 1 / -1; }
.form-foot { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; }
.perm-matrix { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; overflow-x: auto; }
.perm-matrix table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.perm-matrix th, .perm-matrix td { padding: 7px 10px; border-bottom: 1px solid #f1f3f7; text-align: left; }
.perm-matrix th { color: var(--muted); font-weight: 500; }
.perm-matrix .yes { color: var(--ok); }
.perm-matrix .no { color: #c3cad6; }

.wecom-box { display: flex; flex-direction: column; gap: 10px; }
.wc-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.wc-row span { color: var(--muted); font-size: 11.5px; }
.code-block {
  background: #1d2430; color: #d6e0f0; border-radius: 9px; padding: 12px 14px;
  font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11px; line-height: 1.7;
  overflow-x: auto; white-space: pre;
}

/* ---------------------------------------------------------- 抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .32);
  backdrop-filter: blur(2px); z-index: 40; animation: fade .18s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 640px; max-width: 96vw;
  background: var(--panel); z-index: 41; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: slide .22s cubic-bezier(.22,.7,.3,1);
}
@keyframes slide { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 14px; border-bottom: 1px solid var(--line);
}
.drawer-head h2 { margin: 0; font-size: 16.5px; font-weight: 650; }
.drawer-head p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; }
.drawer-foot {
  padding: 14px 22px; border-top: 1px solid var(--line); background: var(--panel-2);
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}
.form-section { margin-bottom: 18px; }
.form-section-title {
  font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .4px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.detail-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-title { font-size: 17px; font-weight: 650; line-height: 1.4; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 14px 0; }
.detail-item span { font-size: 10.5px; color: var(--muted); display: block; }
.detail-item div { font-size: 12.5px; margin-top: 2px; }
.detail-item.full { grid-column: 1 / -1; }
.timeline { margin-top: 8px; }
.tl-item { display: flex; gap: 10px; padding: 7px 0; }
.tl-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); margin-top: 7px; flex: 0 0 7px; }
.tl-item.rejected .tl-dot { background: var(--danger); }
.tl-item.approved .tl-dot { background: var(--ok); }
.tl-main { font-size: 12px; }
.tl-sub { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------- 登录 */
.login {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: radial-gradient(1200px 600px at 20% -10%, #e6eeff 0%, transparent 55%),
              radial-gradient(900px 500px at 110% 110%, #eaf7f1 0%, transparent 50%), var(--bg);
  z-index: 60; padding: 20px;
}
.login-card {
  width: 400px; max-width: 100%; background: var(--panel);
  border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  padding: 28px 26px 18px;
}
.login-brand { text-align: center; margin-bottom: 20px; }
.login-brand .brand-logo { margin: 0 auto 10px; }
.login-brand h2 { margin: 0; font-size: 18px; }
.login-brand p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.login-users { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; margin-bottom: 12px; }
.login-user {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  text-align: left; transition: all .15s; width: 100%;
}
.login-user:hover { border-color: #b7cdf8; background: var(--primary-soft); }
.login-user div { display: flex; flex-direction: column; line-height: 1.3; }
.login-user strong { font-size: 13px; }
.login-user span { font-size: 11px; color: var(--muted); }
.login-user em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--primary); }
.login-foot { text-align: center; font-size: 11px; color: var(--muted); padding-top: 8px; border-top: 1px dashed var(--line); }
.login-hint { font-size: 11.5px; color: var(--muted); text-align: center; margin-bottom: 10px; }

/* ---------------------------------------------------------- 云端登录 */
.login-oauth {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 13px; margin-bottom: 10px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--panel);
  text-align: left; transition: all .15s;
}
.login-oauth:hover { border-color: #b7cdf8; background: var(--primary-soft); }
.login-oauth:disabled { opacity: .55; cursor: default; }
.oauth-icon {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  background: var(--primary);
}
.oauth-icon.wx { background: #10a06a; }
.oauth-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.oauth-text strong { font-size: 13px; }
.oauth-text em { font-style: normal; font-size: 11px; color: var(--muted); }
.login-error {
  background: #fdecec; color: #b4232b; border: 1px solid #f6cdcf;
  font-size: 12px; border-radius: 9px; padding: 8px 11px; margin-bottom: 12px; line-height: 1.6;
}
.wecom-banner {
  background: #e8f4ea; color: #1f7a3d; border: 1px solid #c4e5cc;
  font-size: 12px; border-radius: 9px; padding: 8px 11px; margin-bottom: 12px; line-height: 1.6;
  display: flex; flex-direction: column; gap: 2px;
}
.wecom-banner span { color: #4d8a60; font-size: 11px; }

/* ---------------------------------------------------------- 附件 */
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.file-item {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; background: #fbfcfe;
}
.file-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item em { font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.file-empty { font-size: 11.5px; color: var(--muted); padding: 6px 0; }

/* ---------------------------------------------------------- Toast */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #1d2430; color: #fff; font-size: 12.5px; padding: 9px 16px; border-radius: 9px;
  box-shadow: var(--shadow-lg); animation: drop .2s ease;
  max-width: 80vw;
}
.toast.ok { background: #12704d; }
.toast.err { background: #b3363f; }
@keyframes drop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grid-2, .grid-2-wide, .grid-remind { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  #app { flex-direction: column; }
  .sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto;
    width: 100%; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid var(--line); z-index: 30;
  }
  .brand, .sidebar-foot { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .nav-item { flex-direction: column; gap: 2px; padding: 6px 8px; font-size: 10px; flex: 1; }
  .nav-item svg { width: 19px; height: 19px; }
  .nav-badge { position: absolute; top: 2px; right: 12px; margin: 0; }
  .main { padding-bottom: 68px; }
  .topbar { height: 58px; padding: 0 14px; }
  .topbar-left h1 { font-size: 16px; }
  .topbar-left p, .today { display: none; }
  .view { padding: 14px 14px 24px; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-num { font-size: 23px; }
  .card { padding: 14px 15px; }
  .toolbar select { flex: 1; min-width: 104px; }
  .search { min-width: 100%; }
  .drawer { width: 100%; max-width: 100%; }
  .form-grid, .detail-grid { grid-template-columns: 1fr; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------- 身份认领 */
.claim-tip {
  font-size: 12.5px; color: var(--text-2); line-height: 1.6;
  background: var(--primary-soft); border: 1px solid #d8e4fb;
  border-radius: 10px; padding: 9px 11px; margin-bottom: 10px;
}
.claim-tip b { color: var(--primary-dark); }
.claim-search {
  width: 100%; height: 36px; padding: 0 11px; margin-bottom: 10px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  font-size: 13px; color: var(--text); background: #fff; outline: none;
}
.claim-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.claim-list {
  max-height: 292px; overflow-y: auto; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
}
.claim-group { padding: 6px 6px 2px; }
.claim-group[hidden] { display: none; }
.claim-group-title {
  font-size: 11px; color: var(--muted); font-weight: 600;
  padding: 4px 6px 3px; letter-spacing: .02em;
}
.claim-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 7px 8px; margin-bottom: 2px;
  background: #fff; border: 1px solid transparent; border-radius: 8px;
  cursor: pointer; text-align: left; font: inherit; color: var(--text);
}
.claim-item[hidden] { display: none; }
.claim-item:hover { border-color: #b7cdf8; background: var(--primary-soft); }
.claim-item.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary) inset; }
.claim-name { font-size: 13px; font-weight: 600; }
.claim-sub { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.claim-ok { width: 100%; justify-content: center; }
.claim-ok:disabled { opacity: .55; cursor: not-allowed; }
.claim-empty, .claim-loading {
  font-size: 13px; color: var(--muted); text-align: center;
  line-height: 1.8; padding: 22px 8px;
}
