/* Tounar · 帮你理 — Web 前端样式
   设计基调：与提醒邮件/扩展一致的深绿 + 米白；桌面优先，移动端可读、表格横滚。 */

:root {
  --bg: #f4f6f2;
  --panel: #ffffff;
  --ink: #151a19;
  --muted: #66716d;
  --faint: #8b9691;
  --line: #dfe5dd;
  --line-strong: #c9d3cb;
  --brand: #17594c;
  --brand-dark: #103f36;
  --brand-soft: #e4efe9;
  --danger: #b8483d;
  --danger-soft: #f7e7e4;
  --warn: #c07a1f;
  --warn-soft: #f8efdf;
  --ok: #1f7a4d;
  --ok-soft: #e3f1e9;
  --info: #2f6bb0;
  --info-soft: #e6eef8;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(21, 26, 25, 0.06), 0 8px 24px rgba(21, 26, 25, 0.08);
  --font-sans: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
  --font-serif: var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

.tn-root { min-height: 100vh; }
.tn-boot { max-width: 520px; margin: 18vh auto 0; text-align: center; padding: 0 20px; }
.tn-boot-brand { font-family: var(--font-sans); font-size: 22px; color: var(--brand); margin-bottom: 8px; }
.tn-muted { color: var(--muted); }
.tn-faint { color: var(--faint); }
.tn-small { font-size: 12px; }
.tn-tiny { font-size: 11px; }
.tn-mono { font-family: var(--font-mono); font-size: 12px; }
.tn-pre-wrap { white-space: pre-wrap; word-break: break-word; }
.tn-warn-text { color: var(--warn); }
.tn-danger-text { color: var(--danger); }
.tn-ok-text { color: var(--ok); }

/* ---------- 登录页 ---------- */
.tn-login-wrap { max-width: 460px; margin: 0 auto; padding: 7vh 20px 60px; }
.tn-login-brand { font-family: var(--font-sans); color: var(--brand); font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; }
.tn-login-slogan { font-family: var(--font-sans); font-size: 32px; line-height: 1.25; margin: 18px 0 6px; }
.tn-login-sub { font-size: 17px; color: var(--brand); margin: 0 0 10px; font-weight: 600; }
.tn-login-desc { color: var(--muted); margin: 0 0 26px; line-height: 1.8; }
.tn-login-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.tn-login-card h2 { font-size: 15px; margin: 0 0 4px; }
.tn-login-note { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--brand-dark); font-size: 12px; line-height: 1.7; margin-top: 16px; }
.tn-login-details { margin-top: 18px; color: var(--muted); font-size: 12px; }
.tn-login-details summary { cursor: pointer; color: var(--brand); }
.tn-login-details p { margin: 8px 0 0; line-height: 1.8; }
.tn-resend-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tn-inline-msg { margin-top: 10px; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.tn-inline-msg.err { color: var(--danger); }
.tn-inline-msg.ok { color: var(--ok); }

/* ---------- 表单 ---------- */
.tn-field { margin-bottom: 14px; }
.tn-field label { display: block; font-size: 13px; color: var(--ink); margin-bottom: 5px; font-weight: 500; }
.tn-field .tn-hint { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.tn-input, .tn-select, .tn-textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
.tn-textarea { min-height: 74px; resize: vertical; }
.tn-input:disabled, .tn-select:disabled, .tn-textarea:disabled { background: #f1f3ef; color: var(--muted); }
.tn-input.err, .tn-select.err, .tn-textarea.err { border-color: var(--danger); }
.tn-row { display: flex; gap: 10px; align-items: center; }
.tn-row > * { min-width: 0; }
.tn-grow { flex: 1; }
.tn-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.6; margin: 10px 0; }
.tn-check input { margin-top: 3px; }

/* ---------- 按钮 ---------- */
.tn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  border-radius: var(--radius-sm); padding: 8px 14px; font: inherit; font-size: 13px; cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease; white-space: nowrap;
}
.tn-btn:hover:not(:disabled) { background: #f6f8f4; }
.tn-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.tn-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.tn-btn-primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.tn-btn-danger { background: #fff; border-color: var(--danger); color: var(--danger); }
.tn-btn-danger:hover:not(:disabled) { background: var(--danger-soft); }
.tn-btn-ghost { border-color: transparent; background: transparent; color: var(--brand); }
.tn-btn-ghost:hover:not(:disabled) { background: var(--brand-soft); }
.tn-btn-sm { padding: 5px 10px; font-size: 12px; }
.tn-btn-block { width: 100%; }

/* ---------- 侧栏工作区 ---------- */
.tn-shell { min-height: 100vh; display: flex; background: var(--bg); }
.tn-sidebar {
  width: 232px; flex: 0 0 232px; height: 100vh; position: sticky; top: 0; z-index: 50;
  display: flex; flex-direction: column; gap: 4px; padding: 18px 12px 16px;
  background: #fbfcf9; border-right: 1px solid var(--line); overflow-y: auto;
}
.tn-sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; color: var(--brand-dark); text-decoration: none; }
.tn-sidebar-brand:hover { text-decoration: none; }
.tn-brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand); color: #fff; font-family: var(--font-sans); font-size: 20px; line-height: 1; }
.tn-brand-word { display: flex; flex-direction: column; line-height: 1.15; }
.tn-brand-word strong { font-family: var(--font-sans); font-size: 14px; letter-spacing: 0.11em; }
.tn-brand-word span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.tn-nav-section { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.tn-nav-group-label { padding: 8px 10px 4px; color: var(--faint); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.tn-nav-item {
  min-height: 36px; display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border-radius: 7px; color: #33413c; text-decoration: none; font: inherit; font-size: 13px;
  border: 1px solid transparent; background: transparent; cursor: pointer; text-align: left; width: 100%;
}
.tn-nav-item:hover { background: #eef3ed; text-decoration: none; }
.tn-nav-item.active { background: var(--brand-soft); color: var(--brand-dark); border-color: #d2e4da; font-weight: 600; }
.tn-nav-item.active::before { content: ""; width: 3px; height: 18px; border-radius: 2px; background: var(--brand); margin-left: -5px; margin-right: 2px; }
.tn-nav-icon { width: 18px; height: 18px; flex: 0 0 18px; display: inline-grid; place-items: center; color: currentColor; }
.tn-nav-icon svg { width: 18px; height: 18px; display: block; }
.tn-nav-icon-empty { opacity: 0; }
.tn-nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-nav-item { font-size: 14px; }
.tn-nav-count { margin-left: auto; min-width: 20px; padding: 0 7px; border-radius: 999px; background: #e8ece7; color: var(--muted); font-size: 12px; line-height: 20px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.tn-nav-item.active .tn-nav-count { background: #d5e8dc; color: var(--brand); }
.tn-nav-sub { padding-left: 37px; min-height: 32px; font-size: 12.5px; color: #5f6b66; }
.tn-nav-button { margin: 0; }
.tn-account { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tn-account-label { color: var(--faint); font-size: 10px; letter-spacing: 0.08em; }
.tn-account-email { color: var(--ink); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-account .tn-btn { margin-top: 7px; }
.tn-workspace { flex: 1; min-width: 0; }
.tn-topbar { max-width: 1280px; margin: 0 auto; padding: 18px 24px 0; display: flex; align-items: center; gap: 16px; }
.tn-topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tn-topbar-kicker { color: var(--faint); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.tn-topbar-title { margin: 1px 0 0; font-family: var(--font-sans); font-size: 24px; line-height: 1.2; font-weight: 600; }
.tn-topbar-note { margin-left: auto; color: var(--faint); font-size: 11px; }
.tn-menu-button { display: none; width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; align-items: center; justify-content: center; cursor: pointer; }
.tn-menu-lines, .tn-menu-lines::before, .tn-menu-lines::after { display: block; width: 16px; height: 1.5px; background: var(--ink); position: relative; content: ""; }
.tn-menu-lines::before { position: absolute; top: -5px; }
.tn-menu-lines::after { position: absolute; top: 5px; }
.tn-nav-scrim { display: none; }
.tn-spinner { width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--brand); border-radius: 50%; display: inline-block; animation: tn-spin 0.8s linear infinite; }
@keyframes tn-spin { to { transform: rotate(360deg); } }

/* 保留旧顶栏样式给仅使用 header 的独立页面/历史测试，不再用于工作区。 */
.tn-header { background: var(--panel); border-bottom: 1px solid var(--line); }
.tn-header-inner { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tn-header-brand { font-family: var(--font-sans); font-size: 17px; color: var(--brand); font-weight: 600; }
.tn-header-user { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tn-header-email { color: var(--muted); font-size: 13px; }

.tn-main { max-width: 1280px; margin: 0 auto; padding: 16px 24px 70px; }
.tn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tn-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.tn-stat .tn-stat-num { font-family: var(--font-sans); font-size: 30px; line-height: 1.1; color: var(--ink); }
.tn-stat .tn-stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tn-stat .tn-stat-note { color: var(--faint); font-size: 11px; margin-top: 4px; }
.tn-stat.is-loading .tn-stat-num { color: var(--faint); }

/* ---------- 工具条与入口 ---------- */
.tn-toolbar { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tn-toolbar .tn-input, .tn-toolbar .tn-select { width: auto; min-width: 120px; padding: 7px 10px; font-size: 13px; }
.tn-toolbar .tn-search { flex: 0 1 240px; }
.tn-toolbar-right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tn-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); padding: 6px 8px; border-radius: var(--radius-sm); cursor: pointer; user-select: none; }
.tn-toggle:hover { background: #f6f8f4; }

.tn-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 0; flex-wrap: wrap; }
.tn-tab {
  border: none; background: transparent; font: inherit; font-size: 13.5px; color: var(--muted);
  padding: 9px 13px; cursor: pointer; border-bottom: 2px solid transparent; display: inline-flex; gap: 7px; align-items: center;
}
.tn-tab .tn-tab-count { background: #eef1ec; color: var(--muted); border-radius: 999px; padding: 0 7px; font-size: 11px; line-height: 18px; min-width: 18px; text-align: center; }
.tn-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tn-tab.active .tn-tab-count { background: var(--brand-soft); color: var(--brand); }

/* ---------- 表格 ---------- */
.tn-table-card { background: var(--panel); border: 1px solid var(--line); border-top: none; border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.tn-table-scroll { overflow-x: auto; }
table.tn-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.tn-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbf9; white-space: nowrap; }
.tn-table td { padding: 11px 12px; border-bottom: 1px solid #eef1ec; vertical-align: top; font-size: 13px; }
.tn-table tr.tn-row-click { cursor: pointer; }
.tn-table tr.tn-row-click:hover { background: #f8faf7; }
.tn-table tr:last-child td { border-bottom: none; }
.tn-company { font-weight: 600; }
.tn-job-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.tn-jd { color: var(--muted); max-width: 230px; }
.tn-jd.clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tn-cell-actions { display: flex; flex-direction: column; gap: 4px; }
.tn-link-disabled { color: var(--faint); font-size: 12px; }
.tn-scope-note { color: var(--faint); font-size: 11px; }
.tn-days { white-space: nowrap; }
.tn-days-late { color: var(--warn); font-weight: 600; }

/* ---------- 状态徽标 ---------- */
.tn-status { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 20px; border: 1px solid transparent; white-space: nowrap; }
.tn-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pending { background: #eef1ec; color: #5b6660; }
.status-applied { background: var(--info-soft); color: var(--info); }
.status-assessment { background: #efe8f8; color: #7d5bb8; }
.status-interview { background: var(--warn-soft); color: var(--warn); }
.status-offer { background: var(--ok-soft); color: var(--ok); }
.status-rejected { background: var(--danger-soft); color: var(--danger); }
.status-closed { background: #e9eae7; color: #6b7280; }
.tn-round { color: var(--muted); font-size: 12px; margin-left: 0; }
.tn-flag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; line-height: 17px; margin-left: 4px; vertical-align: 1px; }
.tn-flag-due { background: var(--warn-soft); color: var(--warn); }
.tn-flag-precision { background: #eef1ec; color: var(--muted); }
.tn-flag-source { background: var(--brand-soft); color: var(--brand); }

/* ---------- 分区/空态/骨架 ---------- */
.tn-empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.tn-empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 15px; }
.tn-empty p { margin: 0 0 14px; }
.tn-skeleton-row td { padding: 13px 12px; }
.tn-skeleton { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #eef1ec 25%, #e3e8e1 50%, #eef1ec 75%); background-size: 200% 100%; animation: tn-shimmer 1.4s infinite; }
@keyframes tn-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.tn-banner { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.tn-banner.err { background: var(--danger-soft); color: var(--danger); }
.tn-banner.warn { background: var(--warn-soft); color: #8a5a12; }
.tn-banner.info { background: var(--brand-soft); color: var(--brand-dark); }
.tn-banner .tn-banner-body { flex: 1; }

.tn-table-footer { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; flex-wrap: wrap; }
.tn-table-footer .tn-spacer { flex: 1; }
.tn-freshness { color: var(--faint); font-size: 12px; margin-top: 10px; line-height: 1.8; }

/* ---------- 抽屉（详情） ---------- */
.tn-drawer-layer { position: fixed; inset: 0; z-index: 60; }
.tn-drawer-mask { position: absolute; inset: 0; background: rgba(21, 26, 25, 0.32); }
.tn-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(640px, 96vw); background: var(--panel); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.tn-drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.tn-drawer-head h2 { margin: 0; font-size: 17px; line-height: 1.35; }
.tn-drawer-head .tn-job-title { color: var(--muted); margin-top: 3px; }
.tn-drawer-close { margin-left: auto; }
.tn-drawer-body { flex: 1; overflow-y: auto; padding: 18px 20px 24px; }
.tn-drawer-section { margin-bottom: 22px; }
.tn-drawer-section > h3 { font-size: 13px; color: var(--brand); margin: 0 0 10px; text-transform: none; letter-spacing: 0.02em; }
.tn-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; font-size: 13px; }
.tn-fact .tn-fact-label { color: var(--muted); font-size: 12px; }
.tn-fact .tn-fact-value { margin-top: 1px; word-break: break-word; }
.tn-links-row { display: flex; gap: 14px; flex-wrap: wrap; }
.tn-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid #e7ece6; }
.tn-timeline li { position: relative; padding: 0 0 14px 12px; }
.tn-timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-soft); border: 2px solid var(--brand); }
.tn-timeline .tn-h-time { color: var(--muted); font-size: 12px; }
.tn-timeline .tn-h-main { font-size: 13px; margin-top: 1px; }
.tn-timeline .tn-h-fields { color: var(--faint); font-size: 11px; margin-top: 2px; word-break: break-word; }
.tn-kv { font-size: 12px; color: var(--muted); }
.tn-kv .tn-kv-item { display: flex; gap: 8px; padding: 3px 0; border-bottom: 1px dashed #eef1ec; }
.tn-kv .tn-kv-key { color: var(--ink); min-width: 130px; }
.tn-evidence { background: #f7f9f6; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 12px; line-height: 1.7; word-break: break-word; }
.tn-action-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tn-inline-form { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-top: 12px; background: #fbfcfa; }
.tn-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.tn-form-grid .tn-field { margin-bottom: 0; }

/* ---------- 弹窗 ---------- */
.tn-modal-layer { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 40px; overflow-y: auto; }
.tn-modal-mask { position: fixed; inset: 0; background: rgba(21, 26, 25, 0.38); }
.tn-modal { position: relative; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); width: min(680px, 100%); max-height: 86vh; display: flex; flex-direction: column; }
.tn-modal.tn-modal-narrow { width: min(440px, 100%); }
.tn-modal-head { padding: 15px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; }
.tn-modal-head h2 { margin: 0; font-size: 16px; }
.tn-modal-head .tn-modal-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.tn-modal-close { margin-left: auto; }
.tn-modal-body { padding: 18px 20px; overflow-y: auto; }
.tn-modal-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.tn-modal-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--line); }

/* ---------- 复核卡片 ---------- */
.tn-review-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 14px 16px; margin-bottom: 12px; }
.tn-review-source-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tn-source-pill { border-radius: 999px; padding: 1px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tn-source-pill.source-plugin { background: #e8f1ed; color: #17594c; }
.tn-source-pill.source-mail { background: #eef0fb; color: #39427a; }
.tn-review-title { margin: 8px 0 2px; font-size: 16px; line-height: 1.45; }
.tn-review-preview { margin: 8px 0 0; color: var(--ink); line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.tn-review-full { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; }
.tn-review-full-text { white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; line-height: 1.75; font-size: 13px; }
.tn-review-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.tn-review-actions .tn-select { width: auto; min-width: 110px; }
.tn-review-time, .tn-review-fix { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfa; }
.tn-review-time label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.tn-review-time input { width: auto; }
.tn-review-fix .tn-row { margin-top: 6px; }
.tn-review-candidates { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tn-review-candidates .tn-btn { max-width: 100%; white-space: normal; text-align: left; }
.tn-select-sm { padding: 5px 9px; font-size: 12px; }
.tn-review-head { display: flex; gap: 10px; align-items: flex-start; }
.tn-review-head .tn-review-title { font-weight: 600; }
.tn-review-kind { background: var(--warn-soft); color: #8a5a12; border-radius: 999px; padding: 1px 9px; font-size: 11px; white-space: nowrap; margin-top: 2px; }
.tn-review-section { margin-top: 10px; }
.tn-review-section > h4 { font-size: 12px; color: var(--muted); margin: 0 0 6px; font-weight: 500; }
.tn-candidates { list-style: none; margin: 0; padding: 0; }
.tn-candidates li { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; margin-bottom: 6px; display: flex; gap: 9px; align-items: flex-start; cursor: pointer; }
.tn-candidates li:hover { background: #f8faf7; }
.tn-candidates li.selected { border-color: var(--brand); background: var(--brand-soft); }
.tn-candidates input[type="radio"] { margin-top: 3px; }
.tn-candidate-meta { color: var(--muted); font-size: 12px; margin-top: 1px; }
.tn-diff { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; font-size: 12px; }
.tn-diff .tn-diff-key { color: var(--muted); }
.tn-diff .tn-diff-old { color: var(--danger); text-decoration: line-through; }
.tn-diff .tn-diff-new { color: var(--ok); }

/* ---------- 设置/授权面板 ---------- */
.tn-device { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 13px; margin-bottom: 8px; }
.tn-device .tn-device-name { font-weight: 600; font-size: 13px; }
.tn-device .tn-device-meta { color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.7; }
.tn-state-pill { display: inline-block; border-radius: 999px; font-size: 11px; padding: 1px 9px; margin-left: 6px; }
.state-ok { background: var(--ok-soft); color: var(--ok); }
.state-warn { background: var(--warn-soft); color: var(--warn); }
.state-muted { background: #eef1ec; color: var(--muted); }
.state-err { background: var(--danger-soft); color: var(--danger); }
.tn-pref-group { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 14px; margin-bottom: 12px; }
.tn-pref-group h4 { margin: 0 0 8px; font-size: 13px; }
.tn-range-row { display: flex; align-items: center; gap: 10px; }
.tn-range-row input[type="range"] { flex: 1; }
.tn-range-val { font-family: var(--font-sans); font-size: 17px; min-width: 52px; text-align: right; }
.tn-danger-zone { border: 1px solid #efc9c3; border-radius: var(--radius-sm); padding: 13px 14px; background: #fdf7f6; }
.tn-scope-list { margin: 8px 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.tn-progress-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; }
.tn-progress-list li { display: flex; gap: 8px; padding: 3px 0; color: var(--muted); }
.tn-progress-list .tn-progress-key { min-width: 150px; color: var(--ink); }

/* ---------- 落地页 ---------- */
.tn-landing-wrap { max-width: 560px; margin: 0 auto; padding: 7vh 20px 60px; }
.tn-landing-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-top: 16px; }
.tn-landing-card h1 { font-family: var(--font-sans); font-size: 22px; margin: 0 0 4px; }
.tn-landing-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.tn-landing-meta { color: var(--muted); font-size: 12px; margin-top: 14px; line-height: 1.8; }

/* ---------- Toast ---------- */
.tn-toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.tn-toast { background: #202624; color: #fff; border-radius: 999px; padding: 8px 18px; font-size: 13px; box-shadow: var(--shadow); max-width: min(560px, 92vw); }
.tn-toast.err { background: var(--danger); }
.tn-toast.ok { background: var(--ok); }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .tn-sidebar { width: 216px; flex-basis: 216px; }
  .tn-topbar { padding-left: 18px; padding-right: 18px; }
  .tn-main { padding-left: 18px; padding-right: 18px; }
  .tn-match-dim-grid, .tn-match-summary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .tn-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(286px, 86vw); height: 100vh;
    transform: translateX(-102%); transition: transform 0.18s ease; box-shadow: var(--shadow);
  }
  .tn-shell.nav-open .tn-sidebar { transform: translateX(0); }
  .tn-nav-scrim { display: none; position: fixed; inset: 0; z-index: 40; background: rgba(21, 26, 25, 0.32); }
  .tn-shell.nav-open .tn-nav-scrim { display: block; }
  .tn-menu-button { display: inline-flex; }
  .tn-workspace { width: 100%; }
}
@media (max-width: 760px) {
  .tn-stats { grid-template-columns: 1fr; }
  .tn-header-inner { padding: 10px 14px; }
  .tn-topbar { padding: 14px 12px 0; }
  .tn-topbar-title { font-size: 21px; }
  .tn-topbar-note { display: none; }
  .tn-main { padding: 14px 12px 60px; }
  .tn-toolbar .tn-search { flex: 1 1 100%; }
  .tn-toolbar-right { margin-left: 0; width: 100%; }
  .tn-facts, .tn-form-grid { grid-template-columns: 1fr; }
  .tn-login-slogan { font-size: 26px; }
  .tn-drawer { width: 100vw; }
  .tn-match-core { grid-template-columns: 1fr; }
  .tn-match-picker { align-items: stretch; }
  .tn-match-picker .tn-match-select { width: 100%; }
  .tn-match-picker .tn-btn { width: 100%; }
  .tn-gate-table { min-width: 720px; }
}

/* 刚由邮件更新的记录；字段缺失仍显示待补充。 */
.tn-row-updated { background: #e9f5e9; }
.tn-review-failed { border-color: #b42318; }

/* 邮件管理员入口沿用现有视觉样式；预览被隔离，变量不注入主页面。 */
.mail-admin-heading { flex-wrap: wrap; margin-bottom: 20px; }
.mail-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin: 24px 0; align-items: start; }
.mail-card { min-width: 0; padding: 24px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--panel); }
.mail-card .tn-btn { min-height: 44px; margin: 6px 8px 6px 0; white-space: normal; }
.mail-card textarea { width: 100%; min-height: 80px; font-family: var(--font-sans); }
.mail-card label { display: block; }
.mail-rule-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, .6fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #e0e6e2; }
.mail-preview-frame { width: 100%; height: 420px; margin: 12px 0; border: 1px solid #ccd7d0; background: white; }
.mail-pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; background: #f4f7f5; color: #183c32; max-height: 420px; overflow: auto; }
.mail-error { padding: 16px; margin: 16px 0; background: var(--danger-soft); color: #872f29; border: 1px solid var(--danger); }
.mail-record { border-top: 1px solid #ccd7d0; padding: 16px 0; overflow-wrap: anywhere; }
.mail-card summary { cursor: pointer; padding: 12px 0; }
@media (max-width: 900px) { .mail-admin-grid { grid-template-columns: minmax(0, 1fr); } .mail-card { padding: 16px; } .mail-rule-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 台账勾选对比 / 简历与 AI ---------- */
.tn-career { max-width: 1120px; margin: 0 auto; padding: 8px 0 40px; }
.tn-career-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin: 8px 0 18px; }
.tn-career-head h1 { margin: 0 0 6px; font-size: 24px; }
.tn-career-head p { margin: 0; max-width: 720px; }
.tn-ai-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.tn-ai-section-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 12px; }
.tn-ai-section-head h2 { margin: 0; font-size: 18px; }
.tn-ai-notice { margin-bottom: 12px; }
.tn-ai-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.tn-ai-paste { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.tn-ai-paste textarea { flex: 1; min-width: 260px; }
.tn-ai-resume-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 10px 0 4px; border-top: 1px dashed var(--line); }
.tn-ai-edit { margin: 10px 0; }
.tn-ai-edit textarea { width: 100%; margin-bottom: 8px; }
.tn-ai-profile { margin-top: 14px; }
.tn-ai-summary { font-size: 14px; line-height: 1.8; margin: 6px 0 12px; }
.tn-ai-block { margin-top: 14px; }
.tn-ai-block h4 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.tn-ai-block ul { margin: 0; padding-left: 20px; line-height: 1.8; }
.tn-ai-item { border-left: 2px solid var(--line); padding: 4px 0 4px 10px; margin: 6px 0; }
.tn-ai-item p { margin: 0 0 3px; }
.tn-ai-evidence { margin: 4px 0 0; padding: 4px 8px; border-left: 2px solid var(--brand); color: var(--muted); font-size: 12px; line-height: 1.6; }
.tn-ai-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tn-ai-chip { border: 1px solid var(--line); background: var(--brand-soft); border-radius: 999px; padding: 3px 9px; font-size: 12px; }
.tn-ai-report { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.tn-ai-job { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 10px 0; }
.tn-ai-job-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.tn-ai-level { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 11px; border: 1px solid var(--line); }
.tn-ai-level.ok { background: #e8f1ed; color: #17594c; border-color: #cfe2da; }
.tn-ai-level.warn { background: #fff6e6; color: #8a5a12; border-color: #f1dfbc; }
.tn-ai-level.muted { background: #f3f4f1; color: var(--muted); }
.tn-ai-history { margin-top: 14px; font-size: 12px; }
.tn-ai-history summary { cursor: pointer; color: var(--muted); }
@media (max-width: 760px) {
  .tn-career { padding-left: 10px; padding-right: 10px; }
  .tn-ai-card { padding: 14px; }
}

/* 待确认标题链接 + 台账状态直改 */
.tn-review-title a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.tn-review-title a:hover { border-bottom-color: var(--brand); color: var(--brand-ink); }
.tn-status-editor { display: inline-flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.tn-status-edit { min-width: 104px; max-width: 130px; }
.tn-status-stack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: 100%; min-width: 0; }
.tn-status-meta { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; white-space: nowrap; font-size: 12px; line-height: 18px; }
.tn-status-meta .tn-round { max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-status-meta .tn-flag { margin-left: 0; flex: none; }
.tn-status-date-wrap { display: flex; gap: 4px; align-items: center; }
.tn-status-date { width: 128px; padding: 3px 6px; font-size: 12px; }
.tn-status-date-wrap .tn-btn { padding: 2px 7px; }

/* 确认入账：识别中/补录弹窗 */
.tn-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.tn-form-grid > label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.tn-form-grid > label .tn-input, .tn-form-grid > label .tn-select { width: 100%; }
.tn-form-grid > label[hidden] { display: none; }
.tn-modal-source { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.tn-modal-source summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.tn-modal-source .tn-review-preview { margin: 8px 0; max-height: 180px; overflow: auto; white-space: pre-wrap; }
@media (max-width: 640px) { .tn-form-grid { grid-template-columns: 1fr; } }

/* 确认入账：字段级错误和识别轨迹 */
.tn-field-error { min-height: 14px; color: var(--danger); font-size: 12px; line-height: 1.35; }
.tn-trace { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
.tn-trace summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.tn-trace-pre { margin: 8px 0 0; padding: 10px; background: var(--bg); border-radius: 8px; font-size: 12px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; color: var(--text); max-height: 260px; overflow: auto; }

/* 插件下载与安装指引（不重做 UI，只复用现有弹窗/按钮） */
.tn-plugin-steps { margin: 14px 0 12px 20px; padding: 0; color: var(--text); font-size: 13px; line-height: 1.8; }
.tn-plugin-steps li { margin: 2px 0; }

/* Readable model-organized job content; source text is never rendered as HTML. */
.tn-jd-sections { margin: 24px 0; }
.tn-jd-sections .tn-drawer-section { margin: 0 0 28px; }
.tn-jd-items { margin: 12px 0 0; padding-left: 1.5em; line-height: 1.9; overflow-wrap: anywhere; }
div.tn-jd-items { padding-left: 0; }
.tn-jd-items li { padding-left: .4em; margin: 0 0 12px; white-space: pre-wrap; }
.tn-jd-items p { margin: 0 0 12px; white-space: pre-wrap; }
.tn-jd-items li::marker { color: var(--muted, #66756e); font-variant-numeric: tabular-nums; }
.tn-jd-original { line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }

/* JD prose and compact attributes: scoped to the job-content section. */
.tn-jd-prose { line-height: 1.85; overflow-wrap: anywhere; }
.tn-jd-prose p { margin: 0 0 12px; }
.tn-jd-prose p:last-child { margin-bottom: 0; }
.tn-jd-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 10px; }
.tn-jd-tag { display: inline-block; max-width: 100%; padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.tn-jd-note { flex-basis: 100%; line-height: 1.85; overflow-wrap: anywhere; }

/* ---------- 单岗位匹配报告 ---------- */
.tn-match-card { padding-bottom: 20px; }
.tn-match-picker { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tn-match-picker .tn-match-select { flex: 0 1 420px; min-width: 220px; }
.tn-match-jobline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0 0; border-top: 1px dashed var(--line); margin-top: 12px; }
.tn-match-history { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.tn-match-history .tn-select { width: auto; max-width: 300px; }
.tn-match-report { border-top: 2px solid var(--brand-soft); }
.tn-match-report-head { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 4px 0 12px; }
.tn-match-report-head h3 { margin: 0 0 3px; font-size: 19px; }
.tn-match-version { margin-left: auto; color: var(--faint); font-size: 10px; letter-spacing: 0.06em; }
.tn-match-core { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-match-core-card { border: 1px solid var(--line); border-left: 4px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px 14px; background: #fcfdfb; }
.tn-match-core-card.ok { border-left-color: var(--ok); background: #f7fbf8; }
.tn-match-core-card.warn { border-left-color: var(--warn); background: #fffaf3; }
.tn-match-core-card.bad { border-left-color: var(--danger); background: #fdf8f7; }
.tn-match-core-label { color: var(--muted); font-size: 12px; }
.tn-match-core-value { font-family: var(--font-sans); font-size: 25px; line-height: 1.25; margin: 3px 0 5px; }
.tn-match-core-card.ok .tn-match-core-value { color: var(--brand); }
.tn-match-core-card.warn .tn-match-core-value { color: var(--warn); }
.tn-match-core-card.bad .tn-match-core-value { color: var(--danger); }
.tn-match-core-summary { margin: 0 0 5px; line-height: 1.7; }
.tn-match-advice { margin-top: 12px; padding: 10px 13px; background: var(--brand-soft); color: var(--brand-dark); border-radius: var(--radius-sm); line-height: 1.75; }
.tn-match-section-block { margin-top: 20px; }
.tn-match-section-block > h4 { margin: 0 0 9px; font-size: 13px; color: var(--brand); }
.tn-match-section-block > h5, .tn-match-interview h5 { margin: 12px 0 6px; font-size: 13px; }
.tn-gate-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.tn-gate-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12.5px; }
.tn-gate-table th { text-align: left; background: #f7f9f6; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tn-gate-table td { padding: 9px 10px; border-bottom: 1px solid #eef1ec; vertical-align: top; line-height: 1.65; }
.tn-gate-table tr:last-child td { border-bottom: none; }
.tn-gate-result { display: inline-block; border-radius: 999px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.tn-gate-result.ok { background: var(--ok-soft); color: var(--ok); }
.tn-gate-result.bad { background: var(--danger-soft); color: var(--danger); }
.tn-gate-result.warn { background: var(--warn-soft); color: var(--warn); }
.tn-gate-result.muted { background: #eef1ec; color: var(--muted); }
.tn-match-quote { color: var(--faint); font-size: 11px; line-height: 1.55; margin-top: 3px; }
.tn-match-dim-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-match-dim { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; min-width: 0; background: #fff; }
.tn-match-dim-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid #eef1ec; padding-bottom: 7px; margin-bottom: 8px; }
.tn-match-dim-head h5 { margin: 0; font-size: 14px; }
.tn-match-field { margin: 7px 0; }
.tn-match-field-label { color: var(--faint); font-size: 10px; letter-spacing: 0.06em; margin-bottom: 2px; }
.tn-match-field p { margin: 0; line-height: 1.7; }
.tn-match-evidence { display: flex; flex-direction: column; gap: 4px; }
.tn-match-evidence-row { min-width: 0; }
.tn-match-source { display: inline-block; background: #eef3ed; color: var(--muted); border-radius: 4px; padding: 0 5px; font-size: 10px; }
.tn-match-evidence .tn-ai-evidence { margin-top: 2px; }
.tn-match-dim-actions { margin-top: 8px; }
.tn-match-list { margin: 4px 0 0; padding-left: 18px; line-height: 1.8; }
.tn-match-list li { margin: 2px 0; }
.tn-match-list .tn-btn { margin-left: 6px; vertical-align: baseline; }
.tn-match-dim-tag { display: inline-block; border: 1px solid var(--line); background: #f6f8f4; color: var(--muted); border-radius: 4px; padding: 0 5px; margin-right: 5px; font-size: 10px; line-height: 17px; vertical-align: 1px; }
.tn-match-summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tn-match-summary-grid > div { min-width: 0; }
.tn-match-summary-grid h5 { margin: 0 0 5px; font-size: 13px; }
.tn-match-subhead { margin-top: 15px !important; color: var(--muted); }
.tn-match-actions-wrap { border-top: 1px dashed var(--line); padding-top: 14px; }
.tn-match-actions .tn-btn { white-space: normal; }
.tn-match-action-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; background: #fbfcfa; }
.tn-match-action-panel h5 { margin: 0 0 4px; }
.tn-match-action-panel textarea { width: 100%; margin: 8px 0 4px; font-family: var(--font-sans); font-size: 13px; line-height: 1.65; }
.tn-match-interview { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; background: #fbfcfa; }
.tn-match-interview ol { margin: 0; padding-left: 20px; line-height: 1.7; }
.tn-match-interview li { margin: 6px 0; }
.tn-match-interview p { margin: 0 0 2px; }
.tn-match-limitations { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 9px; color: var(--muted); font-size: 12px; }
.tn-match-limitations summary { cursor: pointer; color: var(--muted); }
.tn-match-limitations ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.8; }
.tn-match-correction-item { border-top: 1px dashed var(--line); padding: 7px 0; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; line-height: 1.7; }
.tn-match-correction-form { min-width: 0; }
.tn-match-original { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #f7f9f6; margin-bottom: 12px; }
.tn-match-original p { margin: 3px 0 0; line-height: 1.7; }
.tn-match-correction-preview { margin-top: 8px; padding: 9px 11px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fbfcfa; }
.tn-ai-level.bad { background: var(--danger-soft); color: var(--danger); border-color: #efc9c3; }

/* 匹配样式定义在通用响应式之后；这里补最后一层窄屏覆盖，保证单列阅读。 */
@media (max-width: 760px) {
  .tn-match-core, .tn-match-dim-grid, .tn-match-summary-grid { grid-template-columns: 1fr; }
  .tn-match-picker { align-items: stretch; }
  .tn-match-picker .tn-match-select, .tn-match-picker .tn-btn { width: 100%; }
  .tn-match-report-head .tn-match-version { margin-left: 0; }
}

/* 验收修复：岗位搜索、摘要回链、简历修改建议逐条证据 */
.tn-match-search { flex: 1 1 230px; min-width: 190px; }
.tn-summary-evidence { display: inline-flex; gap: 4px; align-items: center; margin-left: 4px; vertical-align: baseline; }
.tn-summary-evidence .tn-btn { padding: 1px 6px; font-size: 11px; }
.tn-evidence-flash { animation: tn-evidence-flash 1.5s ease; }
@keyframes tn-evidence-flash { 0%, 100% { box-shadow: none; } 20%, 70% { box-shadow: 0 0 0 3px rgba(23, 89, 76, 0.25); } }
.tn-resume-suggestion { border-top: 1px dashed var(--line); padding: 12px 0 4px; }
.tn-resume-suggestion:first-of-type { border-top: none; }
.tn-resume-suggestion textarea { width: 100%; font-size: 13px; }
.tn-match-report-status { margin-top: 12px; }
@media (max-width: 760px) {
  .tn-match-search { width: 100%; flex-basis: 100%; }
  .tn-summary-evidence { display: flex; margin-left: 0; margin-top: 3px; }
}

/* 单岗报告：先结论，按需展开证据（2026-11-20 审查） */
.tn-state-icon { display: inline-block; margin-right: 4px; font-weight: 700; }
.tn-match-dim { padding: 0; overflow: hidden; align-self: start; }
.tn-match-dim.expanded { grid-column: 1 / -1; border-color: #bfd8cb; box-shadow: 0 0 0 1px #e1eee7; }
.tn-match-dim-summary {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px 13px;
  border: 0; background: #fff; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.tn-match-dim-summary:hover { background: #f8faf7; }
.tn-match-dim-summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tn-match-dim-summary .tn-match-dim-head { width: 100%; border: 0; padding: 0; margin: 0; flex-wrap: nowrap; }
.tn-match-dim-name { font-size: 14px; font-weight: 600; }
.tn-match-dim-chevron { margin-left: auto; color: var(--muted); font-size: 16px; line-height: 1; }
.tn-match-dim-detail { padding: 0 13px 13px; border-top: 1px solid #eef1ec; }
.tn-match-dim-detail-inner { padding-top: 11px; }
.tn-match-requirement-table { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin: 4px 0 12px; }
.tn-match-requirement-row { display: grid; grid-template-columns: 1.15fr 1fr auto; gap: 12px; padding: 9px 10px; border-bottom: 1px solid #eef1ec; align-items: start; }
.tn-match-requirement-row:last-child { border-bottom: none; }
.tn-match-requirement-head { background: #f7f9f6; color: var(--muted); font-size: 11px; }
.tn-match-requirement-cell { min-width: 0; }
.tn-match-requirement-cell p { margin: 0; line-height: 1.7; overflow-wrap: anywhere; }
.tn-match-judgement { justify-self: start; }
.tn-mobile-label { display: none; color: var(--faint); font-size: 10px; margin-bottom: 2px; }
.tn-match-gate-detail { padding-top: 10px; }
.tn-match-quote-detail { margin-top: 4px; color: var(--muted); font-size: 11px; }
.tn-match-quote-detail summary { cursor: pointer; color: var(--brand); }
.tn-match-quote-detail blockquote { margin: 4px 0 0; padding: 4px 8px; border-left: 2px solid var(--brand); background: #f8faf7; line-height: 1.65; overflow-wrap: anywhere; }
.tn-match-evidence-detail { margin: 8px 0; color: var(--muted); font-size: 12px; }
.tn-match-evidence-detail summary { cursor: pointer; color: var(--brand); }
.tn-match-evidence-detail .tn-match-evidence { margin-top: 5px; }
@media (max-width: 760px) {
  .tn-match-requirement-head { display: none; }
  .tn-match-requirement-row { grid-template-columns: 1fr; gap: 7px; padding: 10px; }
  .tn-mobile-label { display: block; }
  .tn-match-requirement-row > .tn-match-requirement-cell { border-top: 1px dashed #eef1ec; padding-top: 7px; }
  .tn-match-requirement-row > .tn-match-requirement-cell:first-child { border-top: 0; padding-top: 0; }
  .tn-match-dim.expanded { grid-column: auto; }
  .tn-match-dim-summary { padding: 12px; }
}

/* 2026-11-21 前端可读性改版：简历版本、设置页、匹配分组与推荐卡 */
.tn-settings-page { max-width: 980px; }
.tn-settings-body { background: transparent; }
.tn-settings-tabs { margin-bottom: 16px; }
.tn-settings-panel { min-width: 0; }
.tn-settings-subtitle { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.tn-settings-panel > .tn-pref-group:first-child { margin-top: 0; }

.tn-resume-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 2px 0 12px; }
.tn-resume-paste { margin: 0 0 12px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fbfcfa; }
.tn-resume-uploads { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; }
.tn-resume-upload-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.tn-resume-current { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 13px 14px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius-sm); background: #fbfdfb; }
.tn-resume-current-main { min-width: 0; }
.tn-resume-current-main strong { display: block; margin: 2px 0; font-size: 16px; overflow-wrap: anywhere; }
.tn-resume-current-actions { display: flex; align-items: center; }
.tn-resume-profile { margin-top: 14px; }
.tn-resume-profile-primary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tn-resume-profile-group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.tn-resume-profile-group > summary, .tn-resume-profile-more-wrap > summary { cursor: pointer; padding: 10px 12px; }
.tn-resume-profile-group > summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; list-style: none; }
.tn-resume-profile-group > summary::-webkit-details-marker { display: none; }
.tn-resume-profile-group > summary strong { font-size: 14px; }
.tn-resume-profile-preview { color: var(--muted); font-size: 12px; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-resume-profile-more { color: var(--faint); font-size: 11px; }
.tn-resume-profile-items { padding: 0 12px 10px; border-top: 1px solid #eef1ec; }
.tn-resume-profile-items .tn-ai-item { margin-top: 8px; }
.tn-resume-profile-more-wrap { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfa; }
.tn-resume-profile-more-wrap > summary { color: var(--muted); font-size: 13px; }
.tn-resume-profile-more-items { padding: 0 10px 10px; }
.tn-resume-profile-more-items .tn-resume-profile-group { margin-top: 8px; }
.tn-resume-profile-empty { margin-top: 10px; }
.tn-resume-preview { margin-top: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; padding: 12px; }
.tn-resume-preview-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.tn-resume-preview-head strong { font-size: 15px; }
.tn-resume-preview-text { max-height: 280px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: #f7f9f6; border-radius: 6px; padding: 10px; font: 13px/1.65 var(--font-sans); }
.tn-resume-editor { margin: 12px 0; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fbfcfa; }
.tn-resume-edit-area { min-height: 180px; font: 13px/1.65 var(--font-sans); }
.tn-resume-history { margin-top: 18px; border-top: 1px dashed var(--line); padding-top: 12px; }
.tn-resume-history h3 { margin: 0 0 8px; font-size: 16px; }
.tn-resume-version-list { display: flex; flex-direction: column; gap: 6px; }
.tn-resume-version-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.tn-resume-version-main { min-width: 0; }
.tn-resume-version-main strong { display: block; overflow-wrap: anywhere; }
.tn-resume-version-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.tn-match-current-resume { margin: 7px 0 0; }
.tn-match-history-list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fbfcfa; }
.tn-match-history-item { display: grid; grid-template-columns: 145px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; padding: 7px 8px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tn-match-history-item:hover { background: #f1f5ef; }
.tn-match-history-item.active { border-color: #cfe2d6; background: #eef7f1; }
.tn-match-history-date { color: var(--muted); font-size: 11px; }
.tn-match-history-resume { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.tn-match-report-info { margin-left: auto; color: var(--muted); }
.tn-match-report-info summary { cursor: pointer; }
.tn-summary-groups { display: flex; flex-direction: column; gap: 7px; }
.tn-summary-group { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.tn-summary-group > summary { display: flex; gap: 10px; align-items: center; cursor: pointer; padding: 9px 11px; }
.tn-summary-group > summary strong { font-size: 14px; }
.tn-summary-group > summary span { margin-left: auto; text-align: right; }
.tn-summary-group-body { border-top: 1px solid #eef1ec; padding: 8px 11px 10px; }
.tn-summary-status + .tn-summary-status { margin-top: 8px; }
.tn-summary-status h5 { margin: 0 0 3px; font-size: 12px; }
.tn-summary-status.ok h5 { color: var(--ok); }
.tn-summary-status.bad h5 { color: var(--danger); }
.tn-summary-status.warn h5 { color: var(--warn); }

.tn-recommend-job { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.tn-recommend-job-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.tn-recommend-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.tn-recommend-card { min-width: 0; padding: 9px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #f8faf7; }
.tn-recommend-card.ok { background: var(--ok-soft); border-color: #c9e5d5; }
.tn-recommend-card.warn { background: var(--warn-soft); border-color: #efddbd; }
.tn-recommend-card h4 { margin: 0 0 5px; font-size: 13px; font-weight: 600; }
.tn-recommend-card p { margin: 3px 0; line-height: 1.65; overflow-wrap: anywhere; }
.tn-recommend-next { margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line); }
.tn-recommend-actions { margin-top: 8px; }

@media (max-width: 760px) {
  .tn-resume-profile-primary, .tn-recommend-cards { grid-template-columns: 1fr; }
  .tn-resume-current, .tn-resume-version-row { align-items: stretch; }
  .tn-resume-current-actions, .tn-resume-version-actions { justify-content: flex-start; }
  .tn-match-history-item { grid-template-columns: 1fr auto; }
  .tn-match-history-resume { grid-column: 1 / -1; white-space: normal; }
  .tn-match-report-info { margin-left: 0; flex-basis: 100%; }
}
.tn-mail-progress { display: grid; gap: 4px; margin: 8px 0; } .tn-mail-progress progress { width: min(100%, 32rem); accent-color: var(--brand); }

/* 招聘邮箱同步进度：局部更新，不使用静态比例行 */
.tn-mail-progress { display: grid; gap: 5px; margin: 8px 0 10px; max-width: 34rem; }
.tn-mail-progress-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 13px; color: var(--ink); }
.tn-mail-progress-head strong { font-variant-numeric: tabular-nums; color: var(--brand); }
.tn-mail-progress progress { width: 100%; height: 9px; accent-color: var(--brand); }
.tn-mail-progress progress:not([value]) { accent-color: var(--muted); opacity: .75; }
.tn-mail-progress.is-ok progress { accent-color: var(--ok); }
.tn-mail-progress.is-error progress { accent-color: var(--danger); }

/* 2026-11-22 台账主表精简：5 列、状态色块、极简行距 */
table.tn-table { min-width: 760px; table-layout: fixed; }
.tn-table th { background: #f7f8fa; color: #5c6573; font-weight: 600; padding: 13px 16px; border-bottom: 1px solid #eef0f3; }
.tn-table td { padding: 15px 16px; border-bottom: 1px solid #eef0f3; }
.tn-table th:nth-child(1) { width: 20%; }
.tn-table th:nth-child(2) { width: 30%; }
.tn-table th:nth-child(3) { width: 20%; }
.tn-table th:nth-child(4) { width: 15%; }
.tn-table th:nth-child(5) { width: 15%; }
.tn-table-card { border-top: 1px solid var(--line); border-radius: var(--radius); }
.tn-status-pill {
  width: auto; min-width: 104px; max-width: 150px; appearance: none; -webkit-appearance: none;
  border-radius: 8px; border: 1px solid transparent; padding: 5px 25px 5px 10px;
  font-size: 12px; line-height: 1.45; font-weight: 600; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 8px) 50%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.tn-status-pill:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.tn-status-pill.status-applied { background-color: #fff4df; color: #b86b00; border-color: #f5d89e; }
.tn-status-pill.status-assessment { background-color: #e6f5f0; color: #1f7a63; border-color: #b8e3d5; }
.tn-status-pill.status-interview { background-color: #e8f1ff; color: #1d5bbf; border-color: #bdd5ff; }
.tn-status-pill.status-offer { background-color: #e7f7ec; color: #1b7a3d; border-color: #b7e4c7; }
.tn-status-pill.status-rejected { background-color: #fdeceb; color: #c93b3b; border-color: #f8c6c3; }
.tn-status-pill.status-closed { background-color: #f1f3f5; color: #5c6573; border-color: #d8dde4; }
.tn-status-pill.status-pending { background-color: #f4f2ff; color: #5b46b8; border-color: #d9d2fc; }
@media (max-width: 760px) {
  table.tn-table { min-width: 0; display: block; table-layout: auto; }
  .tn-table thead { display: none; }
  .tn-table tbody { display: block; }
  .tn-table tr.tn-row-click, .tn-table tr.tn-skeleton-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 12px; padding: 13px 14px; border-bottom: 1px solid #eef0f3;
  }
  .tn-table tr:last-child { border-bottom: none; }
  .tn-table td { display: block; width: auto; padding: 0; border: none; min-width: 0; }
  .tn-table td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 600; }
  .tn-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .tn-table td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .tn-table td:nth-child(4) { grid-column: 1; grid-row: 3; font-size: 12px; color: var(--muted); }
  .tn-table td:nth-child(5) { grid-column: 2; grid-row: 3; text-align: right; font-size: 12px; color: var(--muted); }
  .tn-table td:nth-child(4)::before { content: "已投 "; }
  .tn-table td:nth-child(5)::before { content: "更新 "; }
  .tn-table .tn-job-sub { margin-top: 2px; }
  .tn-status-pill { min-width: 94px; max-width: 132px; }
}

/* v1.1.0 AI 求职助手 */
.tn-assistant { display: flex; flex-direction: column; min-height: calc(100vh - 150px); gap: 14px; padding-bottom: 84px; box-sizing: border-box; }
.tn-assistant-top { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.tn-assistant-top h2 { margin:0; font-size:24px; letter-spacing:-.02em; }
.tn-assistant-subtitle { margin:5px 0 0; color:var(--muted); font-size:13px; }
.tn-assistant-top-actions { display:flex; gap:8px; flex-wrap:wrap; }
.tn-assistant-welcome { background:linear-gradient(135deg,#f7fbf8,#fffdf7); border:1px solid var(--line); border-radius:16px; padding:20px; }
.tn-assistant-greeting { font-size:18px; font-weight:650; margin-bottom:12px; }
.tn-assistant-context-pills { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.tn-agent-pill { display:inline-flex; align-items:center; padding:4px 9px; border-radius:999px; background:#eef5ef; color:#365b47; font-size:12px; }
.tn-agent-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.tn-agent-quick-card { text-align:left; border:1px solid #e2e9df; background:#fff; border-radius:12px; padding:12px; cursor:pointer; display:flex; flex-direction:column; gap:6px; color:var(--ink); }
.tn-agent-quick-card:hover { border-color:#8ebaa0; box-shadow:0 3px 12px rgba(45,92,64,.08); }
.tn-agent-quick-card strong { font-size:13px; }
.tn-agent-quick-card span { font-size:11px; color:var(--muted); line-height:1.45; }
.tn-assistant-thread { display:flex; flex-direction:column; gap:12px; flex:1; min-height:180px; }
.tn-agent-message { display:flex; flex-direction:column; gap:6px; max-width:920px; }
.tn-agent-message.user { align-self:flex-end; align-items:flex-end; }
.tn-agent-message-head { display:flex; gap:8px; align-items:center; font-size:11px; color:var(--muted); flex-wrap:wrap; }
.tn-agent-permission { padding:2px 7px; border-radius:999px; background:#f4f2ff; color:#5b46b8; }
.tn-agent-bubble { padding:12px 14px; border-radius:12px; font-size:13px; line-height:1.7; }
.tn-agent-bubble.user { background:#dff3e7; color:#1c5136; border-bottom-right-radius:3px; max-width:720px; white-space:pre-wrap; }
.tn-agent-bubble.assistant { background:#fff; border:1px solid var(--line); border-top-left-radius:3px; }
.tn-agent-bubble p { margin:0 0 6px; }
.tn-agent-bubble p:last-child { margin-bottom:0; }
.tn-agent-boundary { align-self:center; color:var(--muted); font-size:11px; background:#f4f5f3; border-radius:999px; padding:4px 10px; }
.tn-agent-links { display:flex; gap:6px; flex-wrap:wrap; }
.tn-agent-link { font-size:12px; color:var(--brand-ink); border-bottom:1px solid #b9d6c4; text-decoration:none; }
.tn-agent-suggestions { display:flex; gap:6px; flex-wrap:wrap; }
.tn-agent-suggestion { border:1px solid #dce9df; background:#f8fbf8; color:#3d6952; border-radius:999px; padding:5px 9px; font-size:11px; cursor:pointer; }
.tn-agent-status { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; padding:4px 2px; }
.tn-agent-pulse { width:7px; height:7px; border-radius:50%; background:#68a77f; animation:tn-agent-pulse 1.1s infinite; }
@keyframes tn-agent-pulse { 50% { opacity:.25; transform:scale(.7); } }
.tn-agent-action { border:1px solid #ecdba9; background:#fffdf4; border-radius:12px; padding:12px; margin-top:6px; }
.tn-agent-action-head { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.tn-agent-action-status { color:#9c6b05; font-size:11px; }
.tn-agent-action-body { display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.tn-agent-action-row { font-size:12px; background:#fff; border-radius:7px; padding:5px 8px; }
.tn-agent-risk { color:#a15c00; font-size:11px; }
.tn-agent-action-buttons { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.tn-agent-diff { border-top:1px dashed #e4e0cf; padding:8px 0; font-size:12px; }
.tn-agent-diff-title { font-weight:650; margin-bottom:4px; }
.tn-agent-diff-old { color:#8e6b6b; text-decoration:line-through; text-decoration-color:#d8b9b9; }
.tn-agent-diff-new { color:#246345; }
.tn-assistant-context-bar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:8px 0 5px; }
.tn-assistant-context-label { font-size:12px; color:var(--muted); }
.tn-assistant-context-field { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--muted); }
.tn-assistant-context-field .tn-select { width:auto; max-width:220px; }
.tn-assistant-composer { position:sticky; bottom:0; background:linear-gradient(180deg,rgba(248,250,247,0),#f8faf7 20%); padding-top:8px; }
.tn-assistant-input-row { display:flex; align-items:flex-end; gap:8px; border:1px solid #cfdccf; background:#fff; border-radius:14px; padding:8px; box-shadow:0 4px 18px rgba(36,76,53,.07); }
.tn-assistant-input { flex:1; border:0; resize:none; outline:0; min-height:42px; max-height:150px; padding:5px; font:13px/1.6 inherit; color:var(--ink); background:transparent; }
.tn-assistant-send { align-self:flex-end; }
.tn-agent-history { display:flex; flex-direction:column; gap:6px; max-height:50vh; overflow:auto; }
.tn-agent-history-item { text-align:left; border:1px solid var(--line); background:#fff; border-radius:9px; padding:10px; cursor:pointer; display:flex; flex-direction:column; gap:4px; }
.tn-agent-history-item.active { border-color:#8ebaa0; background:#f5fbf6; }
.tn-agent-history-item span { color:var(--muted); font-size:11px; }
@media (max-width:760px) {
  .tn-agent-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tn-assistant { min-height:auto; }
  .tn-assistant-top { flex-direction:column; }
  .tn-assistant-context-field .tn-select { max-width:150px; }
}
.tn-agent-full-rewrite { white-space:pre-wrap; word-break:break-word; max-height:260px; overflow:auto; background:#fff; border:1px solid #e8e3d4; border-radius:8px; padding:8px; font:12px/1.6 inherit; }

/* v1.1.1 assistant reading, markdown, profile and resume rewrite */
:root { --assistant-font: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.tn-assistant { font-family:var(--assistant-font); height:calc(100vh - 155px); min-height:0; padding-bottom:0; overflow:hidden; }
.tn-assistant-thread { overflow-y:auto; min-height:0; padding:2px 4px 8px 0; scroll-behavior:smooth; }
.tn-assistant-bubble, .tn-agent-bubble { font-family:var(--assistant-font); }
.tn-agent-bubble { font-size:15px; line-height:1.75; letter-spacing:.01em; padding:16px 20px; max-width:780px; }
.tn-agent-bubble p { margin:0 0 10px; }
.tn-agent-bubble p:last-child { margin-bottom:0; }
.tn-agent-bubble.user { max-width:780px; }
.tn-agent-bubble .tn-md-heading { margin:14px 0 7px; line-height:1.4; font-size:17px; color:#173d2a; }
.tn-agent-bubble h3.tn-md-heading { font-size:16px; }
.tn-agent-bubble h4.tn-md-heading { font-size:15px; }
.tn-agent-bubble .tn-md-list { margin:4px 0 12px; padding-left:24px; }
.tn-agent-bubble .tn-md-list li { margin:6px 0; }
.tn-agent-bubble .tn-md-quote { margin:8px 0; padding:6px 12px; border-left:3px solid #b9d6c4; color:var(--muted); background:#f7faf7; }
.tn-agent-bubble code { background:#f0f4ef; border:1px solid #e1e8df; border-radius:4px; padding:1px 5px; font-size:.92em; }
.tn-agent-bubble .tn-md-code { background:#f5f7f4; border:1px solid #e2e9df; border-radius:8px; padding:10px 12px; overflow:auto; font:12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space:pre-wrap; }
.tn-agent-bubble a { color:#246345; text-decoration:underline; text-underline-offset:2px; }
.tn-agent-bubble strong { color:#173d2a; font-weight:700; }
.tn-agent-status-slot { min-height:24px; }
.tn-agent-status { padding:4px 2px; }
.tn-assistant-context-field { gap:6px; }
.tn-context-select { border:1px solid #cfdccf; background:#fff; color:var(--ink); border-radius:8px; padding:6px 9px; font:12px var(--assistant-font); max-width:310px; text-align:left; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tn-context-select:hover { border-color:#8ebaa0; }
.tn-agent-pill.confirmed { background:#e4f4e9; color:#205f3c; }
.tn-agent-pill.pending { background:#fff4d9; color:#8b5b00; }
.tn-agent-onboarding { display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid #d8e7d9; background:#f5fbf6; border-radius:12px; padding:12px 14px; margin-bottom:14px; }
.tn-agent-onboarding p { margin:4px 0 0; }
.tn-agent-status { color:var(--muted); }

/* refined action confirmation card */
.tn-agent-action { border:1px solid #dce6da; background:#fbfdf9; border-radius:14px; padding:16px 18px; margin-top:10px; box-shadow:0 4px 16px rgba(40,78,54,.05); }
.tn-agent-action-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:10px; border-bottom:1px solid #e8efe6; }
.tn-agent-action-head strong { font-size:18px; color:#173d2a; }
.tn-agent-action-status { color:#8a5b00; background:#fff1cf; border-radius:999px; padding:3px 9px; font-size:11px; }
.tn-agent-action-body { display:flex; flex-direction:column; gap:8px; padding:12px 0 4px; }
.tn-agent-kv { display:grid; grid-template-columns:120px 1fr; gap:8px 14px; align-items:start; }
.tn-agent-kv-label { color:#8a968d; font-size:12px; padding-top:2px; }
.tn-agent-kv-value { color:#253d2d; font-size:13px; line-height:1.6; }
.tn-agent-kv-value .tn-agent-action-row { border:0; padding:0; background:transparent; }
.tn-agent-action-row { font-size:13px; background:#f4f8f2; border:1px solid #e3ece1; border-radius:8px; padding:7px 9px; }
.tn-agent-risk { display:flex; gap:7px; align-items:flex-start; background:#fff4f0; border:1px solid #f1d4ca; color:#8a4b36; border-radius:9px; padding:9px 11px; font-size:12px; line-height:1.55; }
.tn-agent-risk::before { content:"⚠"; flex:0 0 auto; }
.tn-agent-action-buttons { display:flex; justify-content:flex-end; gap:8px; margin-top:10px; }
.tn-agent-diff { border-top:1px dashed #e4e0cf; padding:8px 0; font-size:12px; }
.tn-agent-diff-title { font-weight:650; margin-bottom:4px; }
.tn-agent-diff-old { color:#8e6b6b; text-decoration:line-through; text-decoration-color:#d8b9b9; white-space:pre-wrap; }
.tn-agent-diff-new { color:#246345; white-space:pre-wrap; }
.tn-agent-full-rewrite { white-space:pre-wrap; word-break:break-word; max-height:260px; overflow:auto; background:#fff; border:1px solid #e8e3d4; border-radius:8px; padding:8px; font:12px/1.6 inherit; }

/* two-level job picker */
.tn-job-picker { display:flex; flex-direction:column; gap:10px; min-height:260px; }
.tn-job-picker-title { font-weight:650; }
.tn-job-picker-body { display:flex; flex-direction:column; gap:8px; }
.tn-job-picker-choice { text-align:left; border:1px solid var(--line); background:#fff; border-radius:10px; padding:12px 14px; display:flex; flex-direction:column; gap:4px; cursor:pointer; color:var(--ink); }
.tn-job-picker-choice:hover { border-color:#8ebaa0; background:#f6fbf6; }
.tn-job-picker-choice strong { font-size:14px; }
.tn-job-picker-choice span { color:var(--muted); font-size:12px; }
.tn-job-picker-list-head { display:flex; align-items:center; gap:8px; }
.tn-job-picker-list-head .tn-small { margin-left:auto; }
.tn-job-picker-list { display:flex; flex-direction:column; gap:6px; max-height:46vh; overflow:auto; padding:2px; }
.tn-job-picker-item { display:flex; align-items:center; justify-content:space-between; gap:10px; text-align:left; background:#fff; border:1px solid var(--line); border-radius:9px; padding:9px 11px; cursor:pointer; color:var(--ink); }
.tn-job-picker-item:hover, .tn-job-picker-item.selected { border-color:#8ebaa0; background:#f5fbf6; }
.tn-job-picker-item-main { display:flex; flex-direction:column; gap:3px; min-width:0; }
.tn-job-picker-item-main strong { font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tn-job-picker-status { border-radius:999px; padding:3px 8px; background:#f1f4f0; color:#53675a; font-size:11px; white-space:nowrap; }

/* user profile */
.tn-profile-card { display:flex; justify-content:space-between; align-items:center; gap:16px; background:linear-gradient(135deg,#f4fbf5,#fffdf7); border:1px solid #dce8da; border-radius:12px; padding:12px 14px; margin:10px 0 12px; }
.tn-profile-card-main { display:flex; flex-direction:column; gap:4px; min-width:0; }
.tn-profile-card-head { display:flex; align-items:center; gap:8px; }
.tn-ai-card-kicker { font-size:11px; color:#61816b; letter-spacing:.04em; }
.tn-profile-card-actions { display:flex; gap:6px; flex-shrink:0; }
.tn-profile-form { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.tn-profile-field { display:flex; flex-direction:column; gap:5px; font-size:12px; color:var(--muted); }
.tn-profile-field input { width:100%; }
.tn-state-warn { background:#fff1cf; color:#8a5b00; }

/* resume rewrite workbench */
.tn-career-subtabs { display:flex; gap:6px; padding:2px 0 10px; }
.tn-career-subtab { padding:7px 12px; border-radius:8px; color:var(--muted); font-size:13px; text-decoration:none; }
.tn-career-subtab:hover { background:#f0f5ef; color:var(--ink); }
.tn-career-subtab.active { background:#e5f3e8; color:#205f3c; font-weight:650; }
.tn-rewrite-workbench { display:flex; flex-direction:column; gap:14px; }
.tn-rewrite-config-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.tn-rewrite-config-card { border:1px solid var(--line); background:#fff; border-radius:11px; padding:13px; display:flex; flex-direction:column; gap:5px; align-items:flex-start; }
.tn-rewrite-config-card .tn-btn { margin-top:5px; }
.tn-rewrite-card-label { color:#708176; font-size:11px; letter-spacing:.04em; }
.tn-rewrite-config-actions { display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.tn-rewrite-config-actions textarea { width:100%; }
.tn-rewrite-resume-list { display:flex; flex-direction:column; gap:7px; max-height:48vh; overflow:auto; }
.tn-rewrite-resume-option { display:flex; gap:9px; border:1px solid var(--line); border-radius:9px; padding:10px; cursor:pointer; }
.tn-rewrite-resume-option span { display:flex; flex-direction:column; gap:3px; }
.tn-rewrite-draft-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.tn-rewrite-draft-head h2 { margin:0; font-size:20px; }
.tn-rewrite-columns { display:grid; grid-template-columns:1fr 1fr; gap:12px; align-items:start; }
.tn-rewrite-column { border:1px solid var(--line); border-radius:10px; padding:12px; background:#fff; min-width:0; }
.tn-rewrite-column.original { background:#fafbf9; }
.tn-rewrite-column h3 { margin:0 0 10px; font-size:14px; color:#52665a; }
.tn-rewrite-original-block { font-size:13px; line-height:1.7; white-space:pre-wrap; }
.tn-rewrite-block { font-size:13px; line-height:1.75; white-space:pre-wrap; padding:7px 9px; border-radius:7px; outline:0; }
.tn-rewrite-block:focus { box-shadow:0 0 0 2px #a9d1b7; }
.tn-rewrite-block.supported_optimize { background:#eaf7ee; border:1px solid #c8e7d0; }
.tn-rewrite-block.improvable { background:#f8f7e9; border:1px solid #e9e3bb; }
.tn-rewrite-block.needs_user_fact { background:#fff7df; border:1px solid #eedc9e; }
.tn-rewrite-block.unsupported_blocked { background:#f3f3f1; border:1px dashed #cfcfc8; color:#777; }
.tn-rewrite-annotation { display:flex; gap:6px; flex-wrap:wrap; color:var(--muted); font-size:11px; margin:2px 0 8px; }
.tn-rewrite-align { border-radius:999px; padding:2px 7px; background:#edf3ed; color:#416b50; white-space:nowrap; }
.tn-rewrite-align.supported_optimize { background:#e3f4e8; color:#246345; }
.tn-rewrite-align.improvable { background:#f7f2d8; color:#7e681e; }
.tn-rewrite-align.needs_user_fact { background:#fff0c9; color:#8a5b00; }
.tn-rewrite-align.unsupported_blocked { background:#eeeeeb; color:#777; }
.tn-rewrite-report { border:1px solid var(--line); border-radius:10px; padding:10px 12px; background:#fcfdfb; }
.tn-rewrite-report summary { cursor:pointer; font-size:13px; font-weight:600; }
.tn-rewrite-needs { display:flex; flex-direction:column; gap:5px; margin-top:9px; }
.tn-rewrite-footer { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.tn-rewrite-name { display:flex; flex-direction:column; gap:3px; min-width:300px; }
.tn-rewrite-success { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:#eaf7ee; border:1px solid #c8e7d0; border-radius:10px; padding:10px 12px; }
@media (max-width:760px) {
  .tn-assistant { height:calc(100dvh - 125px); }
  .tn-agent-bubble { font-size:15px; padding:13px 15px; max-width:100%; }
  .tn-agent-kv { grid-template-columns:92px 1fr; }
  .tn-assistant-context-field .tn-select, .tn-context-select { max-width:190px; }
  .tn-profile-card { flex-direction:column; align-items:flex-start; }
  .tn-profile-card-actions { width:100%; }
  .tn-profile-form { grid-template-columns:1fr; }
  .tn-rewrite-config-grid, .tn-rewrite-columns { grid-template-columns:1fr; }
  .tn-rewrite-name { min-width:0; width:100%; }
  .tn-rewrite-footer { justify-content:stretch; }
  .tn-rewrite-footer .tn-btn { width:100%; }
}
.tn-agent-message.error .tn-agent-bubble { border-color:#f0c9bd; background:#fff8f5; }
.tn-agent-error-note { display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:12px; color:#9a5a45; }
.tn-agent-error-note .tn-btn { border-color:#e1baa9; color:#8a4b36; background:#fff; }
.tn-agent-profile-bar { display:flex; align-items:center; justify-content:space-between; gap:14px; border:1px solid #cfe4d4; background:#f1faf3; border-radius:12px; padding:12px 14px; margin-bottom:14px; }
.tn-agent-profile-bar strong { color:#1f5f3c; }
.tn-agent-profile-bar p { margin:3px 0 0; }
.tn-assistant-welcome { flex:0 0 auto; }
