/* ============================================================
   GAMS 事项原型 v2 · 增量样式(独立于 prototype/,不影响旧原型)
   仅补充:流程进度(竖向)、相关地点/人员、快捷录入、描述、附件、留言板
   ============================================================ */

/* ---------- 流程进度(竖向,含未到达阶段灰色) ---------- */
.flow { position: relative; padding-left: 28px; }
.flow::before {
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px;
  width: 2px; background: var(--border); border-radius: 1px;
}
.flow-node { position: relative; padding-bottom: 22px; }
.flow-node:last-child { padding-bottom: 0; }
.flow-node::before {
  content: ""; position: absolute; left: -28px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--primary); border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}
.flow-node.done::before { background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.flow-node.current::before {
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px var(--primary-light);
}
.flow-node.pending::before { background: var(--card); box-shadow: 0 0 0 2px var(--border-2); }
.flow-node.pending .fn-title,
.flow-node.pending .fn-text,
.flow-node.pending .fn-meta,
.flow-node.pending .fn-time { color: var(--text-3); }

.fn-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fn-title { font-weight: 600; font-size: 13.5px; }
.fn-time { color: var(--text-3); font-size: 12px; }
.fn-text { margin-top: 4px; color: var(--text-2); font-size: 13.5px; }
.fn-meta { color: var(--text-3); font-size: 12.5px; margin-top: 3px; }
.fn-imgs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.fn-img {
  width: 84px; height: 62px; border-radius: 6px; background: var(--gray-bg);
  border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; color: var(--text-3); font-size: 11.5px;
}
.fn-acts { margin-top: 6px; display: flex; gap: 14px; font-size: 12.5px; }
.flow-actions { border-top: 1px dashed var(--border); margin-top: 18px; padding-top: 14px; }
.flow-actions textarea {
  width: 100%; min-height: 64px; border: 1px solid var(--border-2); border-radius: 6px;
  padding: 8px 10px; font-size: 13.5px; font-family: inherit; resize: vertical; outline: none;
}
.flow-actions textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* ---------- 相关地点 / 相关人员(标签列表) ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; background: var(--gray-bg);
  border: 1px solid var(--border); border-radius: 14px; padding: 2px 10px;
  font-size: 12.5px; color: var(--text-2);
}
.chip.ext { background: var(--orange-bg); border-color: #fde68a; color: var(--amber); }

/* ---------- 外部联系人快捷录入 ---------- */
.quick-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.quick-add .field { display: flex; flex-direction: column; gap: 4px; }
.quick-add label { font-size: 12px; color: var(--text-3); }
.quick-add input {
  height: 32px; border: 1px solid var(--border-2); border-radius: 6px;
  padding: 0 8px; font-size: 13px; outline: none; width: 170px;
}
.quick-add input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.hint-inline { color: var(--text-3); font-size: 12px; }

/* ---------- 事项描述(文字 + 图片) ---------- */
.desc-text { color: var(--text-2); font-size: 13.5px; line-height: 1.85; }
.desc-imgs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.desc-img {
  width: 108px; height: 80px; border-radius: 6px; background: var(--gray-bg);
  border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; color: var(--text-3); font-size: 12px;
}

/* ---------- 附件区 ---------- */
.attach-list { display: flex; flex-direction: column; gap: 8px; }
.attach-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px;
}
.attach-row .a-name { flex: 1; font-size: 13px; }
.attach-row .a-meta { color: var(--text-3); font-size: 12px; }

/* ---------- 留言板 ---------- */
.board { display: flex; flex-direction: column; gap: 12px; }
.board-item { display: flex; gap: 10px; }
.board-item .b-body {
  flex: 1; min-width: 0; background: var(--gray-bg);
  border-radius: 8px; padding: 10px 12px;
}
.board-item .b-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.board-item .b-author { font-weight: 600; font-size: 13px; }
.board-item .b-time { color: var(--text-3); font-size: 12px; }
.board-item .b-text { margin-top: 3px; color: var(--text-2); font-size: 13.5px; }

/* ============================================================
   第二版增量:版本号 / 用户菜单 / 标签页 / 权限徽标 / 开关
   ============================================================ */

/* ---------- 顶栏品牌与版本号 ---------- */
.brand-text { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.brand-ver { font-size: 10px; font-weight: 400; color: var(--text-3); letter-spacing: .5px; opacity: .9; margin-top: 1px; }

/* ---------- 顶栏用户菜单(纯 details/summary,无 JS) ---------- */
.user-drop { position: relative; }
.user-drop summary {
  list-style: none; display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.user-drop summary::-webkit-details-marker { display: none; }
.user-drop summary::marker { content: ""; display: none; }
.user-drop summary:hover { background: var(--gray-bg); }
.user-drop .ico { width: 14px; height: 14px; color: var(--text-3); }
.user-name { font-size: 13px; color: var(--text-2); }
.user-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 236px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14); padding: 6px; z-index: 60;
}
.user-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.u-name { font-size: 14px; font-weight: 600; }
.u-meta { font-size: 12px; color: var(--text-3); margin-top: 1px; }
.user-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); }
.user-item:hover { background: var(--gray-bg); text-decoration: none; color: var(--text); }
.user-item .ico { width: 15px; height: 15px; }
.user-item.danger { color: var(--red); }
.user-item.danger:hover { background: var(--red-bg); color: var(--red); }

/* ---------- 权限徽标(需管理员) ---------- */
.need-admin {
  font-size: 10.5px; font-weight: 500; color: var(--amber);
  background: var(--orange-bg); border: 1px solid #fde68a;
  border-radius: 10px; padding: 1px 7px; white-space: nowrap;
}

/* ---------- 开关(通知设置等) ---------- */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px dashed var(--border); }
.switch-row:last-child { border-bottom: none; }
.s-title { font-size: 13.5px; }
.s-desc { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.switch { position: relative; width: 38px; height: 21px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.slider { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: var(--border-2); border-radius: 21px; transition: .18s; cursor: pointer; }
.slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(17px); }

/* ============================================================
   侧边菜单布局(设置 / 信息管理)
   ============================================================ */
.side-layout { display: flex; gap: 20px; align-items: flex-start; }
.side-menu {
  width: 216px; flex: none; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
  position: sticky; top: 76px;
}
.side-group { font-size: 12px; color: var(--text-3); padding: 12px 10px 4px; }
.side-group:first-child { padding-top: 4px; }
.side-item {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-2); margin-bottom: 2px;
}
.side-item:hover { background: var(--gray-bg); text-decoration: none; color: var(--text); }
.side-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.side-item .need-admin { margin-left: auto; }
.side-content { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .side-layout { flex-direction: column; }
  .side-menu { width: 100%; position: static; }
}

/* style.css 只有 .justify-between,补充右对齐工具类 */
.justify-end { justify-content: flex-end; }
.mb-20 { margin-bottom: 20px; }

/* ============================================================
   概况 / 看板
   ============================================================ */

/* ---------- 可见性标记(当前恒为公开) ---------- */
.vis { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.vis-public { background: var(--blue-bg); color: var(--blue); }
.vis .ico { width: 12px; height: 12px; }

/* ---------- 区块标题 ---------- */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sec-head h2 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sec-sub { font-size: 12.5px; color: var(--text-3); font-weight: 400; }

/* ---------- 概况行卡片 ---------- */
.ov-list { display: flex; flex-direction: column; gap: 10px; }
.ov-row {
  display: flex; align-items: center; gap: 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow); color: var(--text);
}
.ov-row:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.ov-main { flex: 1; min-width: 0; }
.ov-title { font-size: 14px; font-weight: 600; }
.ov-meta { margin-top: 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); }
.ov-side { display: flex; align-items: center; gap: 10px; flex: none; }

/* ---------- 看板 ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 14px; max-height: 540px; }
.kb-col { background: var(--gray-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 0; overflow-y: auto; transition: border-color .15s, background .15s; }
.kb-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; font-weight: 600; position: sticky; top: -12px; background: var(--gray-bg); padding: 12px 2px 8px; z-index: 1; }
.kb-count { color: var(--text-3); font-weight: 400; font-size: 12px; }
.kb-head-link { color: inherit; font-weight: 600; }
.kb-head-link:hover { color: var(--primary); text-decoration: none; }
.kb-card {
  display: block; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 8px;
  color: var(--text); box-shadow: var(--shadow); cursor: grab;
}
.kb-card:last-child { margin-bottom: 0; }
.kb-card:hover { text-decoration: none; border-color: var(--primary); }
.kb-card.dragging { opacity: .4; }
.kb-col.drag-over { border-color: var(--primary); background: var(--primary-light); outline: 2px dashed var(--primary); outline-offset: -2px; }
/* 看板滚动条美化 */
.kb-col::-webkit-scrollbar { width: 6px; }
.kb-col::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.kb-title { font-size: 13.5px; font-weight: 600; line-height: 1.55; }
.kb-meta { margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, minmax(210px, 1fr)); } }

/* ---------- 切换按钮(全部事件 / 我处理的) ---------- */
.switch-tabs {
  display: inline-flex; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 3px; gap: 3px;
}
.switch-tabs a { padding: 6px 18px; border-radius: 5px; font-size: 13.5px; color: var(--text-2); }
.switch-tabs a:hover { text-decoration: none; color: var(--text); background: var(--gray-bg); }
.switch-tabs a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* ---------- 空状态 / 无权限 ---------- */
.empty-state { text-align: center; padding: 52px 0 44px; color: var(--text-3); }
.empty-state .ico-xl { width: 40px; height: 40px; color: var(--border-2); }
.empty-state .es-title { font-size: 15px; font-weight: 600; color: var(--text-2); margin-top: 14px; }
.empty-state .es-desc { font-size: 13px; margin-top: 6px; }
