:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --card: #1e293b;
  --line: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --brand: #38bdf8;
  --brand-2: #0ea5e9;
  --danger: #f87171;
  --ok: #4ade80;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", Segoe UI, Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #15263f 0%, var(--bg) 60%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wrap { width: 100%; max-width: 100%; padding: 0 24px; }
/* “我的工作”模块加宽：相对默认 920px 增加 80%（即 1656px），仅在该模块生效 */
.wrap.wrap-wide { max-width: 100%; height: 100%; display: flex; flex-direction: column; }

/* 顶部 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-weight: 800; color: #04121f;
}
.brand h1 { font-size: 20px; margin: 0; letter-spacing: .5px; }
.brand small { color: var(--muted); }

.btn {
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
  padding: 10px 16px; border-radius: 10px; cursor: pointer; font-size: 14px;
  transition: .15s;
}
.btn:hover { border-color: var(--brand); }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #04121f; border: none; font-weight: 700; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; }

/* 卡片 */
.card { align-self: flex-start;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 6px; font-size: 22px; }
.card p.sub { color: var(--muted); margin: 0 0 20px; }

/* 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: #0b1424; color: var(--text); font-size: 15px;
}
.field input:focus { outline: none; border-color: var(--brand); }

.msg { min-height: 18px; font-size: 13px; margin-top: 6px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
code { background: #0b1424; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 13px; color: var(--brand); }

/* 欢迎页按钮组 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: auto; max-width: 500px; }
.tile {
  background: linear-gradient(160deg, #16263f, #0e1a2e);
  border: 1px solid var(--line); border-radius: 14px; padding: 26px 18px;
  text-align: center; cursor: pointer; transition: .15s;
}
.tile:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow); }
.tile .ic { font-size: 30px; }
.tile .t { font-size: 17px; font-weight: 700; margin-top: 10px; }
.tile .lock { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 板块变体标签 + 切换密码 */
.tag {
  font-size: 14px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: rgba(56,189,248,.15); color: var(--brand); vertical-align: middle;
}
.switch { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.switch a { color: var(--muted); font-size: 13px; text-decoration: none; }
.switch a:hover { color: var(--brand); }

/* 板块内容 */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.placeholder { color: var(--text); line-height: 1.7; }
.placeholder h3 { margin: 0 0 10px; }
.placeholder ul { padding-left: 20px; color: var(--muted); }
.placeholder .muted { color: var(--muted); font-size: 13px; }
.back { color: var(--brand); cursor: pointer; font-size: 14px; }

/* 文件管理器（项目 / 报表板块） */
.fm { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.fm-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.fm-upload input[type="file"] { color: var(--muted); font-size: 13px; max-width: 320px; }
.fm-list { display: flex; flex-direction: column; gap: 10px; }
.fm-row {
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
  background: #0b1424; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.fm-main { flex: 1 1 280px; min-width: 240px; }
.fm-name { font-weight: 600; word-break: break-all; }
.fm-meta { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }
.fm-desc { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.fm-desc-input {
  flex: 1 1 200px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #0b1424; color: var(--text); font-size: 13px;
}
.fm-desc-input:focus { outline: none; border-color: var(--brand); }
.fm-desc-text { color: var(--text); font-size: 13px; }
.fm-actions { display: flex; gap: 8px; align-items: flex-start; }
.btn.danger { color: var(--danger); border-color: rgba(248,113,113,.4); }
.btn.danger:hover { background: rgba(248,113,113,.12); }

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
}

/* ==================== 我的工作 · 工作进展收集系统 ==================== */
.wt-card { padding: 24px; margin-top: 0; align-self: stretch; }
.wt-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.wt-stat { background: #0b1424; border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px; text-align: center; }
.wt-stat-n { font-size: 28px; font-weight: 800; line-height: 1.1; }
.wt-stat-t { font-size: 13px; color: var(--muted); margin-top: 4px; }
.wt-c-total .wt-stat-n { color: var(--text); }
.wt-c-doing .wt-stat-n { color: #60a5fa; }
.wt-c-pending .wt-stat-n { color: var(--muted); }
.wt-c-done .wt-stat-n { color: var(--ok); }
.wt-c-overdue .wt-stat-n { color: var(--danger); }

.wt-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.wt-tab { background: transparent; border: none; color: var(--muted); padding: 10px 16px; cursor: pointer; font-size: 15px; border-bottom: 2px solid transparent; }
.wt-tab:hover { color: var(--text); }
.wt-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.wt-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.wt-search { flex: 1 1 240px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: #0b1424; color: var(--text); font-size: 14px; }
.wt-search:focus { outline: none; border-color: var(--brand); }
.wt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wt-tip { font-size: 13px; }

.wt-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.wt-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.wt-table th { background: #0b1424; color: var(--muted); font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wt-table td { padding: 10px 12px; border-bottom: 1px solid rgba(51,65,85,.4); vertical-align: top;  }
.wt-table tr:last-child td { border-bottom: none; }
.wt-table tr:hover td { background: rgba(56,189,248,.04); }
.wt-table-sm { min-width: 0; font-size: 13px; }
.wt-progress-cell { max-width: none; overflow: visible; text-overflow: unset; white-space: normal; word-break: break-word; overflow-wrap: break-word; }
.wt-tasklink { color: var(--brand); cursor: pointer; font-weight: 600; }
.wt-tasklink:hover { text-decoration: underline; }
.wt-ops { white-space: nowrap; }
.wt-empty { text-align: center; padding: 30px 0; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

.wt-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.wt-st-pending { background: rgba(148,163,184,.18); color: var(--muted); }
.wt-st-doing { background: rgba(96,165,250,.18); color: #60a5fa; }
.wt-st-overdue { background: rgba(248,113,113,.18); color: var(--danger); }
.wt-st-done { background: rgba(74,222,128,.18); color: var(--ok); }

/* 弹窗 */
.wt-overlay { position: fixed; inset: 0; background: rgba(2,6,18,.65); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto; }
.wt-modal { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 560px; box-shadow: var(--shadow); }
.wt-modal-wide { max-width: 760px; }
.wt-modal-h { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 18px; font-weight: 700; }
.wt-close { cursor: pointer; color: var(--muted); font-size: 18px; }
.wt-close:hover { color: var(--text); }
.wt-form { padding: 20px 22px; }
.wt-form .field { margin-bottom: 14px; }
.wt-form textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0b1424; color: var(--text); font-size: 14px; resize: vertical; font-family: inherit; }
.wt-form textarea:focus { outline: none; border-color: var(--brand); }
.wt-form select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0b1424; color: var(--text); font-size: 14px; }
.wt-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wt-modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); }

/* 详情 */
.wt-detail { padding: 20px 22px; }
.wt-dtitle { margin: 0 0 16px; font-size: 19px; display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.wt-dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-bottom: 18px; }
.wt-dgrid > div { display: flex; flex-direction: column; gap: 2px; }
.wt-dgrid .muted { font-size: 12px; }
.wt-dgrid b { font-weight: 600; word-break: break-word; }
.wt-dfull { grid-column: 1 / -1; }
.wt-progress { background: #0b1424; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.wt-progress-h { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; font-weight: 600; }
.wt-progress-body { white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.wt-pt { font-size: 12px; margin-top: 8px; }
.wt-statusbar { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.wt-history h4 { margin: 0 0 10px; font-size: 15px; }
.wt-htype { background: rgba(56,189,248,.15); color: var(--brand); padding: 1px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; }

.wt-msg { min-height: 20px; font-size: 13px; margin-top: 14px; }
.wt-msg.ok { color: var(--ok); }
.wt-msg.err { color: var(--danger); }

@media (max-width: 640px) {
  .wt-stats { grid-template-columns: repeat(2, 1fr); }
  .wt-row2, .wt-dgrid { grid-template-columns: 1fr; }
  .wt-modal-f { flex-direction: column; }
  .wt-modal-f .btn { width: 100%; }
}

/* 关注按钮：激活态红色 */
.wt-follow-btn.follow-active {
  color: #ef4444;
  border-color: rgba(239,68,68,.5);
  background: rgba(239,68,68,.1);
  font-weight: 700;
}
.wt-follow-btn.follow-active:hover {
  background: rgba(239,68,68,.2);
}

/* === 工作模块表格列宽调整 === */
.wt-table { table-layout: fixed; }
.wt-table th, .wt-table td { white-space: normal; word-break: break-word; overflow-wrap: break-word; }
/* 序号 */
.wt-table .col-idx { width: 100px; text-align: center; }
/* 任务名称: 占剩余空间的 2/3 (相对于负责人) */
.wt-table .col-name { width: 10%; }
/* 进度描述: 自适应填充所有剩余空间 */
.wt-table .col-progress { width: auto; }
/* 负责人: 占剩余空间的 1/3 (相对于任务名称) */
.wt-table .col-owner { width: 6.7%; }
/* 岗位 */
.wt-table .col-position { width: 4%; }
/* 开始日期 / 结束日期 */
.wt-table .col-date { width: 6%; }
/* 完成状态 */
.wt-table .col-status { width: 5.3%; }
/* 完成时间(历史模式) */
.wt-table .col-completed { width: 9%; }
/* 操作 */
.wt-table .col-ops { width: 14%; white-space: nowrap; }
/* 移除旧的进度单元格限制 */
.wt-table .wt-progress-cell { max-width: none; overflow: visible; text-overflow: unset; white-space: normal; word-break: break-word; }
