/* ============ 设计变量 ============ */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --border: #e4e8f0;
  --border-strong: #cfd6e4;
  --text: #1d2330;
  --text-2: #5b6478;
  --text-3: #8b93a7;
  --primary: #378add;
  --primary-dark: #1f6fbe;
  --primary-soft: #e8f2fd;
  --danger: #e05252;
  --danger-soft: #fdeeee;
  --success: #1d9e75;
  /* 培训：固定黄色（不参与「绿 / 红」四色） */
  --amber-deep: #a8760a;
  --amber-line: #e0b64d;
  --amber-soft: #fff5da;
  /* 日程四色：自己涉及=深，仅其他领导=浅 */
  --green-deep: #14805e;
  --green-light: #8ecdb6;
  --red-deep: #c0332f;
  --red-light: #e8a3a0;
  --warning: #d9922b;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(29, 35, 48, .06);
  --shadow: 0 6px 20px rgba(29, 35, 48, .1);
  --shadow-lg: 0 18px 50px rgba(29, 35, 48, .18);
  --topbar-h: 58px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px; line-height: 1.6;
}
.hidden { display: none !important; }
.muted { color: var(--text-3); font-size: 12px; }
.spacer { flex: 1; }
.block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; margin-bottom: 14px; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.block-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.hint { color: var(--text-3); font-size: 12px; font-weight: 400; font-style: normal; margin-left: 6px; }
.note { color: var(--text-2); font-size: 12.5px; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 9px 11px; margin: 0 0 10px; }

/* ============ 登录 ============ */
.login-wrap { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: 22px; }
.login-card { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px 22px; }
.login-logo { width: 50px; height: 50px; border-radius: 14px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; margin-bottom: 14px; }
.login-title { margin: 0; font-size: 21px; font-weight: 650; }
.login-sub { margin: 2px 0 20px; color: var(--text-3); font-size: 13px; }
.login-err { color: var(--danger); font-size: 13px; margin: 10px 0 0; min-height: 19px; }

/* ============ 布局骨架 ============ */
.app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.brand-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.sync-dot.on { background: var(--success); box-shadow: 0 0 0 3px rgba(29, 158, 117, .18); }
.sync-dot.off { background: var(--danger); }

.content { flex: 1 1 auto; width: 100%; max-width: 1180px; margin: 0 auto; padding: 16px; padding-bottom: 90px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 19px; font-weight: 650; }
.page-actions { display: flex; gap: 8px; align-items: center; }

/* 交办待办栏目的三个子页签（交办 / 待办 / 日记）—— 跟标题同一行，所以不要 chip-row 的下边距 */
.sub-tabs { display: flex; gap: 6px; margin: 0; }
.sub-tabs .chip { padding: 4px 11px; font-size: 12.5px; }

/* 日记条目 */
.diary-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; background: var(--surface); }
.diary-item .d-date { font-size: 11.5px; color: var(--text-3); }
.diary-item .d-title { font-size: 14px; font-weight: 600; margin-top: 2px; }
.diary-item .d-notes { font-size: 12.5px; color: var(--text-2); margin-top: 4px; white-space: pre-wrap; }

/* 一行里既有芯片/标签又有搜索入口时：搜索固定在**最右端**（与 App 三栏的位置一致） */
.row-right { display: flex; align-items: center; gap: 8px; }
.row-with-search { display: flex; align-items: flex-start; gap: 8px; }
.row-with-search .chip-row { flex: 1; }

/* 顶部横向栏目：桌面端显示，手机端隐藏（手机用下面的底部导航） */
.top-nav { display: none; }
.bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: var(--safe-bottom); }
.nav-item { flex: 1; border: 0; background: none; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--text-3); font-size: 11px; cursor: pointer; font-family: inherit; }
.nav-item .nav-ico { font-size: 17px; line-height: 1; }
.nav-item.active { color: var(--primary); font-weight: 600; }

/* ============ 通用控件 ============ */
.btn {
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 8px 14px; font-size: 13.5px; font-family: inherit; cursor: pointer; transition: .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.ghost { border-color: transparent; background: var(--surface-2); }
.btn.danger { color: var(--danger); border-color: #f0c9c9; }
.btn.danger.ghost { border-color: transparent; background: var(--danger-soft); }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.btn.block { width: 100%; padding: 11px; font-size: 15px; }
.icon-btn { border: 0; background: none; font-size: 19px; color: var(--text-2); cursor: pointer; width: 32px; height: 32px; border-radius: 9px; line-height: 1; }
.icon-btn:hover { background: var(--surface-2); color: var(--primary); }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 11px;
  font-size: 14px; font-family: inherit; background: var(--surface); color: var(--text);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.field textarea { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.form-err { color: var(--danger); font-size: 13px; font-weight: 600; margin: 4px 0 0; }
/* 有内容时做成醒目的红条；没内容时完全不占位（用户要求：失败原因要看得见） */
.form-err:not(:empty) {
  margin: 10px 12px 0;
  padding: 8px 10px;
  background: #fdecec;
  border: 1px solid #f3c6c6;
  border-radius: 8px;
  line-height: 1.45;
}
.kv { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--text-2); }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 14px; }
.settings-row:last-child { border-bottom: 0; }
.settings-row.danger { color: var(--danger); }
.settings-row .arrow { color: var(--text-3); }

/* ============ 领导标签 ============ */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong);
  background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; font-family: inherit; color: var(--text-2);
}
.chip .cdot { width: 8px; height: 8px; border-radius: 50%; }
.chip.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }

/* ============ 日历 ============ */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 16px; font-weight: 650; min-width: 128px; text-align: center; }
.view-switch { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.view-switch button { border: 0; background: none; padding: 5px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--text-2); font-family: inherit; }
.view-switch button.active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-sm); }

.wk-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.wk-head span { text-align: center; font-size: 12px; color: var(--text-3); }
.wk-head span.we { color: var(--warning); }

.cal-month { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; }
.m-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.m-cell { min-height: 96px; border: 1px solid var(--border); border-radius: 10px; padding: 5px 6px; background: var(--surface); cursor: pointer; overflow: hidden; }
.m-cell:hover { border-color: var(--primary); }
.m-cell.out { background: var(--surface-2); opacity: .55; }
.m-cell.today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.m-day { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 3px; }
.m-cell.today .m-day { color: var(--primary); }
.m-item { font-size: 11px; line-height: 1.45; padding: 1px 4px; margin-bottom: 2px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 2.5px solid var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.m-item.todo { background: #fdf6e8; border-left-color: var(--warning); color: #8a6420; }
.m-more { font-size: 10.5px; color: var(--text-3); padding-left: 4px; }

.cal-week { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; }
.w-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.w-col { border: 1px solid var(--border); border-radius: 10px; padding: 6px; min-height: 220px; }
.w-col.today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.w-col-head { text-align: center; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--border); padding-bottom: 5px; margin-bottom: 6px; }
.w-col-head b { display: block; font-size: 15px; color: var(--text); }
.w-col.today .w-col-head b { color: var(--primary); }
.w-item { font-size: 11.5px; line-height: 1.4; border-radius: 6px; padding: 3px 5px; margin-bottom: 4px; background: var(--primary-soft); color: var(--primary-dark); cursor: pointer; border-left: 2.5px solid var(--primary); }
.w-item.todo { background: #fdf6e8; color: #8a6420; border-left-color: var(--warning); }
.w-item .t { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-empty { color: var(--text-3); font-size: 11px; text-align: center; padding-top: 8px; }

.cal-day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 12px; }
.d-timeline { position: relative; }
.d-row { display: grid; grid-template-columns: 58px 1fr; gap: 10px; min-height: 44px; }
.d-hour { font-size: 11.5px; color: var(--text-3); text-align: right; padding-top: 2px; }
.d-slot { border-top: 1px solid var(--border); padding: 3px 0; }
.d-event { border-radius: 9px; padding: 7px 10px; margin-bottom: 5px; background: var(--primary-soft); border-left: 3px solid var(--primary); cursor: pointer; }
.d-event .et { font-weight: 600; font-size: 13.5px; }
.d-event .em { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.d-all { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }

.cal-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.y-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.y-title { font-size: 13px; font-weight: 600; margin-bottom: 6px; text-align: center; color: var(--text-2); cursor: pointer; }
.y-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.y-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 10.5px; color: var(--text-2); border-radius: 4px; position: relative; cursor: pointer; }
.y-cell.out { color: #c3c9d6; }
.y-cell.today { background: var(--primary); color: #fff; font-weight: 600; }
.y-cell.has { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.y-cell.has.today { background: var(--primary); color: #fff; }
.y-cell .mk { position: absolute; bottom: 1px; width: 3px; height: 3px; border-radius: 50%; background: var(--warning); }

/* ============ 列表项 ============ */
.list { display: flex; flex-direction: column; gap: 8px; }
.empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 18px 0; }
.ev-card { display: flex; gap: 11px; padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: .15s; }
.ev-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.ev-time { flex: 0 0 62px; text-align: right; }
.ev-time b { display: block; font-size: 13.5px; }
.ev-time span { font-size: 11.5px; color: var(--text-3); }
/* 「我的闹钟」小标（v3.1.7）：在时间区域下方，只有设置者自己看得到 */
.ev-alarm { display: block; margin-top: 2px; font-size: 11px; font-style: normal; color: var(--primary); white-space: nowrap; }
.ev-bar { width: 3px; border-radius: 3px; background: var(--primary); flex: 0 0 3px; }
/* 日程色条：状态 × 是否与自己有关（深/浅） */
.ev-bar.planned.deep { background: var(--green-deep); }
.ev-bar.planned.light { background: var(--green-light); }
.ev-bar.confirmed.deep { background: var(--red-deep); }
.ev-bar.confirmed.light { background: var(--red-light); }
.ev-main { flex: 1; min-width: 0; }
.ev-title { font-weight: 600; font-size: 14px; line-height: 1.45; word-break: break-word; }
.ev-meta { font-size: 12.5px; color: var(--text-2); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.tag.vip { background: var(--danger-soft); color: var(--danger); border-color: #f3d3d3; }
.tag.important { background: #fdf6e8; color: #9a6a12; border-color: #f0e0bd; }
.tag.mine { background: var(--primary-soft); color: var(--primary-dark); border-color: #cfe4fa; }
.tag.done { background: #e9f7f1; color: var(--success); border-color: #c8e9dc; }
.tag.warn { background: #fdf6e8; color: #9a6a12; border-color: #f0e0bd; }
.who { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); }
.who i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.todo-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.todo-item.done { opacity: .6; }
.todo-item.overdue { border-color: #f0c9c9; background: #fffafa; }
.cbox { width: 19px; height: 19px; border: 1.5px solid var(--border-strong); border-radius: 6px; flex: 0 0 19px; margin-top: 2px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; }
.cbox.on { background: var(--success); border-color: var(--success); }
.todo-main { flex: 1; min-width: 0; cursor: pointer; }
.todo-title { font-size: 14px; }
.todo-item.done .todo-title { text-decoration: line-through; }
.todo-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }

.leader-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.leader-row:hover { border-color: var(--primary); }
.l-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; }
.l-name { font-weight: 600; font-size: 14px; }
.l-meta { font-size: 12px; color: var(--text-3); }

/* ============ 弹窗 ============ */
.modal { position: fixed; inset: 0; background: rgba(20, 26, 38, .45); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-card { background: var(--surface); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-card.sm { max-width: 420px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.modal-body { padding: 16px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 9px; padding: 12px 16px; border-top: 1px solid var(--border); }

.pick-list { display: flex; flex-wrap: wrap; gap: 7px; border: 1px solid var(--border); border-radius: var(--radius); padding: 9px; background: var(--surface-2); }
.pick { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer; }
.pick.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.pick .cdot { width: 8px; height: 8px; border-radius: 50%; }
.pick-group { width: 100%; font-size: 11.5px; color: var(--text-3); margin: 2px 0 -2px; }

.remind-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 11px; margin-bottom: 12px; }
.switch-row { display: flex; align-items: center; gap: 9px; cursor: pointer; margin-bottom: 9px; }
.switch-row input { width: 17px; height: 17px; accent-color: var(--primary); }
.switch-row span { font-size: 13.5px; }
.switch-row i { display: block; font-size: 11.5px; color: var(--text-3); font-style: normal; }

/* ============ 提示 ============ */
.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: rgba(29, 35, 48, .92); color: #fff; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; box-shadow: var(--shadow); animation: tin .2s ease; }
.toast.err { background: rgba(197, 55, 55, .95); }
.toast.ok { background: rgba(22, 130, 96, .95); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============ 桌面端：栏目在顶部 ============ */
@media (min-width: 900px) {
  /* 顶部栏目用普通文档流即可可靠吸顶。
     之前是「flex 换行 + 168px 左栏」，改成横向后 flex-wrap 下容易出怪问题，故改回 block。 */
  .app { display: block; }
  .top-nav {
    display: block; position: sticky; top: var(--topbar-h); z-index: 25;
    background: var(--surface); border-bottom: 1px solid var(--border);
  }
  /* 内层与 .content 一样 1180px 居中，否则栏目会贴屏幕最左、与内容左边缘错开 */
  .top-nav-inner {
    max-width: 1180px; margin: 0 auto; padding: 0 16px;
    display: flex; flex-direction: row; align-items: center; gap: 2px;
  }
  .top-nav .nav-item {
    flex: 0 0 auto; flex-direction: row; gap: 7px; font-size: 14px; white-space: nowrap;
    padding: 12px 15px; border-radius: 0; border-bottom: 2px solid transparent;
    justify-content: flex-start; color: var(--text-2);
  }
  .top-nav .nav-item:hover { color: var(--text); background: var(--surface-2); }
  .top-nav .nav-item.active { color: var(--primary); border-bottom-color: var(--primary); background: none; }
  .top-nav .nav-item .nav-ico { font-size: 15px; }
  .content { padding-bottom: 40px; }
  .bottom-nav { display: none; }
  .toast-wrap { bottom: 32px; }
  .m-cell { min-height: 112px; }
}

@media (max-width: 640px) {
  .content { padding: 12px; padding-bottom: 90px; }
  .m-cell { min-height: 74px; padding: 4px; }
  .m-item { font-size: 10px; }
  .cal-year { grid-template-columns: 1fr 1fr; }
  .w-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .w-col { padding: 4px; }
  .w-item { font-size: 10.5px; }
}

/* ============ 备案号页脚（设置 ICP_LICENSE 后由服务端注入） ============ */
.icp-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 5px 10px calc(5px + var(--safe-bottom)); text-align: center; font-size: 11px; line-height: 1.4; background: rgba(255, 255, 255, .94); border-top: 1px solid var(--border); }
.icp-footer a { color: var(--text-3); text-decoration: none; }
.icp-footer a:hover { color: var(--primary); text-decoration: underline; }
body.has-icp .content { padding-bottom: 104px; }
@media (max-width: 899px) { body.has-icp .bottom-nav { bottom: 26px; } body.has-icp .content { padding-bottom: 130px; } }
/* 桌面端没有底部导航，备案条只占底部一条，留 56px 就够（否则会多出一大块空白） */
@media (min-width: 900px) { body.has-icp .content { padding-bottom: 56px; } }

/* ============ 附件（PDF） ============ */
.file-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-hint { font-size: 11.5px; color: var(--text-3); }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.file-chip {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2);
  font-size: 13px; cursor: pointer; transition: .15s;
}
.file-chip:hover { border-color: var(--primary); background: var(--primary-soft); }
.file-chip .fi { flex: 0 0 18px; font-size: 14px; }
.file-chip .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--primary-dark); }
.file-chip .fs { font-size: 11.5px; color: var(--text-3); }
.file-chip .fx {
  flex: 0 0 20px; text-align: center; color: var(--text-3); border-radius: 50%;
  font-size: 13px; line-height: 20px;
}
.file-chip .fx:hover { background: var(--danger-soft); color: var(--danger); }
.file-chip.plain { cursor: default; background: transparent; border-style: dashed; }
.file-empty { font-size: 12px; color: var(--text-3); }

/* 卡片里的附件按钮 */
.ev-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.ev-file {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark);
  border: 1px solid #cfe4fa; cursor: pointer;
}
.ev-file:hover { background: #dcebfb; }
.ev-file .fn { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-loc { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); }

/* ============ 按日期分组的列表 ============ */
.date-sep {
  display: flex; align-items: center; gap: 9px;
  margin: 14px 0 7px; font-size: 12.5px; color: var(--text-2);
}
.date-sep:first-child { margin-top: 2px; }
.date-sep .d { font-weight: 650; color: var(--text); font-size: 13px; }
.date-sep .wd { color: var(--text-3); }
.date-sep .line { flex: 1; height: 1px; background: var(--border); }
.date-sep.today .d { color: var(--primary); }
.date-sep.today .badge-today {
  font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #cfe4fa;
}
.date-sep.past { opacity: .62; }
.date-sep .n { font-size: 11.5px; color: var(--text-3); }

/* ============ 设置区（竖排字段） ============ */
.settings-col { display: flex; flex-direction: column; gap: 2px; }
.settings-col .field { margin-bottom: 6px; }

/* PDF 小标签（附件按钮上的标识，纯文字不用图标） */
.file-chip .ft,
.ev-file .ft {
  flex: 0 0 auto; font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
  padding: 1px 4px; border-radius: 4px; background: var(--surface);
  color: var(--primary-dark); border: 1px solid #cfe4fa;
}
.ev-file .ft { background: #fff; }

/* ============ 账号与权限 ============ */
.mv {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-left: 4px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface-2);
  color: var(--text-2); font-size: 12px; cursor: pointer; user-select: none;
}
.mv:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.mv.del:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.row-inline { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.row-inline input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--text-1); }
.cbox.ro { opacity: .5; cursor: default; }
.settings-col .field .hint { display: block; font-style: normal; }
#ac-perms-box { border-top: 1px dashed var(--border); padding-top: 10px; margin-bottom: 6px; }

/* ============ 账号密码展示（只显示一次） ============ */
.sp-pwd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px; letter-spacing: .5px; user-select: all;
  background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: 8px; padding: 3px 9px;
}

/* ============ 领导序号（设置页「所有领导」列表） ============ */
.l-sort {
  flex: 0 0 auto; min-width: 28px; text-align: center;
  font-size: 12px; font-variant-numeric: tabular-nums;
  color: var(--text-3); padding: 2px 6px; margin-right: 8px;
  border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border);
}
/* 选择领导时按钮上的序号，方便按序号对号入座 */
.pk-sort { font-size: 10px; color: var(--text-3); margin-left: 3px; }
.pick.on .pk-sort { color: var(--primary-dark); }

/* ============ 日程提醒（只有秘书账号看得到） ============ */
.remind-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.remind-date {
  font: inherit; font-size: 13.5px; padding: 7px 9px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
}
/* 「复制内容」推到最右，和日期选择拉开距离 */
.remind-bar .btn.primary { margin-left: auto; }
.remind-out {
  margin: 0; padding: 11px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: inherit; font-size: 13.5px; line-height: 1.8; color: var(--text);
  white-space: pre-wrap; word-break: break-word; cursor: text;
  max-height: 320px; overflow: auto;
}
.remind-out::selection { background: var(--primary-soft); }

/* ============ 日程颜色：状态 × 是否与自己有关（全平台统一） ============
   预安排 = 绿、确定安排 = 红；「自己涉及」（关联领导里有我的领导）= 深色，其余 = 浅色。
   日历里的条目和列表页卡片左侧的色条都用这一套。 */
.m-item.planned.deep, .w-item.planned.deep, .d-event.planned.deep {
  background: #dff2ea; border-left-color: var(--green-deep); color: #0d5c42;
}
.m-item.planned.light, .w-item.planned.light, .d-event.planned.light {
  background: #f2f9f5; border-left-color: var(--green-light); color: #3f6f5d;
}
.m-item.confirmed.deep, .w-item.confirmed.deep, .d-event.confirmed.deep {
  background: #fbe4e3; border-left-color: var(--red-deep); color: #8e2a27;
}
.m-item.confirmed.light, .w-item.confirmed.light, .d-event.confirmed.light {
  background: #fdf3f2; border-left-color: var(--red-light); color: #966361;
}

/* 事项条目里的「参加领导」小字（缩写）与地点行 */
.w-item .who { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 400; }
.w-item .loc { display: block; font-size: 10px; color: var(--text-3); }
/* 日历里的名称要完整显示，允许折行（原来是一行截断） */
.w-item .t { white-space: normal; overflow: visible; text-overflow: clip; }
.d-event .et { white-space: normal; }
/* 用车情况：小字 */
.ev-car { color: var(--text-2); background: var(--surface-2); border: 1px dashed var(--border-strong);
  border-radius: 6px; padding: 1px 7px; }
/* 卡片里的一行（参会领导 / 主要内容 / 地点 / 用车情况） */
.ev-line { font-size: 12.5px; color: var(--text-2); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap;
  /* 主要内容里常写编号（1.
2.），保留换行才看得清 */
  white-space: pre-wrap; }
.ev-line .who { font-size: 12.5px; }

/* ============ 培训：固定黄色、极简显示 ============
   培训不涉及实际工作，所以既不算「预安排」也不算「确定安排」，
   也不区分「是否自己涉及」—— 三个栏目里都用这一种黄。 */
.m-item.training, .w-item.training, .d-event.training {
  background: var(--amber-soft); border-left-color: var(--amber-line); color: var(--amber-deep);
}
.w-item.training .t, .d-event.training .et { font-weight: 600; }
.ev-bar.training { background: var(--amber-line); }
.ev-card.training { background: #fffdf6; border-color: #efe2c0; }
.ev-card.training .ev-title { color: var(--amber-deep); }
.ev-card.training .ev-time b { color: var(--amber-deep); }

/* ============ 私人行程（importance = private，v2.9.3） ============
   内容只有领导本人与其秘书看得到（服务端按账号剥离内容后再下发）。
   处室与超管只拿到一个「私人行程」占位卡片 —— 所以这里用中性灰，不参与绿/红四色。
   日历与「所有领导」两个栏目对任何人都不显示这一条（前端直接过滤掉）。 */
.ev-card.private { background: #f6f7fa; border-color: #dfe2ea; }
.ev-card.private .ev-title { color: #5b6478; font-weight: 600; }
.ev-card.private .ev-time b { color: #5b6478; }
.ev-bar.private { background: #9aa2b4; }
.ev-line.private-note { font-size: 11.5px; color: var(--text-3); }

/* 标题后的小标签：「私人」/「可能调整」/「上午办公·下午办公」 */
.tag.private { background: #f3edfd; color: #6b4bc4; border-color: #e2d6f8; }
.tag.maybe { background: #fff8e8; color: #9a6a12; border-color: #f0e0bd; }
/* 注：「办公情况」不挂标签（用户 2026-09-19 要求）—— 它直接写进事项名称里 */
/* 「我的」页里给直接服务的领导打的标签 */
.tag.serve { background: var(--primary-soft); color: var(--primary-dark); border-color: #cfe4fa; }

/* ============ 请假（v12） ============
   一条日程被标记成「领导这段时间请假」之后：
     · **不删除**，卡片照旧留在列表与日历里
     · 统一走**灰色** —— 不看状态（绿/红）、也不分深浅（自己涉及/仅关联），
       请假就是请假，压过其它一切配色
     · 服务端已经把它排除在冲突判定之外，所以卡片上不会再出现「有行程冲突」那行
   ⚠️ 这几条必须排在 .training / .private 之后：同样特异度下「后写的赢」，
      放在后面才能保证「请假的培训」也变灰。 */
.m-item.leave, .w-item.leave, .d-event.leave {
  background: #f3f4f7; border-left-color: #b6bcc9; color: #6b7280;
}
.ev-bar.leave { background: #b6bcc9; }
.ev-card.leave { background: #f7f8fa; border-color: #e2e5ec; }
.ev-card.leave .ev-title { color: #6b7280; }
.ev-card.leave .ev-time b { color: #6b7280; }
.tag.leave { background: #eef0f4; color: #5b6478; border-color: #d9dde6; }
/* v13：只有**一部分**关联领导请假时的标签「XX已请假」。
   与上面的 .tag.leave 分开配色，是为了和「整条日程就是请假」区分开 ——
   这时卡片**不变灰**（日程对没请假的那位领导依然有效），
   所以标签用琥珀色表示「注意：有位领导不在」，而不是灰色表示「作废」。
   （用户 2026-09-23 定的口径，只用在「我的领导」栏目。） */
.tag.leaveother { background: #fff8e8; color: #9a6a12; border-color: #f0e0bd; }

/* 长按卡片弹菜单：关掉 iOS 的长按放大镜/呼出菜单，否则会和长按手势打架。
   注意只关 callout，**不关 user-select** —— 不然卡片里的文字就没法选中复制了。 */
#page-agenda [data-evid] { -webkit-touch-callout: none; }

/* 长按菜单（modal-evactions）里的动作按钮 */
.eva-sub { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.eva-actions { display: flex; flex-direction: column; gap: 8px; }
.eva-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; padding: 11px 13px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  font: inherit; color: var(--text-1); transition: .15s;
}
.eva-btn:hover { border-color: var(--primary); background: var(--surface-2); }
.eva-btn .l { font-size: 14px; font-weight: 600; }
.eva-btn .h { font-size: 11.5px; color: var(--text-3); }
.eva-btn.leave { border-color: #d9dde6; background: #f7f8fa; }
.eva-btn.unleave { border-color: #d9dde6; background: #f7f8fa; }
.eva-btn.delete { color: var(--danger); border-color: #f0d5d5; }
.eva-btn.delete:hover { background: var(--danger-soft); border-color: var(--danger); }

/* ============ 搜索窗口（v2.9.9，三个栏目共用） ============ */
.search-overlay {
  position: fixed; inset: 0; z-index: 60; background: rgba(23, 31, 43, .32);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 14px 14px;
}
.search-card {
  width: 100%; max-width: 620px; max-height: 84vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
}
.search-head { display: flex; gap: 8px; padding: 12px 14px 0; }
.search-head input {
  flex: 1; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px;
  font-size: 14.5px; font-family: inherit; background: var(--surface); color: var(--text);
}
.search-head input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.search-hint { margin: 8px 14px 0; color: var(--text-3); font-size: 12px; }
.search-results { padding: 10px 14px 14px; overflow: auto; display: flex; flex-direction: column; gap: 7px; }
.search-results .empty { color: var(--text-3); font-size: 13px; padding: 18px 0; text-align: center; }
.sr-item {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 11px;
  cursor: pointer; background: var(--surface);
}
.sr-item:hover { border-color: var(--primary); background: var(--surface-2); }
.sr-title { font-size: 14px; font-weight: 600; }
.sr-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.sr-loc { font-size: 12px; color: var(--text-2); margin-top: 2px; }
/* 「另有 N 条相同记录」：同一条日程被重复创建过，搜索结果合并成一条后给的提示 */
.sr-dup { font-size: 11px; color: var(--warn, #B26A00); margin-top: 3px; }

/* ============ 交办待办（v2.9.9） ============ */
.assign-item {
  display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px; background: var(--surface);
}
.assign-item.done .assign-title { text-decoration: line-through; color: var(--text-3); }
.assign-item.overdue { border-color: #f3c6c6; background: #fffafa; }
.assign-main { flex: 1; }
.assign-title { font-size: 14px; font-weight: 600; }
.assign-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.assign-notes { font-size: 12.5px; color: var(--text-2); margin-top: 4px; white-space: pre-wrap; }

/* ============ 专题（v2.9.12） ============ */
.topic-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); overflow: hidden;
}
.topic-item + .topic-item { margin-top: 8px; }
.topic-item.done { background: var(--surface-2); }
.topic-head { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; cursor: pointer; }
.topic-head:hover { background: var(--surface-2); }
.topic-item .t-caret { color: var(--text-3); font-size: 12px; line-height: 20px; }
.topic-item .t-main { flex: 1; }
.topic-item .t-title { font-size: 14.5px; font-weight: 600; }
.topic-item.done .t-title { color: var(--text-2); }
.topic-item .t-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.topic-item .t-body { border-top: 1px dashed var(--border); padding: 10px 12px 12px; }
.topic-item .t-summary { font-size: 12.5px; color: var(--text-2); margin: 0 0 10px; white-space: pre-wrap; }
.topic-item .t-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.topic-item .t-foot .muted { font-size: 12px; }

/* 进展时间轴：左边日期 + 一条竖线，右边内容 */
.t-timeline { position: relative; margin-left: 4px; }
.tl-item { display: flex; gap: 10px; align-items: stretch; }
.tl-date { width: 42px; flex: none; font-size: 11.5px; color: var(--text-3); padding-top: 9px; }
.tl-line { width: 10px; flex: none; position: relative; }
.tl-line::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.tl-item:first-child .tl-line::before { top: 14px; }
.tl-item:last-child .tl-line::before { bottom: auto; height: 14px; }
.tl-dot {
  position: absolute; left: 0; top: 12px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
}
.tl-body { flex: 1; padding: 8px 0 12px; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-head b { font-size: 13.5px; }
.tl-head .tl-by { font-size: 11.5px; color: var(--text-3); margin-left: auto; }
.tl-text { font-size: 13px; color: var(--text); margin-top: 4px; white-space: pre-wrap; }
.tl-ref {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px;
  background: var(--surface-2); color: var(--text-2);
}
.tl-ref[data-topicrefevent], .tl-ref[data-topicreftodo] { cursor: pointer; }
.tl-ref[data-topicrefevent]:hover, .tl-ref[data-topicreftodo]:hover { border-color: var(--primary); color: var(--primary-dark); }
.tl-ref.gone { border-style: dashed; }
.tl-actions { display: flex; gap: 6px; margin-top: 6px; opacity: .75; }
.tl-actions:hover { opacity: 1; }

/* 引用选择器里的候选行 */
.tref-picked { flex: 1; font-size: 13px; color: var(--text-2); }
.tref-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px;
  background: var(--surface); cursor: pointer;
}
.tref-item + .tref-item { margin-top: 6px; }
.tref-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.tref-item .tref-title { font-size: 13.5px; font-weight: 600; }
.tref-item .tref-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
/* 类型筛选 chips（全部 / 日程 / 待办 / 交办 / 日记）+ 条数 */
.tref-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tref-kinds .chip { padding: 3px 10px; font-size: 12.5px; }
.tref-kinds .chip i { font-style: normal; color: var(--text-3); margin-left: 3px; }
.tref-kinds .chip.active i { color: var(--primary-dark); }
.tref-kind-tag {
  display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3);
  margin-right: 6px; vertical-align: 1px;
}
.tag.doing { background: var(--primary-soft); color: var(--primary-dark); border-color: #cfe3f8; }
.tag.done { background: var(--surface-2); color: var(--text-3); border-color: var(--border); }

/* 行程冲突提示：只在第二个栏目（我的领导 / 我的行程）出现，日历与「所有领导」不显示 */
.ev-line.conflict { font-size: 12px; color: #b06a12; font-weight: 600; }

/* ============ 日程导入（v2.10，仅网页端） ============ */
/* 确认表格有 11 列，宽度不够就在卡片里横向滚动，不要挤压单元格 */
.modal-card.wide { max-width: 1240px; }
.imp-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.imp-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: auto; max-height: 56vh; background: var(--surface); }
.imp-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.imp-table thead th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2);
  text-align: left; font-weight: 600; font-size: 12.5px; color: var(--text-2);
  padding: 8px 7px; border-bottom: 1px solid var(--border-strong); white-space: nowrap;
}
.imp-table td { padding: 6px 7px; border-bottom: 1px solid var(--border); vertical-align: top; }
.imp-table tr.imp-off td { opacity: .45; }
.imp-table tr.imp-bad td { background: var(--danger-soft); }
.imp-table tr.imp-pickrow td { background: var(--surface-2); border-bottom: 1px solid var(--border-strong); }
.imp-table .imp-c-pick, .imp-table .imp-c-alarm { width: 42px; text-align: center; }
.imp-table .imp-c-title { min-width: 230px; }
.imp-table .imp-c-time { min-width: 132px; }
.imp-table .imp-c-lead { min-width: 150px; }
.imp-table .imp-c-loc { min-width: 120px; }
.imp-table .imp-c-note { min-width: 150px; }
.imp-table .imp-c-sel { width: 92px; }
.imp-table input[type="text"], .imp-table input[type="date"], .imp-table input[type="time"],
.imp-table select, .imp-table textarea {
  font: inherit; font-size: 12.5px; width: 100%; padding: 4px 6px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
}
.imp-table input[type="date"], .imp-table input[type="time"] { padding: 3px 4px; }
.imp-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }
.imp-time-gap { height: 4px; }
.imp-src { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.imp-src b { color: var(--text-2); font-weight: 600; }
.imp-src.warn { color: #b06a12; }
/* 参加领导：小圆片 + 「＋调整」 */
.imp-lead-cell { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.imp-lead { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 7px; border-radius: 999px; background: var(--primary-soft); border: 1px solid #cfe3f8; color: var(--primary-dark); white-space: nowrap; }
.imp-lead .cdot { width: 7px; height: 7px; border-radius: 50%; }
.imp-lead .x { cursor: pointer; color: var(--text-3); font-size: 12px; }
.imp-lead .x:hover { color: var(--danger); }
.imp-lead-none { color: var(--danger); font-size: 12px; }
.imp-more { font-size: 12px; padding: 1px 7px; border-radius: 999px; border: 1px dashed var(--border-strong); background: none; color: var(--text-2); cursor: pointer; }
.imp-more:hover { border-color: var(--primary); color: var(--primary); }
/* v3.1.0 直属领导参加勾选 */
.imp-mine { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); margin-bottom: 4px; cursor: pointer; white-space: nowrap; }
.imp-mine input { margin: 0; }
.imp-mine b { color: var(--text-1); font-weight: 600; }
.imp-picklist { display: flex; flex-wrap: wrap; gap: 6px; }
.imp-office-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-deep); border: 1px solid var(--amber-line); margin-top: 3px; }

/* ============ 专题进展 v3.2.0：类型 / 附件 / 组织架构 ============ */
/* 六类进展类型：给不同色，一眼分得出「会议」和「机制」 */
.tag.tu-ptype { font-weight: 600; }
.tu-ptype.p-jieqia { background: #e9f3ff; color: #1f6fbe; border-color: #cfe4fa; }
.tu-ptype.p-huiyi { background: #eaf6ef; color: #1d7a52; border-color: #c9e8d6; }
.tu-ptype.p-jizhi { background: #f3ecfd; color: #6a3fb5; border-color: #e0d3f7; }
.tu-ptype.p-jincheng { background: #eef1f6; color: #46536b; border-color: #dfe4ee; }
.tu-ptype.p-zongjie { background: #fff4e2; color: #a8760a; border-color: #f0dcb6; }
.tu-ptype.p-qita, .tu-ptype.p-none { background: #f2f3f6; color: #7b8397; border-color: #e2e5ec; }

/* 表单里的附件 */
.tu-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tu-files.hidden { display: none; }
.tu-file { padding-right: 6px; }
.tu-file-del {
  margin-left: 2px; width: 15px; height: 15px; line-height: 14px; text-align: center;
  border-radius: 50%; font-size: 10px; color: var(--text-3); background: #fff;
  border: 1px solid #cfe4fa;
}
.tu-file-del:hover { color: var(--danger); border-color: var(--danger); }

/* 智能提炼 */
.tu-ai { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin: 2px 0 10px; }
.tu-ai .muted { flex: 1 0 100%; line-height: 1.5; }
.tu-org-hint { font-size: 12px; color: var(--text-3); margin: 8px 0 6px; }
#tu-org-preview { margin-bottom: 10px; }

/* 时间轴上的「组织架构」 */
.tu-org { margin-top: 7px; }
.tu-org .btn { font-size: 12px; padding: 2px 9px; }
.tu-org .org-wrap { margin-top: 7px; }
.tu-org .org-wrap.hidden { display: none; }

/* 组织架构图：竖排缩进 + 左侧竖线（手机屏幕也能读，不画左右分支） */
.org-chart { display: flex; flex-direction: column; gap: 8px; }
.org-node {
  border-left: 2px solid var(--primary); padding: 6px 0 6px 10px;
  background: var(--surface-2); border-radius: 0 8px 8px 0;
}
.org-name {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 650; color: var(--text); margin-bottom: 4px;
}
/* v3.2.2：带下级的节点可单击折叠、长按全展开 */
.org-name[data-orgnode-toggle] { cursor: pointer; user-select: none; -webkit-user-select: none; }
.org-caret { font-style: normal; flex: 0 0 12px; font-size: 11px; color: var(--text-3); text-align: center; }
.org-name-text { flex: 1; }
.org-kids { font-style: normal; font-size: 11px; color: var(--text-3); }
.org-node.collapsed > .org-children { display: none; }
.org-tip { font-size: 11px; color: var(--text-3); margin: 0 0 6px; }
.org-role { display: flex; gap: 7px; font-size: 12px; line-height: 1.75; align-items: flex-start; }
.org-role-name { flex: 0 0 44px; color: var(--text-3); font-size: 11.5px; }
.org-people { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.org-person { color: var(--text); }
.org-person i { font-style: normal; color: var(--text-3); font-size: 11px; margin-left: 3px; }
.org-person em { font-style: normal; color: var(--primary-dark); font-size: 11px; margin-left: 4px; }
.org-duty {
  font-size: 11.5px; color: var(--text-2); margin-top: 4px; line-height: 1.6;
  /* v3.2.4：职责只是附带说明，最多两行 */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.org-children { margin-top: 7px; display: flex; flex-direction: column; gap: 6px; padding-left: 8px; }
.org-children .org-node { border-left-color: var(--border-strong); background: #fff; }

/* ============ v3.2.5：专题共享（只读）与「过往」 ============ */
.tag.tag-shared { background: #f3ecfd; color: #6a3fb5; border-color: #e0d3f7; }
.share-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 4px; border-bottom: 1px dashed var(--border); cursor: pointer;
}
.share-item:last-child { border-bottom: 0; }
.share-item input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.share-name { font-size: 13.5px; color: var(--text); }
.share-user { font-size: 11.5px; color: var(--text-3); }
.share-role {
  margin-left: auto; font-size: 11px; padding: 1px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}

/* ============ v3.3.0：工具入口列表 / 加班 ============ */
.tool-list { display: flex; flex-direction: column; gap: 8px; }
.tool-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 14px; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.tool-item:hover { border-color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.tool-ico {
  flex: 0 0 34px; height: 34px; line-height: 34px; text-align: center;
  border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark);
  font-size: 16px;
}
.tool-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tool-main b { font-size: 14.5px; font-weight: 650; color: var(--text); }
.tool-main i { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.tool-meta { flex: 0 0 auto; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.tool-meta em { font-style: normal; margin-left: 6px; color: var(--text-3); font-size: 15px; }

/* 加班 */
.ot-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ot-month {
  height: 32px; padding: 0 8px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13px;
}
.ot-sum { font-size: 12.5px; color: var(--primary-dark); font-weight: 600; }
.ot-hours { display: flex; gap: 8px; }
.ot-hours .chip.disabled { opacity: .42; cursor: not-allowed; }
/* 加班人员（v3.3.4）：秘书在「本人 / 直属领导」之间切换；一个人时整行不显示 */
.ot-persons { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ot-persons .chip { padding: 4px 11px; font-size: 12.5px; }
.ot-person-tag {
  font-style: normal; font-size: 10.5px; line-height: 1.6; padding: 0 5px; margin-right: 5px;
  border-radius: 4px; background: var(--primary-soft); color: var(--primary-dark);
}
.ot-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 2px; border-bottom: 1px dashed var(--border);
}
.ot-item:last-child { border-bottom: 0; }
.ot-date { flex: 0 0 48px; text-align: center; }
.ot-date b { display: block; font-size: 13px; color: var(--text); font-weight: 650; }
.ot-date i { font-style: normal; display: block; margin-top: 2px; font-size: 10.5px; color: var(--text-3); }
/* 加班页的说明与弹窗提示用纯文字，不要 `.note` 的虚线框（那是给整块提示用的） */
#desk-ot-block .note, #ot-hint {
  background: none; border: 0; padding: 0; margin: 6px 0 0; color: var(--text-3); font-size: 11.5px;
}
#desk-ot-block .note b { color: var(--text-2); }
.ot-main { flex: 1; min-width: 0; }
.ot-main b { display: block; font-size: 13.5px; color: var(--text); font-weight: 500; line-height: 1.5; }
.ot-main span { font-size: 11.5px; color: var(--text-3); }

/* 从日程导入 */
.ot-pick-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ot-pick-list { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.ot-cand {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-bottom: 1px dashed var(--border); cursor: pointer;
}
.ot-cand:last-child { border-bottom: 0; }
.ot-cand input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.ot-cand.trip { background: #faf7f7; cursor: not-allowed; }
.otc-date { flex: 0 0 52px; font-size: 12px; color: var(--text-2); }
.otc-date i { font-style: normal; display: block; font-size: 10px; color: var(--text-3); }
.otc-title { flex: 1; min-width: 0; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.otc-title em { font-style: normal; margin-left: 6px; font-size: 10.5px; color: var(--primary-dark); }
.otc-meta { flex: 0 0 auto; font-size: 11.5px; color: var(--text-3); }
.ot-cand.trip .otc-meta { color: var(--danger); }
