[hidden] { display: none !important; }
nav { display:flex; align-items:center; gap:18px; }
nav a, nav button { border:0; padding:5px 0; color:#364052; background:transparent; font-size:14px; }
nav button[aria-current="page"] { color:var(--blue); border-bottom:2px solid var(--blue); }
#username { color:var(--muted); font-size:13px; }
#logout { border:1px solid var(--line); border-radius:8px; padding:7px 11px; color:var(--blue); }
#signin { max-width:500px; }
#signin form, #model-form { margin-top:20px; display:grid; gap:14px; }
#history { list-style:none; margin:18px 0 0; padding:0; }
#history button { border:0; background:transparent; text-align:left; width:100%; padding:9px; border-radius:8px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#history button:hover, #history button[aria-current="true"] { background:#e9edf4; }
#conversation { height:calc(100dvh - 65px); display:flex; flex-direction:column; padding-top:16px; padding-bottom:22px; }
#messages { flex:1; overflow:auto; display:flex; flex-direction:column; gap:20px; padding:12px 4px 24px; }
.message { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.65; margin:0; }
.message.user { align-self:flex-end; padding:10px 15px; border-radius:16px; background:#eaf0fc; max-width:85%; }
#composer { border-radius:22px; padding:12px 16px; box-shadow:0 4px 18px #233b6910; }
#composer textarea { border:0; margin:0; resize:vertical; }
.compose-actions { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:8px; }
.compose-actions button { border-radius:50%; width:38px; height:38px; padding:0; }
select { font:inherit; color:inherit; padding:7px; background:white; border:1px solid var(--line); border-radius:7px; max-width:100%; }
#model-form select { display:block; margin-top:7px; }
#model-form .actions { gap:12px; }
#notice { position:fixed; bottom:12px; right:12px; max-width:calc(100% - 24px); margin:0; background:#25344b; color:white; border-radius:8px; padding:9px 14px; }
@media(max-width:650px) {
  nav { gap:8px; }
  #username { display:none; }
  #history { max-height:105px; overflow:auto; }
  #conversation { height: calc(100dvh - 65px); }
}
#settings-page { width: 100%; max-width: 1220px; padding-inline: clamp(16px, 3vw, 36px); color: #20382f; }
body:has(#settings-page:not([hidden])) #workspace { background: #f7f9f7; }
body:has(#settings-page:not([hidden])) #workspace aside { display: none; }
body:has(#settings-page:not([hidden])) #workspace { grid-template-columns: 1fr; }
#model-cards { display: grid; gap: 16px; }
#model-cards form { background: #fff; border: 1px solid #d5e3db; border-radius: 12px; padding: 19px; display: grid; gap: 10px; }
#model-cards h2 { margin: 0 0 5px; }
#model-cards label { font-weight: 400; }
#model-cards select { width: 100%; display: block; margin-top: 6px; }
#model-cards input, #model-cards select { border-color: #d5e3db; }
#model-cards .primary { justify-self: start; background: #20513f; }
.model-example { margin: 0; font-size: 14px; color: #49685c; }
.model-example:empty { display: none; }
.connection-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.connection-actions button { background: white; color: #20513f; border: 1px solid #d5e3db; padding: 9px 12px; border-radius: 9px; }
.connection-actions span { font-size: 14px; }
#model-roles { margin-top: 16px; background: white; border-color: #d5e3db; }
#model-roles h2 { margin-bottom: 8px; }
#model-roles p { color: #49685c; font-size: 14px; }
#role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
#role-grid fieldset { min-width: 0; border: 1px solid #d5e3db; border-radius: 8px; padding: 12px; }
#role-grid legend { font-weight: 600; }
#role-grid p { margin: 0 0 10px; }
#role-grid label { display: block; margin-top: 9px; font-weight: 400; }
#role-grid select { display: block; width: 100%; margin-top: 6px; }
#model-roles .primary { background: #20513f; }
@media (max-width: 650px) { #role-grid { grid-template-columns: 1fr; } }
#probation-feed { grid-column: 3; background: #f4f8f6; border-left: 1px solid #d5e3db; border-right: 0; max-height: calc(100dvh - 65px); overflow: auto; }
/* 右栏宽度跟着屏幕走：窄屏收，宽屏给足（原来写死 240–300，刷新后总是很窄） */
#workspace:not(.feed-closed) {
  grid-template-columns: 232px minmax(0, 1fr) clamp(320px, 28vw, 460px);
}
@media (max-width: 1280px) {
  #workspace:not(.feed-closed) { grid-template-columns: 216px minmax(0, 1fr) clamp(300px, 30vw, 360px); }
}
@media (max-width: 1024px) {
  #workspace:not(.feed-closed) { grid-template-columns: 200px minmax(0, 1fr) clamp(280px, 32vw, 320px); }
}
#workspace:has(#settings-page:not([hidden])) { grid-template-columns: 1fr; }
#feed-items { color: #49685c; font-size: 14px; }
#feed-items article { border: 1px solid #d5e3db; border-radius: 12px; background: white; padding: 12px; margin-bottom: 10px; overflow-wrap: anywhere; }
#feed-items h3 { margin: 0 0 5px; font-size: 15px; color: #20382f; }
#feed-items p { white-space: pre-wrap; }
#feed-items button { border: 1px solid #d5e3db; border-radius: 7px; padding: 5px 8px; margin-right: 5px; background: white; color: #20513f; }
#feed-items button[aria-pressed="true"] { background: #20513f; color: white; }
@media (max-width: 950px) {
  #workspace:not(.feed-closed) { grid-template-columns: minmax(0, 1fr); }
  #probation-feed { grid-column: 1; max-height: 45vh; }
  nav { flex-wrap: wrap; }
}

#onboarding-tools { max-height: 55dvh; overflow: auto; padding: 8px 4px 16px; }
#onboarding-tools > .actions { justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
#onboarding-tools > .actions button { width: auto; }
#onboarding-tools h1 { font-size: 22px; }
#onboarding-tools > .actions a { color: var(--blue); font-size: 14px; }

#onboarding-tools, #onboarding-tools #records-view { display: none; }
#onboarding-tools:has(:is(#onboarding, #records):target) { display: block; }
#onboarding-tools:has(#records:target) #editor { display: none; }
#onboarding-tools:has(#records:target) #records-view { display: block; }

#feed-items .advice-lead { color: #20382f; font-weight: 650; line-height: 1.55; margin: 10px 0; }
.advice-details { margin: 8px 0 12px; }
.advice-details summary { cursor: pointer; color: #20513f; }
.advice-details h4 { margin: 12px 0 5px; color: #20382f; }
#feed-items .advice-details p { margin: 5px 0; line-height: 1.55; }
#feed-items small { display: block; overflow-wrap: anywhere; }

#feed-toggle { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 7px; color: #49685c; }
#feed-toggle:hover { background: #edf3ef; }
#feed-toggle span { position: relative; width: 16px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px; }
#feed-toggle span::after { content: ""; position: absolute; top: 0; bottom: 0; right: 4px; border-left: 1.5px solid currentColor; }

.management-back { display: none; }
#workspace.onboarding-management, #workspace.probation-management { grid-template-columns: minmax(0, 1fr); }
.onboarding-management > aside, .probation-management > aside:first-child,
.onboarding-management #messages, .onboarding-management #composer { display: none; }
.onboarding-management #conversation { height: auto; }
.onboarding-management #onboarding-tools { display: block; max-height: none; overflow: visible; }
.probation-management #probation-feed { grid-column: 1; width: min(100%, 892px); margin-inline: auto; max-height: none; border: 0; }
.onboarding-management #onboarding-tools > .management-back,
.probation-management #probation-feed > .management-back { display: inline-block; }
.onboarding-management #onboarding-tools #records-view:not([hidden]) { display: block; }

.probation-management #probation-feed { width: min(100%, 1120px); padding: 24px; }
.probation-layout { display: grid; grid-template-columns: minmax(160px, 1fr) 3fr; gap: 16px; margin-bottom: 16px; }
.probation-layout > label, .probation-layout section { padding: 14px; background: white; border: 1px solid #d5e3db; border-radius: 12px; margin: 0; }
.probation-layout select { display: block; width: 100%; margin-top: 8px; }
.probation-layout h3 { margin: 0; }
.probation-layout nav button[aria-pressed="true"] { color: #20513f; border-bottom: 2px solid; }
#feed-items input { margin-bottom: 8px; }
@media(max-width: 600px) { .probation-layout { grid-template-columns: 1fr; } }

/* Desktop workbench */
.sidebar-nav { display: none; }
#workspace:not(.onboarding-management, .probation-management):has(#conversation:not([hidden])) {
  background: #fff;
}
.chat-sidebar {
  min-width: 0;
  background: #f7f7f8;
  padding: 16px 12px;
  max-height: calc(100dvh - 65px);
  overflow: auto;
}
.chat-sidebar .new {
  padding: 9px 10px;
  border-radius: 8px;
  background: #ececef;
  border-color: transparent;
  color: #242428;
}
.chat-sidebar h2 { margin: 22px 8px 6px; color: #64646d; font-size: 12px; }
.chat-sidebar #search { margin: 0; padding: 8px 10px; font-size: 13px; border-color: #e3e3e8; }
.chat-sidebar #history { margin-top: 6px; }
.chat-sidebar #history button:hover,
.chat-sidebar #history button[aria-current="true"] { background: #e9e9ed; }
#workspace:not(.probation-management) #probation-feed {
  background: #fafafa;
  border-color: #e9e9ed;
}
#composer .compose-actions { min-height: 38px; }
#model-picker {
  width: fit-content;
  max-width: min(220px, calc(100% - 46px));
  min-width: 0;
  padding: 5px 22px 5px 8px;
  border: 1px solid #dce7e0;
  border-radius: 8px;
  background: #f8fbf9;
  color: #345247;
  font-size: 13px;
  text-overflow: ellipsis;
}
#composer .compose-actions button { margin-left: auto; flex: 0 0 38px; background: #252529; }
#conversation.empty-conversation:not(:has(#onboarding-tools :target, #probation-note:not([hidden]))) {
  justify-content: center;
  padding-bottom: clamp(28px, 10vh, 120px);
}
.empty-conversation:not(:has(#onboarding-tools :target, #probation-note:not([hidden]))) #messages {
  flex: 0 0 auto;
  text-align: center;
  padding-bottom: 22px;
}
.empty-conversation #messages h1 { color: #252529; font-size: clamp(24px, 3.3vw, 36px); letter-spacing: -.035em; }

@media (min-width: 951px) {
  body:has(#workspace:not([hidden], .probation-management, .onboarding-management) #conversation:not([hidden])) .workbench-nav > a {
    display: none;
  }
  .sidebar-nav { display: grid; gap: 2px; margin-top: 8px; }
  .sidebar-nav a { padding: 8px 10px; border-radius: 8px; }
  .sidebar-nav a:hover { background: #ececef; }
  #workspace:not(.probation-management, .onboarding-management).feed-closed {
    grid-template-columns: 232px minmax(0, 1fr);
  }
  #workspace:has(#settings-page:not([hidden])).feed-closed { grid-template-columns: 1fr; }
}
@media (max-width: 950px) {
  .chat-sidebar { max-height: 24dvh; }
  #workspace.feed-closed { grid-template-columns: minmax(0, 1fr); }
  #conversation.empty-conversation { min-height: 340px; height: 62dvh; }
}
@media (max-width: 650px) {
  .top { height: auto; min-height: 65px; padding-block: 10px; flex-wrap: wrap; gap: 8px 16px; }
}

.compose-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-width: 0; }
#composer .compose-tools select {
  padding: 5px 7px;
  border-color: #dce7e0;
  border-radius: 8px;
  background: #f8fbf9;
  color: #345247;
  font-size: 13px;
}
#composer #model-picker { max-width: min(200px, 100%); }
#composer .compose-actions button:not(.primary), .attachment-preview button {
  width: auto;
  height: 32px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  color: #252529;
  font-size: 13px;
}
#composer .compose-actions button[aria-pressed="true"] { background: #eaf3ed; border-color: #9bb7a6; }
.attachment-preview { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.attachment-preview span { overflow-wrap: anywhere; }

/* 员工「我的进展」与主管首页：占满内容列，隐藏右栏，横幅不参与布局 */
#workspace:has(#my-progress:not([hidden])),
#workspace:has(#supervisor-home:not([hidden])) { grid-template-columns: 232px minmax(0, 1fr); }
#workspace:has(#my-progress:not([hidden])) #probation-feed,
#workspace:has(#supervisor-home:not([hidden])) #probation-feed { display: none; }
#my-progress, #supervisor-home { grid-column: 2; padding: 32px clamp(16px, 5vw, 64px); max-width: 960px; }
#my-progress h1, #supervisor-home h1 { font-size: 22px; margin: 0 0 10px; }
.health-banner { margin: 0; border-radius: 0; }

/* 「我的进展」与主管首页的卡片 */
#my-progress-list, #supervisor-list { display: grid; gap: 10px; margin-top: 18px; }
.progress-card { background: #fff; border: 1px solid #e6eaf2; border-left: 3px solid #6b8afd;
  border-radius: 10px; padding: 12px 14px; display: grid; gap: 6px; }
.progress-card small { color: var(--muted, #6b7280); font-size: 12px; }
.progress-card p { margin: 0; font-size: 14px; line-height: 1.6; color: #1f2430; }
.supervisor-list .supervisor-row { border-left: 3px solid #cfd6e0; }
.supervisor-list .supervisor-row.has-needs { border-left-color: #f0b26b; }

.roster { margin-top: 24px; }
.roster h2 { font-size: 15px; margin: 0 0 8px; }
.roster-row { padding: 9px 12px; border: 1px dashed #dbe1ea; border-radius: 8px; margin-bottom: 6px;
  font-size: 13px; color: #3a4150; background: #fbfcfe; }

/* 对话页对齐参考版：输入框常驻底部，消息带操作行，历史按时间分组 */
#conversation.empty-conversation:not(:has(#onboarding-tools :target, #probation-note:not([hidden]))) {
  justify-content: flex-start;
  padding-bottom: 22px;
}
.empty-conversation:not(:has(#onboarding-tools :target, #probation-note:not([hidden]))) #messages {
  flex: 1 1 auto;
  text-align: left;
  padding-bottom: 8px;
}
#messages { gap: 14px; }
#messages h1 { margin: 4px 0 0; }
.message-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: #8a8f98; margin-top: -6px; }
.message-meta button { font-size: 12px; padding: 2px 8px; border-radius: 6px; border: 1px solid #e3e6ec;
  background: #fff; color: #5b6270; cursor: pointer; }
.history-group { margin: 10px 0 4px; font-size: 12px; color: #8a8f98; list-style: none; }

.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.suggestions button { font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid #e3e6ec;
  background: #fff; color: #3a4150; cursor: pointer; }
.suggestions button:hover { border-color: #b9c6e6; background: #f5f8ff; }
.history-row { display: flex; align-items: center; gap: 4px; position: relative; }
.history-row > button:first-child { flex: 1; text-align: left; }
.history-more { flex: 0 0 26px; font-size: 14px; color: #8a8f98; background: none; border: 0; cursor: pointer; }
.history-menu { position: absolute; right: 0; top: 100%; z-index: 20; display: grid; background: #fff;
  border: 1px solid #e3e6ec; border-radius: 8px; box-shadow: 0 6px 18px #0000001a; overflow: hidden; }
.history-menu button { padding: 7px 14px; font-size: 13px; border: 0; background: #fff; text-align: left; cursor: pointer; }
.history-menu button:hover { background: #f4f6fa; }

/* 右上角账号菜单 */
.user-menu { position: relative; }
.user-trigger { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid transparent;
  border-radius: 999px; background: none; cursor: pointer; font-size: 14px; color: #3a4150; }
.user-trigger:hover { background: #f3f5f9; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: #1f6b4d; color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; }
.avatar.big { width: 38px; height: 38px; font-size: 16px; }
.user-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 232px; background: #fff; border: 1px solid #e6eaf2;
  border-radius: 12px; box-shadow: 0 12px 32px #1b274012; padding: 8px; z-index: 50; }
.user-panel .user-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.user-panel .user-head strong { display: block; font-size: 14px; }
.user-panel .user-head small { color: #8a8f98; font-size: 12px; }
.user-panel hr { border: 0; border-top: 1px solid #eef1f6; margin: 6px 0; }
.user-panel a, .user-panel .menu-logout { display: block; width: 100%; text-align: left; padding: 9px 12px;
  border: 0; background: none; border-radius: 8px; font-size: 14px; color: #3a4150; text-decoration: none; cursor: pointer; }
.user-panel a:hover, .user-panel .menu-logout:hover { background: #f4f6fa; }
.user-panel .menu-logout { color: #c0392b; }

/* 待审摘要 */
#review-page { padding: 28px clamp(16px, 5vw, 64px); max-width: 980px; }
#review-card { display: grid; gap: 14px; margin-top: 16px; }
.review-origin { background: #f7f9fc; border: 1px solid #e6eaf2; border-radius: 10px; padding: 12px 14px; }
.review-origin p { margin: 0 0 6px; font-size: 13px; color: #4a5568; line-height: 1.6; }
.review-field { display: grid; gap: 6px; font-size: 13px; color: #3a4150; }
.review-field textarea { border: 1px solid #d8dee9; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; }
.review-actions { display: flex; gap: 10px; }

.my-progress-actions { display: flex; gap: 12px; align-items: center; margin: 12px 0; font-size: 13px; }
.my-progress-actions button { font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid #d8dee9; background: #fff; cursor: pointer; }
.my-progress-actions a { color: #2f6fed; }
.privacy-body { max-width: 760px; margin-top: 16px; display: grid; gap: 16px; }
.privacy-body h2 { font-size: 15px; margin: 0 0 4px; }
.privacy-body p { margin: 0; font-size: 14px; line-height: 1.7; color: #3a4150; }
#privacy-page { padding: 28px clamp(16px, 5vw, 64px); }
#my-progress-panel { margin: 12px 0; }

#admin-page { padding: 28px clamp(16px, 5vw, 64px); max-width: 980px; }
.admin-form .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0; }
.admin-form label { display: grid; gap: 4px; font-size: 13px; }
.admin-form input, .admin-form select { padding: 8px 10px; border: 1px solid #d8dee9; border-radius: 8px; font: inherit; }
.admin-list { display: grid; gap: 6px; margin-top: 12px; }
.admin-row { padding: 9px 12px; border: 1px solid #e6eaf2; border-radius: 8px; font-size: 13px; background: #fff; }

.bell-wrap { position: relative; }
.bell { position: relative; border: 0; background: none; font-size: 17px; cursor: pointer; padding: 4px 6px; }
#bell-count { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; border-radius: 999px;
  background: #d64545; color: #fff; font-size: 11px; line-height: 16px; text-align: center; padding: 0 4px; }
.bell-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 420px; overflow: auto;
  background: #fff; border: 1px solid #e6eaf2; border-radius: 12px; box-shadow: 0 12px 32px #1b274012; z-index: 60; padding: 8px; }
.bell-item { display: grid; gap: 3px; width: 100%; text-align: left; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; cursor: pointer; font-size: 13px; }
.bell-item:hover { background: #f5f7fb; }
.bell-item.unread strong::after { content: " · 新"; color: #d64545; font-size: 11px; }
.bell-item small { color: #8a8f98; font-size: 11px; }
.bell-item span { color: #4a5568; }
.bell-empty { color: #8a8f98; font-size: 13px; padding: 10px; margin: 0; }
.manual-push { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 20px;
  padding: 12px; border: 1px dashed #d8dee9; border-radius: 10px; }
.manual-push h2 { font-size: 14px; margin: 0 8px 0 0; }
.manual-push select, .manual-push input { padding: 7px 10px; border: 1px solid #d8dee9; border-radius: 8px; font: inherit; font-size: 13px; }
.manual-push input { flex: 1 1 260px; }
.manual-push button { padding: 7px 14px; border-radius: 8px; border: 1px solid #d8dee9; background: #fff; cursor: pointer; }
#manual-status { color: #1f6b4d; font-size: 12px; }

#workspace:has(> #privacy-page:not([hidden])) {
  grid-template-columns: 232px minmax(0, 1fr);
}
#privacy-page {
  grid-column: 2;
  min-width: 0;
}
@media (max-width: 950px) {
  #workspace:has(> #privacy-page:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  #privacy-page { grid-column: 1; }
}

.employee-workspace {
  --employee-ink: #172436;
  --employee-muted: #526173;
  --employee-border: #dce4ed;
  --employee-accent: #2459b5;
  --employee-surface: #f5f7fb;
  color: var(--employee-ink);
  background: var(--employee-surface);
}
.employee-workspace > .chat-sidebar {
  background: #eef2f7;
  border-color: var(--employee-border);
}
.employee-workspace .chat-sidebar .new {
  background: #fff;
  border: 1px solid var(--employee-border);
  color: var(--employee-ink);
}
.employee-workspace .chat-sidebar .new:hover { background: #e7eef8; }
.employee-workspace #conversation { padding-inline: clamp(16px, 4vw, 52px); }
.employee-workspace #composer { background: #fff; border-color: var(--employee-border); }
.employee-workspace #composer .primary { background: var(--employee-accent); }
#workspace.employee-workspace:not(.probation-management) #probation-feed {
  background: #eef2f7;
  border-color: var(--employee-border);
}
.employee-workspace #feed-heading { color: var(--employee-ink); font-size: 16px; }
.employee-workspace #feed-items article,
.employee-workspace .progress-card {
  background: #fff;
  border: 1px solid var(--employee-border);
  border-radius: 12px;
}
.employee-workspace #feed-items article { padding: 14px; }
.employee-workspace #my-progress { width: min(100%, 1060px); max-width: none; }
.employee-workspace #my-progress h1 { font-size: clamp(24px, 3vw, 32px); }
.employee-workspace #my-progress-summary { color: var(--employee-muted); }
.employee-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr));
  gap: 12px;
  margin: 20px 0;
}
.employee-metrics > div {
  background: #fff;
  border: 1px solid var(--employee-border);
  border-radius: 12px;
  padding: 14px 16px;
}
.employee-metrics dt { font-size: 13px; color: var(--employee-muted); }
.employee-metrics dd { margin: 6px 0 0; font-size: 24px; font-weight: 650; }
.employee-section-title { margin: 26px 0 0; }
.employee-workspace .progress-card { padding: 15px 18px; }
.employee-advice-status {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #eef3fc;
  color: #244d90;
  font-size: 12px;
}
#workspace.employee-workspace:has(#conversation:not([hidden])) { background: var(--employee-surface); }
@media (max-width: 650px) {
  #workspace.employee-workspace:has(#my-progress:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .employee-workspace #my-progress { grid-column: 1; }
}

#feed-resize { display: none; }
@media (min-width: 951px) {
  #workspace:has(> #conversation:not([hidden])):has(> #probation-feed:not([hidden])):not(.probation-management, .onboarding-management) {
    grid-template-columns: 232px minmax(0, 1fr) var(--feed-width, 300px);
  }
  #workspace:has(> #conversation:not([hidden])):not(.probation-management, .onboarding-management) > #feed-resize:has(+ #probation-feed:not([hidden])) {
    display: block;
    grid-area: 1 / 3;
    justify-self: start;
    width: 10px;
    margin-left: -5px;
    z-index: 2;
    cursor: col-resize;
    touch-action: none;
  }
  #workspace:has(> #feed-resize:has(+ #probation-feed:not([hidden]))) > #probation-feed { min-width: 0; }
  #workspace:has(> #conversation:not([hidden])):not(.probation-management, .onboarding-management) > #probation-feed { grid-row: 1; }
  #feed-resize:hover, #feed-resize:focus-visible, #feed-resize:active {
    background: linear-gradient(90deg, transparent 4px, #6184bb 4px 6px, transparent 6px);
    outline: none;
  }
}

.history-toolbar, .history-heading, .history-bulk {
  display: flex;
  align-items: center;
  gap: 6px;
}
.history-toolbar { margin-bottom: 10px; }
.history-toolbar span { margin-right: auto; font-weight: 650; }
.history-toolbar button, .history-heading button, .history-bulk button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 5px 7px;
}
.history-toolbar button:hover, .history-heading button:hover, .history-bulk button:hover { background: #dfe7f1; }
.history-heading { justify-content: space-between; margin-top: 18px; }
.chat-sidebar .history-heading h2 { margin: 0 8px; }
.chat-sidebar #search { margin-bottom: 8px; }
#history .history-row > button[aria-current] { min-width: 0; flex: 1; }
#history .history-row > .history-more { flex: 0 0 26px; width: 26px; padding: 5px 0; text-align: center; }
#history .history-menu { width: max-content; min-width: 124px; }
#history .history-menu button { width: 100%; padding: 7px 10px; }
#history .history-menu .history-danger, #history-delete-selected { color: #a82a34; }
.chat-sidebar .new { width: 100%; text-align: center; border-radius: 22px; }
.history-collapsed .chat-sidebar > :not(.history-toolbar),
.history-collapsed .history-toolbar > :not(#history-collapse) { display: none; }
@media (min-width: 951px) {
  #workspace.history-collapsed:has(> #conversation:not([hidden])) {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  #workspace.history-collapsed:has(> #conversation:not([hidden])):has(> #probation-feed:not([hidden])) {
    grid-template-columns: 48px minmax(0, 1fr) var(--feed-width, 300px);
  }
  #workspace.history-collapsed:has(> :is(#my-progress, #supervisor-home, #privacy-page):not([hidden])) {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .history-collapsed .chat-sidebar { padding-inline: 7px; }
}

.history-toolbar button, .history-heading button {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0;
  font-size: 23px;
  line-height: 1;
}
#history .history-row > .history-more {
  flex-basis: 34px;
  width: 34px;
  min-height: 34px;
  font-size: 23px;
  line-height: 1;
}

.employee-tasks { background: #fff; border: 1px solid #dce4ed; border-radius: 12px; padding: 12px; }
.employee-tasks summary { cursor: pointer; font-weight: 650; }
.employee-task { display: grid; gap: 4px; padding: 9px 0; border-bottom: 1px solid #e4eaf2; }
.employee-task a { overflow-wrap: anywhere; font-size: 14px; }
.employee-tasks a:hover { text-decoration: underline; }
.employee-tasks > a, .employee-tasks > small { display: inline-block; margin-top: 8px; font-size: 13px; color: #2459b5; }
.employee-deadline[data-state="已超期"] { color: #a32332; font-weight: 650; }
.employee-deadline[data-state="今天到期"] { color: #995000; font-weight: 650; }
#employee-ai-heading { font-size: 14px; margin: 18px 0 10px; }

.advice-details h4 .advice-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 6px;
  background: #eef3fb; color: #2f6fed; font-size: 11px; font-weight: 500; }

.attribution-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 6px;
  background: #fff4e5; color: #8a4b00; font-size: 11px; }

.employee-task.stale { opacity: .62; }
.employee-deadline[data-state="挂账"] { color: #6b7280; }

.advice-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: 13px; }
.advice-actions a { color: #2459b5; text-decoration: none; }
.advice-actions a:hover { text-decoration: underline; }
.advice-actions button { font-size: 12px; padding: 4px 10px; border-radius: 7px; border: 1px solid #e3e6ec;
  background: #fff; color: #5b6270; cursor: pointer; }

.progress-card.done { opacity: .72; }
.progress-state { font-size: 11px; color: #8a8f98; }
.progress-card:not(.done) .progress-state { color: #b3491f; font-weight: 600; }

.progress-row { border: 1px solid #e6eaf2; border-radius: 10px; padding: 10px 14px; background: #fbfcfe; }
.progress-row summary { cursor: pointer; font-size: 13px; color: #4a5568; }
.progress-row pre { white-space: pre-wrap; font-size: 13px; line-height: 1.6; color: #3a4150; margin: 10px 0 0; }

.progress-card-head { display: flex; align-items: center; gap: 10px; }
.load-more { padding: 8px 14px; border: 1px dashed #cfd6e0; border-radius: 8px; background: #fff;
  color: #4a5568; font-size: 13px; cursor: pointer; }

.privacy-records { margin: 8px 0 16px; }
.privacy-records summary { cursor: pointer; font-size: 13px; color: #2459b5; }
.privacy-record { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid #eef1f6; font-size: 13px; }
.privacy-record small { color: #8a8f98; }
.privacy-actions { display: flex; gap: 10px; margin: 8px 0; }
.privacy-actions button { padding: 7px 14px; border-radius: 8px; border: 1px solid #d8dee9; background: #fff;
  font-size: 13px; cursor: pointer; }

.retention-box { margin-top: 24px; padding-top: 16px; border-top: 1px solid #eef1f6; font-size: 13px; }
.retention-form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.retention-form input[type=number] { width: 80px; padding: 6px 8px; border: 1px solid #d8dee9; border-radius: 8px; }
.retention-form button { padding: 7px 14px; border-radius: 8px; border: 1px solid #d8dee9; background: #fff; cursor: pointer; }

/* 登录页 */
#signin { display: grid; place-items: center; min-height: calc(100dvh - 65px); padding: 24px; }
.signin-card { width: min(420px, 100%); background: #fff; border: 1px solid #e6eaf2; border-radius: 16px;
  padding: 32px 32px 28px; box-shadow: 0 18px 40px #1b27400f; }
.signin-brand { display: flex; align-items: center; gap: 8px; color: #4a5568; font-size: 13px; letter-spacing: .02em; }
.signin-card h1 { margin: 14px 0 6px; font-size: 26px; letter-spacing: -.02em; }
.signin-hint { margin: 0 0 22px; font-size: 13px; line-height: 1.6; color: #8a8f98; }
.signin-field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; color: #3a4150; }
.signin-field input { padding: 11px 12px; border: 1px solid #d8dee9; border-radius: 10px; font: inherit; font-size: 14px;
  transition: border-color .15s, box-shadow .15s; }
.signin-field input:focus { outline: none; border-color: #2f6fed; box-shadow: 0 0 0 3px #2f6fed1f; }
.signin-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.signin-actions .primary { flex: 1; padding: 11px; border-radius: 10px; font-size: 15px; }
#signin-status { font-size: 13px; color: #b3491f; }

/* 登录表单不要继承后台表单的卡片样式 */
#signin form { border: 0; background: transparent; padding: 0; box-shadow: none; border-radius: 0; }
#signin .signin-actions .primary { background: #2f6fed; border-color: #2f6fed; }
#signin .signin-actions .primary:hover { background: #2459b5; }

.privacy-group { background: #fff; border: 1px solid #e6eaf2; border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.privacy-group h2 { font-size: 14px; margin: 0 0 8px; color: #1f2430; }
.privacy-group p { margin: 0 0 6px; font-size: 14px; line-height: 1.7; color: #3a4150; }
.privacy-footnote { margin: 18px 0 0; font-size: 12px; color: #8a8f98; }
.privacy-actions .primary { background: #2f6fed; border-color: #2f6fed; color: #fff; }

.my-progress-tabs { display: flex; gap: 6px; margin: 18px 0 4px; border-bottom: 1px solid #e6eaf2; }
.my-progress-tabs button { border: 0; background: none; padding: 9px 14px; font-size: 14px; color: #5b6270;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.my-progress-tabs button[aria-selected="true"] { color: #2459b5; border-bottom-color: #2459b5; font-weight: 600; }

.report-bar { display: flex; align-items: center; gap: 12px; margin: 12px 0 16px; }
.report-bar .primary { padding: 8px 16px; border-radius: 9px; background: #2f6fed; color: #fff; border: 0; cursor: pointer; }
.report-bar span { font-size: 12px; color: #8a8f98; }
.report-card { background: #fff; border: 1px solid #e6eaf2; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.report-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.report-head small { color: #8a8f98; font-size: 12px; }
.report-card pre { white-space: pre-wrap; font-size: 14px; line-height: 1.7; margin: 0; color: #2b3140; }

.report-body h4 { font-size: 13px; color: #2459b5; margin: 14px 0 6px; }
.report-body p { margin: 0 0 6px; font-size: 14px; line-height: 1.75; color: #2b3140; }
.report-body ul { margin: 0 0 8px; padding-left: 18px; }
.report-body li { font-size: 14px; line-height: 1.75; color: #2b3140; margin-bottom: 4px; }

.report-quality { margin-left: auto; font-size: 11px; color: #a32332; }
.report-quality.ok { color: #1f6b4d; }
.report-tools { margin-top: 10px; }
.report-tools button { font-size: 12px; padding: 4px 10px; border-radius: 7px; border: 1px solid #e3e6ec;
  background: #fff; color: #5b6270; cursor: pointer; }
.report-head { flex-wrap: wrap; }

.rail-review { margin-top: 8px; font-size: 12px; padding: 5px 12px; border-radius: 8px;
  border: 1px solid #cfd6e0; background: #fff; color: #2459b5; cursor: pointer; }

.rail-title { font-size: 13px; color: #8a4b00; margin: 0 0 8px; }
.rail-need { display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 8px 10px; border: 1px solid #f0d9b5; background: #fffaf3; border-radius: 9px; margin-bottom: 6px;
  font-size: 13px; }
.rail-need button { font-size: 12px; padding: 4px 10px; border-radius: 7px; border: 1px solid #e0c9a6;
  background: #fff; color: #8a4b00; cursor: pointer; }
#supervisor-panel { margin-bottom: 14px; }
details.rail-advice { border-top: 1px solid #eef1f6; padding-top: 10px; }
details.rail-advice summary { cursor: pointer; font-size: 13px; color: #4a5568; margin-bottom: 8px; }
.rail-empty { font-size: 13px; color: #8a8f98; }

.rail-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.rail-actions button { font-size: 12px; padding: 5px 12px; border-radius: 8px; border: 1px solid #cfd6e0;
  background: #fff; color: #2459b5; cursor: pointer; }
.rail-actions button:hover { background: #f4f7ff; }
.feed-pill { display: inline-block; margin-top: 8px; padding: 2px 9px; border-radius: 999px; background: #eef1f6;
  color: #5b6270; font-size: 11px; }

.compare-head { font-size: 13px; color: #4a5568; margin-bottom: 12px; }
.compare-row { border: 1px solid #e6eaf2; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.compare-line { display: flex; flex-wrap: wrap; gap: 12px; align-items: baseline; font-size: 13px; }
.compare-state { color: #8a4b00; }
.compare-row details { margin-top: 6px; }
.compare-row details summary { font-size: 12px; color: #2459b5; cursor: pointer; }
.compare-row details p { font-size: 13px; color: #5b6270; margin: 6px 0 0; line-height: 1.6; }
.compare-close { margin-top: 10px; padding: 6px 14px; border-radius: 8px; border: 1px solid #d8dee9; background: #fff; cursor: pointer; }

.record-filters { display: flex; gap: 6px; margin: 10px 0 4px; }
.record-filters button { font-size: 12px; padding: 4px 12px; border-radius: 999px; border: 1px solid #dfe4ec;
  background: #fff; color: #5b6270; cursor: pointer; }
.record-filters button[aria-pressed="true"] { background: #eef3ff; border-color: #b9cdf7; color: #2459b5; }

.probation-supervisors { font-size: 12px; color: #8a8f98; margin: 2px 0 6px; }

.admin-edit { margin-left: 10px; font-size: 12px; padding: 3px 10px; border-radius: 7px;
  border: 1px solid #cfd6e0; background: #fff; cursor: pointer; }
.relations { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  padding: 10px 12px; margin: 6px 0 10px; border: 1px dashed #cfd6e0; border-radius: 10px; background: #fbfcfe; }
.relations-field { display: grid; gap: 4px; font-size: 12px; color: #5b6270; }
.relations-field select { min-width: 140px; padding: 5px 8px; border: 1px solid #d8dee9; border-radius: 8px; }
.relations button { padding: 6px 14px; border-radius: 8px; border: 1px solid #2f6fed; background: #2f6fed; color: #fff; cursor: pointer; }

.rail-group { margin-bottom: 14px; }
.rail-group > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #8a4b00; margin-bottom: 8px; }
.rail-item { padding: 10px 12px; border: 1px solid #e6eaf2; border-radius: 10px; background: #fff; margin-bottom: 8px; }
.rail-item strong { display: block; font-size: 13px; font-weight: 500; color: #1f2430; margin-bottom: 4px; }
.rail-item small { display: block; font-size: 12px; color: #8a8f98; }
.rail-link { margin-top: 6px; font-size: 12px; padding: 4px 10px; border-radius: 7px;
  border: 1px solid #cfd6e0; background: #fff; color: #2459b5; cursor: pointer; }

.rail-more { display: block; width: 100%; margin-top: 6px; padding: 9px 12px; border-radius: 10px;
  border: 1px dashed #cfd6e0; background: #fff; color: #2459b5; font-size: 13px; cursor: pointer; }

.rail-group { margin-bottom: 16px; }
.rail-group-title { font-size: 12px; font-weight: 600; color: #5b6270; margin: 0 0 8px; }
.rail-row { display: block; width: 100%; text-align: left; padding: 9px 12px 9px 14px; margin-bottom: 6px;
  border: 1px solid #e6eaf2; border-radius: 9px; background: #fff; cursor: pointer;
  border-left: 3px solid #ccd4e0; }
.rail-row:hover { background: #f8fafd; }
.rail-row.hot { border-left-color: #b3261e; background: #fffafa; }
.rail-row.warm { border-left-color: #d98324; background: #fffdf8; }
.rail-row.calm { border-left-color: #9aa6b8; }
.rail-row-main { display: block; font-size: 13px; color: #1f2430; line-height: 1.5; }
.rail-row small { display: block; margin-top: 3px; font-size: 12px; color: #8a8f98; }

/* 待审摘要 / 员工管理：占满内容列，隐藏右栏（原来被挤到最底部一行） */
#workspace:has(> #review-page:not([hidden])),
#workspace:has(> #admin-page:not([hidden])) { grid-template-columns: 232px minmax(0, 1fr); }
#workspace:has(> #review-page:not([hidden])) #probation-feed,
#workspace:has(> #admin-page:not([hidden])) #probation-feed { display: none; }
#review-page, #admin-page { grid-column: 2; }
#review-page h1, #admin-page h1 { font-size: 22px; margin: 0 0 10px; }

.probation-review-box { margin: 12px 0; border: 1px solid #e6eaf2; border-radius: 10px; padding: 10px 14px; background: #fff; }
.probation-review-box > summary { cursor: pointer; font-size: 13px; color: #2459b5; }

.settings-privacy { margin: 22px 0; padding: 16px 18px; border: 1px solid #e6eaf2; border-radius: 12px; background: #fff; }
.settings-privacy h2 { font-size: 14px; margin: 0 0 6px; }
.settings-privacy p { font-size: 13px; color: #5b6270; margin: 0 0 8px; }
.settings-privacy a { font-size: 13px; color: #2459b5; }

.rail-row { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.rail-row-main { min-width: 0; }
.rail-row-main strong { display: block; font-size: 13px; font-weight: 600; color: #1f2430; }
.rail-row-main span { display: block; font-size: 13px; color: #3a4150; line-height: 1.5; margin-top: 2px; }
.rail-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.rail-go { font-size: 12px; color: #2459b5; text-decoration: none; border-bottom: 1px solid #b9cdf7; }
.rail-probation p { margin: 4px 0 0; font-size: 12px; color: #5b6270; line-height: 1.6; }

.review-actions button.muted { background: none; border: 1px dashed #d8dee9; color: #8a8f98; }

/* 轻重必须一眼能分：色块 + 文字标签 + 底色 */
.rail-row.hot { border-left-color: #b3261e; background: #fdecec; border-color: #f3c9c6; }
.rail-row.warm { border-left-color: #c76a00; background: #fff3e0; border-color: #f3dcc0; }
.rail-row.calm { border-left-color: #8d99ad; background: #f6f8fb; border-color: #e3e8f0; }
.rail-badge { flex-shrink: 0; align-self: flex-start; margin-top: 1px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.rail-badge.hot { background: #b3261e; color: #fff; }
.rail-badge.warm { background: #c76a00; color: #fff; }
.rail-badge.calm { background: #8d99ad; color: #fff; }
.rail-row-side small { color: #5b6270; font-weight: 600; }
.rail-hint { margin: -2px 0 10px; font-size: 12px; color: #8a8f98; line-height: 1.6; }

.rail-stage { padding: 12px 14px; border-radius: 12px; background: #f3f7ff; border: 1px solid #d6e2fb; margin-bottom: 14px; }
.rail-stage h3 { font-size: 14px; margin: 0 0 4px; color: #1b3a6b; }
.rail-stage p { margin: 0 0 4px; font-size: 12px; color: #40506b; }
.rail-stage small { display: block; font-size: 12px; color: #6b7c99; margin-bottom: 8px; }
.rail-stage button { padding: 6px 14px; border-radius: 8px; border: 1px solid #2f6fed; background: #2f6fed;
  color: #fff; font-size: 13px; cursor: pointer; }
.rail-person { border-radius: 10px; border: 1px solid #e6eaf2; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.rail-person.hot { background: #fdecec; border-color: #f3c9c6; }
.rail-person.warm { background: #fff3e0; border-color: #f3dcc0; }
.rail-person.calm { background: #f6f8fb; border-color: #e3e8f0; }
.rail-person-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.rail-person-head strong { font-size: 13px; color: #1f2430; }
.rail-person-item { display: flex; justify-content: space-between; gap: 8px; font-size: 13px;
  color: #3a4150; padding: 3px 0; }
.rail-person-item > span:first-child { min-width: 0; }
.rail-person-side { display: flex; gap: 8px; align-items: baseline; color: #6b7280; font-size: 12px; flex-shrink: 0; }

.rail-stage-done { font-weight: 600; color: #1f6b4d; margin: 6px 0; }
.rail-stage-secondary { background: #fff; color: #2459b5; border: 1px solid #b9cdf7; }
.rail-decision { margin-top: 10px; display: grid; gap: 8px; }
.rail-decision-options { display: flex; flex-wrap: wrap; gap: 6px; }
.rail-decision-options button { font-size: 12px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid #cfd6e0; background: #fff; cursor: pointer; }
.rail-decision-options button[aria-pressed="true"] { background: #2f6fed; border-color: #2f6fed; color: #fff; }
.rail-decision textarea { width: 100%; padding: 8px; border: 1px solid #d8dee9; border-radius: 8px;
  font: inherit; font-size: 13px; resize: vertical; }
.rail-decision-save { padding: 7px 14px; border-radius: 8px; border: 0; background: #2f6fed; color: #fff; cursor: pointer; }
.rail-wrong { background: none; border: 0; color: #8a8f98; font-size: 11px; cursor: pointer; text-decoration: underline; }

.rail-stage .rail-decision-options button { color: #3a4150; background: #fff; border: 1px solid #cfd6e0; }
.rail-stage .rail-decision-options button[aria-pressed="true"] { color: #fff; background: #2f6fed; border-color: #2f6fed; }
.rail-stage .rail-decision-save { color: #fff; background: #2f6fed; }
.rail-wrong-form { display: flex; gap: 6px; margin: 4px 0 6px; }
.rail-wrong-form input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid #d8dee9; border-radius: 7px; font-size: 12px; }
.rail-wrong-form button { padding: 4px 10px; border-radius: 7px; border: 1px solid #2f6fed; background: #2f6fed;
  color: #fff; font-size: 12px; cursor: pointer; }
.rail-wrong-form button.plain { background: #fff; color: #5b6270; border-color: #d8dee9; }

.rail-stage button.rail-stage-secondary { background: #fff; color: #2459b5; border-color: #b9cdf7; }

.rail-evaluation { margin: 4px 0 8px; }
.rail-evaluation summary { cursor: pointer; font-size: 12px; color: #2459b5; }
.rail-evaluation .report-body { max-height: 260px; overflow: auto; margin-top: 6px; }
.rail-decision-actions { display: flex; gap: 8px; }
.rail-decision-actions button.plain { background: #fff; color: #5b6270; border: 1px solid #d8dee9;
  padding: 7px 14px; border-radius: 8px; cursor: pointer; }

/* 结论按钮按语义分色 */
.rail-stage .rail-decision-options button[data-decision="confirm"] { color: #1f6b4d; border-color: #a9d3bf; }
.rail-stage .rail-decision-options button[data-decision="confirm"][aria-pressed="true"] { background: #1f6b4d; border-color: #1f6b4d; color: #fff; }
.rail-stage .rail-decision-options button[data-decision="extend"] { color: #9a5b00; border-color: #e6c79a; }
.rail-stage .rail-decision-options button[data-decision="extend"][aria-pressed="true"] { background: #c76a00; border-color: #c76a00; color: #fff; }
.rail-stage .rail-decision-options button[data-decision="reject"] { color: #a32332; border-color: #e8b7bd; }
.rail-stage .rail-decision-options button[data-decision="reject"][aria-pressed="true"] { background: #a32332; border-color: #a32332; color: #fff; }
.rail-stage .rail-decision-options button[data-decision="observe"][aria-pressed="true"] { background: #5b6270; border-color: #5b6270; color: #fff; }

/* AI 依据：按重点分块、加粗、配色 */
.rail-evaluation .report-body { font-size: 13px; }
.rail-evaluation .report-body h4 { font-size: 12px; margin: 12px 0 6px; padding-left: 8px; border-left: 3px solid #2f6fed; color: #2459b5; }
.rail-evaluation .report-body h4:nth-of-type(2) { border-color: #c76a00; color: #9a5b00; }
.rail-evaluation .report-body h4:nth-of-type(3) { border-color: #a32332; color: #a32332; }
.rail-evaluation .report-body p { margin: 0 0 6px; line-height: 1.65; }
.rail-evaluation .report-body strong { color: #1f2430; }
.rail-evaluation-suggestion { display: block; margin: 6px 0 10px; padding: 8px 10px; border-radius: 8px;
  background: #fff7e6; color: #9a5b00; font-weight: 700; font-size: 13px; }

.rail-field { display: grid; gap: 3px; padding: 10px 12px; border-radius: 10px; border: 1px solid #e6eaf2; }
.rail-field.public { background: #f3f9f5; border-color: #cfe6d9; }
.rail-field.private { background: #fdf8f2; border-color: #ecdcc6; }
.rail-field-title { font-size: 12px; font-weight: 700; color: #1f2430; }
.rail-field.public .rail-field-title { color: #1f6b4d; }
.rail-field.private .rail-field-title { color: #9a5b00; }
.rail-field small { font-size: 11px; color: #7b8494; line-height: 1.5; }
.rail-field textarea { margin-top: 4px; padding: 8px; border: 1px solid #d8dee9; border-radius: 8px;
  font: inherit; font-size: 13px; resize: vertical; background: #fff; }

.my-decision { background: #f3f7ff; border: 1px solid #d6e2fb; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.my-decision h3 { font-size: 15px; margin: 0 0 4px; color: #1b3a6b; }
.my-decision small { font-size: 12px; color: #6b7c99; }
.my-decision p { margin: 8px 0 0; font-size: 13px; line-height: 1.7; color: #2b3140; }
.my-decision details summary { margin-top: 8px; font-size: 12px; color: #2459b5; cursor: pointer; }
.rail-decision-tell { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #5b6270; }

.rail-item-main { min-width: 0; display: grid; gap: 2px; }
.rail-item-main strong { font-size: 13px; color: #8a2c00; }
.rail-person.hot .rail-item-main strong { color: #b3261e; }
.rail-item-main span { font-size: 12px; color: #5b6270; overflow: hidden; text-overflow: ellipsis; }

.rail-person-head { cursor: pointer; }
.rail-item-detail { display: none; margin-top: 6px; padding: 8px 10px; border-radius: 8px;
  background: #fff; border: 1px solid #e6eaf2; }
.rail-item-detail.open { display: block; }
.rail-item-detail p { margin: 0 0 6px; font-size: 12px; line-height: 1.6; color: #3a4150; }
.rail-item-detail p:last-child { margin-bottom: 0; }
.rail-item-detail strong { display: block; font-size: 11px; color: #8a8f98; font-weight: 600; margin-bottom: 2px; }
.line-expandable { cursor: pointer; }

.rail-detail-note { font-size: 12px; color: #6b7280; margin: 0 0 6px; }
.rail-detail-list { margin: 0; padding-left: 16px; }
.rail-detail-list li { font-size: 12px; line-height: 1.7; color: #2b3140; }
.rail-detail-list a { color: #2459b5; text-decoration: none; }
.rail-detail-list small { color: #8a8f98; }

.probation-layout.single { grid-template-columns: minmax(0, 1fr); }
.probation-layout.single > section { width: 100%; }
.probation-management #probation-feed > #feed-items { display: grid; gap: 12px; }

/* 右栏默认宽度：没有再踩到 localStorage 时，按屏幕算，不再固定 300 */
#workspace { --feed-width: clamp(320px, 27vw, 440px); }

.rail-vote { border: 1px solid #dfe4ec; background: #fff; border-radius: 999px; font-size: 11px;
  padding: 3px 9px; cursor: pointer; color: #5b6270; white-space: nowrap; }
.rail-vote:hover { background: #f3f7ff; border-color: #b9cdf7; color: #2459b5; }
.rail-vote[aria-pressed="true"] { background: #eef3ff; border-color: #b9cdf7; }
.rail-wrong-form { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; margin: 4px 0 8px; }
.rail-wrong-form textarea { grid-column: 1 / -1; padding: 7px 9px; border: 1px solid #d8dee9;
  border-radius: 8px; font: inherit; font-size: 12px; resize: vertical; }
.rail-wrong-form button { padding: 5px 10px; border-radius: 7px; border: 1px solid #2f6fed;
  background: #2f6fed; color: #fff; font-size: 12px; cursor: pointer; }
.rail-wrong-form button.mic { background: #fff; color: #2459b5; border-color: #b9cdf7; font-size: 14px; }
.rail-wrong-form button.mic.recording { background: #fdecec; border-color: #e8b7bd; color: #b3261e; }
.rail-wrong-form button.plain { background: #fff; color: #5b6270; border-color: #d8dee9; }

/* ---------- 手机布局（<=760px） ---------- */
@media (max-width: 760px) {
  #workspace,
  #workspace:not(.feed-closed) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  /* 左侧历史栏先收起，账号菜单里仍能到各页面 */
  .chat-sidebar { display: none; }
  /* 右栏改成整屏浮层，点顶部按钮开关 */
  #probation-feed:not([hidden]) {
    position: fixed;
    inset: 65px 0 0 0;
    width: 100%;
    max-height: none;
    z-index: 40;
    border: 0;
    padding: 16px 16px 96px;
    background: #f4f8f6;
    overflow: auto;
    box-shadow: 0 0 40px #0000001f;
  }
  #conversation { height: calc(100dvh - 65px); padding-inline: 16px; }
  #messages h1 { font-size: 24px; line-height: 1.35; }
  .suggestions { display: grid; gap: 8px; }
  .suggestions button { width: 100%; text-align: left; padding: 12px 14px; font-size: 15px; }
  #composer { padding: 10px 12px; }
  #composer textarea { font-size: 16px; }          /* 小于 16px 时 iOS 会自动放大页面 */
  .compose-actions { flex-wrap: wrap; gap: 8px; }
  .compose-actions button, .compose-actions select { min-height: 36px; }
  #workspace .chat-sidebar { display: none; }
  .workbench-nav { gap: 4px; }
  .workbench-nav > a, .workbench-nav > button { font-size: 13px; }
  /* 试用期管理页在手机上单列 */
  .probation-layout, .probation-layout.single { grid-template-columns: minmax(0, 1fr); }
  #review-page, #admin-page, #my-progress, #privacy-page, #supervisor-home {
    padding: 20px 16px 96px;
    max-width: none;
  }
  .admin-form .fields { grid-template-columns: minmax(0, 1fr); }
  .rail-person-item { flex-wrap: wrap; }
}

@media (max-width: 760px) {
  /* 输入框固定在屏幕底部，别浮在页面中间 */
  #conversation { display: flex; flex-direction: column; min-height: calc(100dvh - 65px); }
  #messages { flex: 1 1 auto; overflow-y: auto; padding-bottom: 8px; }
  #composer { flex: 0 0 auto; position: sticky; bottom: 0; background: #fff;
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px #0000000f; }
}

@media (max-width: 760px) {
  /* 优先级兜底：任何残留规则都不能把对话高度锁成 65dvh */
  #conversation { height: calc(100dvh - 65px) !important; }
}

.notice-toast { position: fixed; left: 50%; transform: translateX(-50%); top: 76px; z-index: 60;
  background: #25344b; color: #fff; border: 0; border-radius: 999px; padding: 10px 18px;
  font-size: 13px; box-shadow: 0 8px 24px #00000033; cursor: pointer; }

.rail-vote.rail-done { border-color: #a9d3bf; color: #1f6b4d; }
.rail-done-choices { display: flex; gap: 6px; flex-wrap: wrap; }
.rail-done-choices button { padding: 5px 10px; border-radius: 999px; border: 1px solid #cfd6e0;
  background: #fff; color: #3a4150; font-size: 12px; cursor: pointer; }
.rail-done-choices button[aria-pressed="true"] { background: #1f6b4d; border-color: #1f6b4d; color: #fff; }
.rail-done-form { grid-template-columns: 1fr; }

.my-timeline { display: grid; gap: 8px; margin-top: 16px; }
.timeline-row { display: grid; grid-template-columns: 84px 72px 1fr; gap: 10px; align-items: baseline;
  padding: 9px 12px; border: 1px solid #e6eaf2; border-radius: 10px; background: #fff; }
.timeline-row small { color: #8a8f98; font-size: 12px; }
.timeline-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #eef1f6; color: #5b6270; }
.timeline-row.judged .timeline-badge { background: #fff3e0; color: #9a5b00; }
.timeline-row.action .timeline-badge, .timeline-row.decision .timeline-badge { background: #eaf5ee; color: #1f6b4d; }
.timeline-text { font-size: 13px; color: #2b3140; }
