/* PC 端工作台布局 */
.app {
  display: grid;
  grid-template-areas: "top top" "side main";
  grid-template-columns: 214px minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
  min-height: 100vh;
}

/* 顶栏 */
.topbar {
  grid-area: top; position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 0 18px 0 20px;
  background: var(--ink); color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 194px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(140deg, #3d78f2, #1f5ae0 60%, #1740a8);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px -4px rgba(31, 90, 224, .9);
}
.brand-mark svg { width: 14px; height: 14px; }
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: .01em; }
.brand-sub { font-size: 9.5px; color: #8fa0c0; letter-spacing: .18em; }

.top-search { flex: 1; max-width: 460px; position: relative; }
.top-search input {
  width: 100%; height: 32px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.07); color: #fff; padding: 0 12px 0 34px; outline: none;
  font-size: 12px;
}
.top-search input::placeholder { color: #8b9bbb; }
.top-search input:focus { border-color: rgba(120, 160, 255, .6); background: rgba(255,255,255,.1); }
.top-search svg { position: absolute; left: 11px; top: 9px; width: 14px; height: 14px; color: #93a3c2; }
.search-hint {
  position: absolute; right: 8px; top: 7px; font-size: 9.5px; color: #93a3c2;
  border: 1px solid rgba(255,255,255,.16); border-radius: 4px; padding: 1px 5px;
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.ai-btn {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px;
  border-radius: 8px; border: 1px solid rgba(130, 165, 255, .34);
  background: linear-gradient(120deg, rgba(65, 118, 255, .22), rgba(110, 86, 207, .22));
  color: #e6edff; font-size: 11.5px;
}
.ai-btn:hover { background: linear-gradient(120deg, rgba(65, 118, 255, .34), rgba(110, 86, 207, .34)); }
.ai-btn svg { width: 14px; height: 14px; }
.top-ico {
  position: relative; width: 30px; height: 30px; border-radius: 8px; border: 0;
  background: rgba(255,255,255,.06); color: #cfd9ee; display: grid; place-items: center;
}
.top-ico:hover { background: rgba(255,255,255,.12); }
.top-ico .badge {
  position: absolute; top: 2px; right: 1px; min-width: 13px; height: 13px; padding: 0 3px;
  border-radius: 7px; background: #e05252; color: #fff; font-size: 9px; line-height: 13px; text-align: center;
}
.top-user { display: flex; align-items: center; gap: 9px; padding-left: 6px; }
.top-user .name { font-size: 12px; line-height: 1.2; }
.top-user .dept { font-size: 9.5px; color: #8fa0c0; }

/* 侧栏 */
.sidebar {
  grid-area: side; background: #fff; border-right: 1px solid var(--line);
  padding: 12px 10px 20px; position: sticky; top: 56px; height: calc(100vh - 56px);
  overflow-y: auto;
}
.nav-group { margin-bottom: 12px; }
.nav-label { font-size: 10px; color: var(--muted-2); letter-spacing: .08em; padding: 6px 10px 5px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; height: 36px; padding: 0 10px;
  border-radius: 8px; color: var(--ink-2); font-size: 12.5px; cursor: pointer;
  position: relative; transition: .14s; user-select: none;
}
.nav-item svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 auto; }
.nav-item:hover { background: #f4f7fd; }
.nav-item.active { background: var(--blue-50); color: var(--blue); font-weight: 500; }
.nav-item.active svg { color: var(--blue); }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  background: var(--blue); border-radius: 2px;
}
.nav-item .tail { margin-left: auto; font-size: 9.5px; color: var(--muted-2); }
.nav-item.active .tail { color: #7d9fe8; }
.nav-badge { margin-left: auto; min-width: 16px; height: 16px; border-radius: 5px; background: var(--red-bg); color: var(--red); font-size: 9.5px; display: grid; place-items: center; padding: 0 4px; }
.side-foot { padding: 12px 10px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.side-foot .ver { font-size: 10px; color: var(--muted-2); }

/* 主区 */
.main { grid-area: main; padding: 18px 22px 32px; min-width: 0; }
.view { display: none; animation: viewIn .2s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 19px; color: var(--ink); }
.page-head .crumb { font-size: 11px; color: var(--muted-2); margin-bottom: 2px; }
.page-head .desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.head-actions { display: flex; gap: 8px; align-items: center; }

/* 工作台 */
.dash { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(330px, 1fr); gap: 16px; align-items: start; }
.dash-col { display: grid; gap: 16px; }

.brief-card {
  padding: 16px 18px; background:
    radial-gradient(900px 200px at 100% 0%, rgba(88, 125, 255, .16), transparent 60%),
    linear-gradient(120deg, #14233c, #101b2e 60%, #16233d);
  color: #dfe8fb; border: 1px solid #1e3050; border-radius: var(--radius);
  box-shadow: 0 10px 30px -18px rgba(14, 26, 47, .6);
}
.brief-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.brief-top .spark { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, #4b7eff, #7a5cf0); box-shadow: 0 4px 14px -4px #4b7eff; }
.brief-top .spark svg { width: 14px; height: 14px; color: #fff; }
.brief-top h3 { font-size: 13px; color: #fff; font-weight: 600; }
.brief-top .chip { background: rgba(255,255,255,.1); color: #a9bce0; }
.brief-top .time { margin-left: auto; font-size: 10.5px; color: #7f91b5; }
.brief-main { font-size: 13px; line-height: 1.75; color: #e8efff; }
.brief-main b { color: #fff; font-weight: 600; }
.brief-actions { display: flex; gap: 8px; margin-top: 13px; flex-wrap: wrap; }
.brief-actions .btn { height: 28px; font-size: 11.5px; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #dce6fb; }
.brief-actions .btn:hover { background: rgba(255,255,255,.16); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 14px 15px; cursor: pointer; transition: .16s; position: relative; overflow: hidden; }
.kpi:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -16px rgba(16,24,40,.3); }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-label { font-size: 11px; color: var(--muted); }
.kpi .k-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: #f2f6ff; }
.kpi .k-ico svg { width: 14px; height: 14px; color: var(--blue); }
.kpi .k-num { font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); line-height: 1.25; margin-top: 6px; font-family: var(--mono); }
.kpi .k-num small { font-size: 11px; font-weight: 400; color: var(--muted-2); margin-left: 3px; font-family: var(--font); }
.kpi .k-foot { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.kpi .k-foot .up { color: var(--red); }
.kpi .k-foot .ok { color: var(--green); }
.kpi.alert .k-ico { background: var(--red-bg); }
.kpi.alert .k-ico svg { color: var(--red); }
.kpi.alert .k-num { color: var(--red); }

.panel { padding: 15px 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.panel-head h3 { font-size: 13px; display: flex; align-items: center; gap: 7px; }
.panel-head h3 .count { font-size: 10px; color: var(--muted-2); font-weight: 400; }
.panel-head .more { font-size: 11px; color: var(--muted); cursor: pointer; display: flex; align-items: center; gap: 2px; }
.panel-head .more:hover { color: var(--blue); }

.todo-list { display: grid; gap: 2px; }
.todo-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px;
  transition: .14s; cursor: pointer;
}
.todo-row:hover { background: #f8faff; }
.todo-check {
  width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid #c4cee0;
  flex: 0 0 auto; display: grid; place-items: center;
}
.todo-check:hover { border-color: var(--blue); background: var(--blue-50); }
.todo-body { min-width: 0; flex: 1; }
.todo-title { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo-title.done { text-decoration: line-through; color: var(--muted-2); }
.todo-meta { font-size: 10.5px; color: var(--muted-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.todo-meta .p { color: var(--red); }
.todo-row .tail { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

.proj-list { display: grid; gap: 10px; }
.proj-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 8px; border-radius: 9px; cursor: pointer; transition: .14s; }
.proj-row:hover { background: #f8faff; }
.proj-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.proj-top .nm { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-top .pct { margin-left: auto; font-size: 11px; color: var(--muted); font-family: var(--mono); }
.proj-info { font-size: 10.5px; color: var(--muted-2); display: flex; gap: 10px; align-items: center; }
.proj-bar { grid-column: 1 / -1; margin-top: 3px; }

.list-line { display: flex; gap: 10px; padding: 9px 8px; border-radius: 8px; cursor: pointer; }
.list-line:hover { background: #f8faff; }
.list-line .ico {
  width: 28px; height: 28px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center;
  background: #f2f6ff; color: var(--blue); font-size: 10px; font-weight: 600;
}
.list-line .ico.orange { background: var(--orange-bg); color: var(--orange); }
.list-line .ico.green { background: var(--green-bg); color: var(--green); }
.list-line .ico.purple { background: var(--purple-bg); color: var(--purple); }
.list-line .b { min-width: 0; flex: 1; }
.list-line .t { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-line .s { font-size: 10.5px; color: var(--muted-2); display: flex; gap: 8px; flex-wrap: wrap; }
.list-line .r { flex: 0 0 auto; font-size: 11px; color: var(--muted-2); text-align: right; }
.list-line .amt { font-family: var(--mono); color: var(--ink); font-size: 12px; }

.schedule { display: grid; gap: 2px; }
.sch-row { display: flex; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.sch-row:hover { background: #f8faff; }
.sch-time { font-family: var(--mono); font-size: 12px; color: var(--ink); flex: 0 0 44px; padding-top: 1px; }
.sch-body { min-width: 0; }
.sch-title { font-size: 12px; }
.sch-meta { font-size: 10.5px; color: var(--muted-2); }

.status-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.status-strip.four { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.mini-stat { background: #f8faff; border: 1px solid #eef2fa; border-radius: 8px; padding: 9px 10px; }
.mini-stat .n { font-family: var(--mono); font-size: 16px; color: var(--ink); line-height: 1.3; }
.mini-stat .l { font-size: 9.5px; color: var(--muted-2); }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; flex-wrap: wrap; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.seg button {
  height: 26px; padding: 0 11px; border: 0; background: transparent; border-radius: 6px;
  font-size: 11.5px; color: var(--muted); white-space: nowrap;
}
.seg button.on { background: var(--blue-50); color: var(--blue); font-weight: 500; }
.toolbar .grow { flex: 1; }
.toolbar .input { width: 186px; height: 30px; font-size: 12px; }

/* 项目 */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 13px; }
.proj-card { padding: 14px 15px; cursor: pointer; transition: .16s; }
.proj-card:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -22px rgba(16,24,40,.4); border-color: #cbd8ef; }
.proj-card .pc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.proj-card h3 { font-size: 14px; margin-top: 8px; color: var(--ink); }
.proj-card .pc-meta { font-size: 10.5px; color: var(--muted-2); display: flex; gap: 9px; margin-top: 4px; flex-wrap: wrap; }
.proj-card .pc-desc { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.6; height: 34px; overflow: hidden; }
.proj-card .pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; }
.proj-card .pc-foot .pct { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -6px; border: 1.5px solid #fff; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.project-detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 16px; }
.detail-card { padding: 16px; }
.dl { display: grid; grid-template-columns: 84px 1fr; gap: 8px 12px; font-size: 12px; }
.dl dt { color: var(--muted-2); font-size: 11px; }
.dl dd { margin: 0; }
.file-ref { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f2f5fa; font-size: 12px; }
.file-ref:last-child { border-bottom: 0; }
.file-ref .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 任务看板 */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 12px; align-items: start; }
.board-col { background: #f7f9fd; border: 1px solid #e9eef7; border-radius: 12px; padding: 10px; min-height: 220px; }
.board-head { display: flex; align-items: center; gap: 7px; padding: 2px 3px 9px; }
.board-head .dot { width: 7px; height: 7px; }
.board-head .t { font-size: 12px; font-weight: 600; }
.board-head .n { margin-left: auto; font-size: 10px; color: var(--muted-2); background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; }
.board-cards { display: grid; gap: 8px; }
.task-card { padding: 11px 12px; cursor: pointer; transition: .14s; border-radius: 10px; }
.task-card:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -18px rgba(16,24,40,.5); border-color: #cdd9ee; }
.task-card .tc-top { display: flex; align-items: center; gap: 6px; }
.task-card .tc-title { font-size: 12px; line-height: 1.5; margin-top: 6px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card .tc-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 10px; color: var(--muted-2); flex-wrap: wrap; }
.task-card .tc-meta .due.risk { color: var(--red); font-weight: 500; }
.task-card .tc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f2f5fa; }
.task-card .tc-foot .who { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--muted); }
.task-card .tc-foot .src { font-size: 9.5px; color: var(--muted-2); }

/* 云盘 */
.drive-wrap { display: grid; grid-template-columns: 174px minmax(0, 1fr) 276px; gap: 13px; align-items: start; }
.drive-panel { padding: 12px; }
.drive-item { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 8px; cursor: pointer; font-size: 12px; }
.drive-item svg { width: 15px; height: 15px; color: var(--muted); }
.drive-item:hover { background: #f7f9fd; }
.drive-item.on { background: var(--blue-50); color: var(--blue); font-weight: 500; }
.drive-item.on svg { color: var(--blue); }
.drive-item .cnt { margin-left: auto; font-size: 9.5px; color: var(--muted-2); }
.drive-quota { margin-top: 12px; padding: 10px 8px 4px; border-top: 1px solid var(--line); }
.drive-quota .q-top { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); margin-bottom: 6px; }
.folder-tree { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.tree-item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); padding: 5px 8px; border-radius: 6px; cursor: pointer; }
.tree-item:hover { background: #f7f9fd; color: var(--ink-2); }
.tree-item.on { color: var(--blue); background: var(--blue-50); }
.tree-item svg { width: 13px; height: 13px; }

.files-card { overflow: hidden; }
.files-head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: 11px; color: var(--muted-2); }
.breadcrumb b { color: var(--ink-2); font-weight: 500; }
.files-head .grow { flex: 1; }
.file-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ftype {
  width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center;
  font-size: 9px; font-weight: 600; background: #f2f6ff; color: var(--blue); flex: 0 0 auto;
}
.ftype.xlsx { background: #e9f8ef; color: #0e9f6e; }
.ftype.pdf { background: #fdecea; color: #d93025; }
.ftype.dwg { background: #f1edff; color: #6e56cf; }
.ftype.docx { background: #eaf1ff; color: #1f5ae0; }
.ftype.md { background: #f5f6fa; color: #6b7891; }
.file-name .nm { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { opacity: 0; transition: .14s; }
.table tbody tr:hover .file-actions { opacity: 1; }

.preview-panel { padding: 14px; }
.preview-tile {
  height: 128px; border-radius: 10px; background:
    repeating-linear-gradient(135deg, #f5f8ff 0 10px, #eef3fd 10px 20px);
  border: 1px solid #e5ecf9; display: grid; place-items: center; color: var(--muted-2); font-size: 11px;
  margin-bottom: 12px;
}
.preview-title { font-size: 13px; font-weight: 600; line-height: 1.5; word-break: break-all; }
.preview-meta { font-size: 10.5px; color: var(--muted-2); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; }
.preview-sec { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.preview-sec h4 { font-size: 11px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.preview-sec .kv { display: flex; justify-content: space-between; font-size: 11.5px; padding: 4px 0; }
.preview-sec .kv span:first-child { color: var(--muted-2); }
.link-tip { font-size: 10.5px; line-height: 1.6; color: var(--muted-2); background: #f8faff; border: 1px dashed #dbe5f6; border-radius: 7px; padding: 8px 9px; margin-top: 8px; }

/* 审批 */
.approval-wrap { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 13px; align-items: start; }
.appr-list { padding: 8px; max-height: calc(100vh - 170px); overflow: auto; }
.appr-item { padding: 10px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.appr-item:hover { background: #f8faff; }
.appr-item.on { background: var(--blue-50); border-color: #dbe6ff; }
.appr-item .t { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.appr-item .m { display: flex; gap: 7px; align-items: center; margin-top: 5px; font-size: 10px; color: var(--muted-2); flex-wrap: wrap; }
.appr-item .amt { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.appr-detail { padding: 20px; }
.appr-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.appr-hero h2 { font-size: 17px; margin-top: 3px; }
.appr-amount { font-family: var(--mono); font-size: 26px; color: var(--ink); text-align: right; line-height: 1.2; }
.appr-amount small { display: block; font-size: 10px; color: var(--muted-2); font-family: var(--font); }
.appr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 22px; margin-top: 16px; font-size: 12px; }
.appr-grid .k { color: var(--muted-2); font-size: 11px; margin-bottom: 2px; }
.ai-hint {
  margin-top: 14px; padding: 11px 12px; border-radius: 9px; font-size: 11.5px; line-height: 1.7;
  background: linear-gradient(120deg, #f3f7ff, #f7f4ff); border: 1px solid #e2e9fb; color: var(--ink-2);
}
.ai-hint b { color: var(--blue); }
.timeline { margin-top: 16px; }
.tl-row { display: flex; gap: 11px; padding-bottom: 13px; position: relative; }
.tl-row::before { content: ""; position: absolute; left: 5px; top: 13px; bottom: 0; width: 1px; background: var(--line); }
.tl-row:last-child::before { display: none; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #c9d6ee; background: #fff; flex: 0 0 auto; margin-top: 4px; }
.tl-row.done .tl-dot { border-color: var(--blue); background: var(--blue-50); }
.tl-b { font-size: 11.5px; }
.tl-b .who { font-weight: 500; }
.tl-b .act { color: var(--muted); }
.tl-time { font-size: 10px; color: var(--muted-2); }
.appr-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }

/* 考勤 */
.attend-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(0, 1.35fr); gap: 14px; align-items: start; }
.clock-card { padding: 22px; text-align: center; }
.clock-face { font-family: var(--mono); font-size: 40px; letter-spacing: .02em; color: var(--ink); line-height: 1.2; }
.clock-date { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.punch {
  width: 132px; height: 132px; border-radius: 50%; margin: 18px auto 12px;
  border: 0; background: radial-gradient(circle at 35% 30%, #4d82ff, #1f5ae0 70%);
  color: #fff; font-size: 15px; font-weight: 600; letter-spacing: .08em;
  box-shadow: 0 14px 30px -12px rgba(31,90,224,.7); display: grid; place-items: center; gap: 2px;
}
.punch:hover { transform: translateY(-1px); }
.punch:disabled { background: #dbe3f2; color: #8d9ab2; box-shadow: none; cursor: default; }
.punch small { font-size: 10px; font-weight: 400; color: rgba(255,255,255,.75); letter-spacing: 0; }
.punch:disabled small { color: #8d9ab2; }
.punch-meta { font-size: 11px; color: var(--muted-2); line-height: 1.8; }
.punch-meta .ok { color: var(--green); }

/* AI */
.ai-page { max-width: 880px; margin: 0 auto; }
.ai-chat { display: flex; flex-direction: column; min-height: 520px; padding: 18px; }
.ai-msgs { flex: 1; display: grid; gap: 14px; align-content: start; padding: 4px 2px 16px; }
.msg { display: flex; gap: 9px; }
.msg .bubble { max-width: 86%; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.8; }
.msg.user { flex-direction: row-reverse; }
.msg.user .bubble { background: var(--blue); color: #fff; border-radius: 10px 10px 2px 10px; }
.msg.ai .bubble { background: #f6f8fd; border: 1px solid #e8edf8; border-radius: 10px 10px 10px 2px; }
.msg.ai .bubble b { color: var(--blue); }
.msg .who-ico { width: 26px; height: 26px; border-radius: 8px; flex: 0 0 auto; display: grid; place-items: center; background: linear-gradient(135deg,#4b7eff,#7a5cf0); color: #fff; }
.msg .who-ico svg { width: 14px; height: 14px; }
.evidence { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.evidence .chip { background: #fff; border: 1px solid #e1e8f7; color: var(--muted); font-size: 10px; height: 19px; }
.ai-actions { margin-top: 9px; display: flex; gap: 6px; flex-wrap: wrap; }
.ai-actions .btn { height: 25px; font-size: 10.5px; padding: 0 9px; background: #fff; }
.ai-input-wrap { border-top: 1px solid var(--line); padding-top: 12px; display: flex; gap: 8px; }
.ai-input-wrap .input { height: 38px; }
.ai-suggests { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.ai-suggests button { border: 1px solid #e2e8f5; background: #fff; border-radius: 14px; padding: 4px 11px; font-size: 11px; color: var(--muted); }
.ai-suggests button:hover { color: var(--blue); border-color: #c9d9f7; background: var(--blue-50); }
.ai-scope { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted-2); margin-bottom: 10px; }

/* 自定义看板 */
.module-list { display: grid; gap: 6px; }
.module-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.module-row:hover { border-color: #cfdcf1; background: #fbfcff; }
.module-row .mi { width: 24px; height: 24px; border-radius: 6px; background: #f2f6ff; color: var(--blue); display: grid; place-items: center; }
.module-row .mi svg { width: 13px; height: 13px; }
.module-row .tt { font-size: 12px; }
.module-row .dd { font-size: 10px; color: var(--muted-2); }
.module-row input { margin-left: auto; width: 15px; height: 15px; accent-color: var(--blue); }

@media (max-width: 1280px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .drive-wrap { grid-template-columns: 160px minmax(0, 1fr); }
  .preview-panel { display: none; }
}
@media (max-width: 1080px) {
  .app { grid-template-columns: 64px minmax(0, 1fr); }
  .brand { min-width: 0; }
  .brand-name, .brand-sub, .nav-label, .nav-item span, .nav-item .tail, .nav-badge, .side-foot { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .top-search { max-width: 280px; }
  .board { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
  .approval-wrap { grid-template-columns: 1fr; }
  .appr-list { max-height: 240px; }
}
@media (max-width: 760px) {
  .main { padding: 14px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-detail, .attend-grid { grid-template-columns: 1fr; }
  .top-search { display: none; }
  .top-user .name, .top-user .dept { display: none; }
  .board { grid-template-columns: 1fr; }
  .drive-wrap { grid-template-columns: 1fr; }
  .drive-panel { display: flex; gap: 6px; overflow: auto; }
  .drive-panel .drive-quota, .drive-panel .folder-tree { display: none; }
}

/* ============ 全域看板 / 业务 / 物料 / 预算 / 配置 ============ */
.kb-strip {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 14px;
}
.kb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--ink); }
.status-strip.six { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.status-strip.six .mini-stat { background: #fff; padding: 12px 12px 10px; }
.status-strip.six .mini-stat .n { font-size: 17px; }
@media (max-width: 1180px) { .status-strip.six { grid-template-columns: repeat(3, 1fr); } }

.bd-row { padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.bd-row:last-child { border-bottom: 0; }
.bd-top { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink); margin-bottom: 5px; }
.bd-top .pct { font-family: var(--mono); color: var(--muted); }
.bd-row .progress { height: 5px; }
.bd-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); margin-top: 4px; }

.flow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.flow-card { padding: 16px; }
.flow-card h3 { margin: 8px 0 4px; font-size: 14px; color: var(--ink); }
.flow-card .fc-top { display: flex; gap: 6px; align-items: center; }
.flow-card .fc-ver { margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--muted-2); }
.flow-card .fc-desc { font-size: 11px; color: var(--muted); line-height: 1.6; min-height: 32px; }
.block-chain { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.block-pill {
  display: inline-flex; flex-direction: column; gap: 1px; padding: 5px 9px;
  background: #f5f8ff; border: 1px solid #dfe8fb; border-radius: 7px;
  font-size: 10.5px; color: var(--ink); line-height: 1.35;
}
.block-pill small { font-size: 9.5px; color: var(--muted-2); }
.block-lib { display: flex; flex-wrap: wrap; gap: 8px; }
.block-lib .block-pill { background: #fafbfe; border-color: var(--line); }
.fc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 10px; }

.biz-chain { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.chain-node { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; background: #fafbfe; border: 1px solid var(--line); border-radius: 9px; }
.chain-node .cn-idx { width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 20px; }
.chain-node .cn-t { font-size: 11px; font-weight: 600; color: var(--ink); }
.chain-node .cn-v { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }

.fd-list { display: flex; flex-direction: column; gap: 6px; }
.fd-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfe; }
.fd-row .fd-idx { width: 20px; height: 20px; border-radius: 50%; background: #e9effc; color: var(--blue); font-size: 10px; display: flex; align-items: center; justify-content: center; }
.fd-row .fd-name { flex: 1; font-size: 12px; color: var(--ink); }
.fd-row .fd-name small { margin-left: 8px; font-size: 10px; color: var(--muted-2); }

.dict-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dict-card { padding: 14px 16px; }
.dict-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dict-head h4 { font-size: 12.5px; color: var(--ink); margin: 0; }
.dict-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 47px; align-content: flex-start; }
.chip-x { font-style: normal; margin-left: 5px; cursor: pointer; color: var(--muted-2); }
.chip-x:hover { color: var(--red); }
.dict-add { display: flex; gap: 8px; margin-top: 10px; }
.dict-add .input { flex: 1; height: 30px; font-size: 11px; }

.module-list { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.module-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-size: 11.5px; cursor: pointer; }
.module-row:last-child { border-bottom: 0; }
.module-row input { margin-top: 2px; }

