/* ============================================================
   实习投递事务台 · 设计系统
   石墨黑 #141512 / 面板 #1F211C / 正文 #F3F1EB /
   辅助 #BABDB4 / 香槟金 #D1BE91
   全站无蓝、无紫、无蓝紫渐变、无偏蓝青反光。
   ============================================================ */

:root {
  --bg: #141512;
  --panel: #1F211C;
  --panel-2: #262820;
  --panel-3: #2C2E26;
  --text: #F3F1EB;
  --text-2: #BABDB4;
  --text-3: #878A80;
  --accent: #D1BE91;
  --accent-dim: #A89872;
  --accent-ink: #17160F;          /* 金按钮上的石墨文字 */
  --line: rgba(243, 241, 235, 0.09);
  --line-strong: rgba(243, 241, 235, 0.16);
  --line-accent: rgba(209, 190, 145, 0.38);
  /* 状态色：均带文字/图标，不单靠颜色 */
  --st-prepare: #C9B58A;   /* 待准备：暗金 */
  --st-sent: #9BAF8D;      /* 已投递：橄榄绿 */
  --st-interview: #D8CBB2; /* 面试中：浅米 */
  --st-done: #7E8278;      /* 已结束：灰 */
  --warn: #D9A26B;         /* 临期提醒：暖橙（非红，避免警报感） */
  --ok: #9BAF8D;
  --radius: 12px;
  --radius-s: 8px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Consolas, "JetBrains Mono", monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: rgba(209, 190, 145, 0.28); color: var(--text); }

.skip-link {
  position: fixed; left: 12px; top: -48px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: var(--radius-s); font-weight: 600;
  transition: top 0.18s;
}
.skip-link:focus { top: 12px; }

/* ============ 装饰背景层 ============ */
#bg-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.drift-layer {
  position: absolute; width: 130vmax; height: 130vmax;
  left: -15vmax; top: -15vmax;
  will-change: transform;
}
.drift-a {
  background:
    radial-gradient(38% 30% at 30% 34%, rgba(209, 190, 145, 0.045), transparent 70%),
    radial-gradient(30% 26% at 68% 60%, rgba(190, 194, 184, 0.038), transparent 70%);
  animation: driftA 26s ease-in-out infinite alternate;
}
.drift-b {
  background:
    radial-gradient(26% 22% at 62% 28%, rgba(209, 190, 145, 0.03), transparent 70%),
    radial-gradient(34% 28% at 40% 72%, rgba(160, 163, 152, 0.03), transparent 72%);
  animation: driftB 21s ease-in-out infinite alternate;
}
@keyframes driftA {
  from { transform: translate3d(-2.2%, -1.4%, 0) rotate(0.001deg); }
  to   { transform: translate3d(2.4%, 1.8%, 0) rotate(0.001deg); }
}
@keyframes driftB {
  from { transform: translate3d(1.8%, 2.2%, 0) rotate(0.001deg); }
  to   { transform: translate3d(-2%, -1.6%, 0) rotate(0.001deg); }
}

#cursor-glow {
  position: absolute; width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 190, 145, 0.075), rgba(209, 190, 145, 0.028) 45%, transparent 70%);
  transform: translate3d(-50%, -50%, 0);
  opacity: 0;
  will-change: transform, opacity;
}

.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.86 0 0 0 0 0.84 0 0 0 0 0.78 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.016;
}

/* ============ 布局骨架 ============ */
/* hidden 属性必须压过组件的 display 设定 */
[hidden] { display: none !important; }

.app-header, main { position: relative; z-index: 1; }

.app-header {
  max-width: 1240px; margin: 0 auto;
  padding: 26px 28px 0;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { flex: none; margin-top: 2px; }
.brand-text h1 {
  margin: 0; font-size: 21px; font-weight: 650; letter-spacing: 0.02em;
}
.brand-sub {
  margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); letter-spacing: 0.04em;
}

.header-actions { display: flex; align-items: center; gap: 14px; }

.motion-toggle {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
  user-select: none;
}
.motion-toggle input {
  appearance: none; width: 34px; height: 19px; border-radius: 10px;
  background: var(--panel-3); border: 1px solid var(--line-strong);
  position: relative; cursor: pointer; margin: 0; transition: background 0.18s;
}
.motion-toggle input::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--text-2); transition: transform 0.18s, background 0.18s;
}
.motion-toggle input:checked { background: rgba(209, 190, 145, 0.3); border-color: var(--line-accent); }
.motion-toggle input:checked::after { transform: translateX(15px); background: var(--accent); }
.motion-toggle input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 菜单 */
.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  min-width: 196px; padding: 6px;
  background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); box-shadow: var(--shadow);
}
.menu button {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; color: var(--text);
  font: inherit; font-size: 13.5px; padding: 8px 11px;
  border-radius: 6px; cursor: pointer;
}
.menu button:hover { background: rgba(243, 241, 235, 0.06); }
.menu button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu .menu-danger { color: #D9A26B; }

/* ============ 摘要区（低矮） ============ */
.summary-strip {
  margin-top: 20px;
  display: flex; align-items: stretch; gap: 18px;
  background: linear-gradient(180deg, rgba(38, 40, 32, 0.66), rgba(31, 33, 28, 0.66));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-height: 86px;
  backdrop-filter: blur(6px);
}
.summary-stats {
  flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.stat-chip {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 14px;
  background: rgba(20, 21, 18, 0.55);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.stat-chip .num {
  font-family: var(--mono); font-size: 21px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: 0.01em;
}
.stat-chip .lbl { font-size: 12.5px; color: var(--text-2); }
.stat-chip .dot { width: 7px; height: 7px; border-radius: 50%; align-self: center; }
.stat-chip.due-soon { border-color: rgba(217, 162, 107, 0.4); }
.stat-chip.due-soon .num { color: var(--warn); }
.stat-chip.total .num { color: var(--accent); }

.summary-art {
  flex: none; width: 148px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--line);
  align-self: center; height: 74px;
}
.summary-art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  object-position: center 42%;
}

/* ============ 主区 ============ */
main {
  max-width: 1240px; margin: 0 auto;
  padding: 18px 28px 90px;
  display: flex; flex-direction: column; gap: 22px;
}

.panel, .board-section {
  background: linear-gradient(180deg, rgba(38, 40, 32, 0.5), rgba(31, 33, 28, 0.62));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  backdrop-filter: blur(6px);
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.panel-head h2 {
  margin: 0; font-size: 16px; font-weight: 620;
  display: flex; align-items: center; gap: 9px; letter-spacing: 0.01em;
}
.panel-note { font-size: 12.5px; color: var(--text-3); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 13.5px; font-weight: 560;
  padding: 8px 15px; border-radius: 9px;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.18s, color 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary {
  background: var(--accent); color: var(--accent-ink);   /* 金配石墨黑，不用白字 */
  box-shadow: 0 2px 10px rgba(209, 190, 145, 0.16);
}
.btn-primary:hover { background: #DECFA4; box-shadow: 0 4px 16px rgba(209, 190, 145, 0.24); }

.btn-ghost {
  background: rgba(243, 241, 235, 0.045); color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: rgba(243, 241, 235, 0.09); border-color: var(--line-accent); }

.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }

.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: none; border: 1px solid var(--line); color: var(--text-2);
  cursor: pointer; transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-accent); background: rgba(243,241,235,0.05); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============ 岗位表单 ============ */
.job-form {
  border-top: 1px solid var(--line); padding-top: 16px;
  animation: formIn 0.24s ease;
}
@keyframes formIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

.form-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px 16px;
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--text-2); }
.field label em { color: var(--accent); font-style: normal; }
.field input, .field textarea, .field select {
  font: inherit; font-size: 14px; color: var(--text);
  background: rgba(20, 21, 18, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 8px 11px; width: 100%;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(209, 190, 145, 0.14);
}
.field input[type="date"] { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23BABDB4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 30px;
}

.form-actions { display: flex; gap: 10px; margin-top: 15px; }

/* ============ 看板 ============ */
.board-head { margin-bottom: 16px; }
.board-filters { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-chip {
  font: inherit; font-size: 12.5px; cursor: pointer;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(20, 21, 18, 0.5); color: var(--text-2);
  border: 1px solid var(--line);
  transition: all 0.18s;
  display: inline-flex; align-items: center; gap: 6px;
}
.filter-chip .cnt { font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.filter-chip:hover { border-color: var(--line-accent); color: var(--text); }
.filter-chip[aria-pressed="true"] {
  background: rgba(209, 190, 145, 0.14); color: var(--accent);
  border-color: var(--line-accent); font-weight: 600;
}
.filter-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.board {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px;
  align-items: start;
}
.lane { min-width: 0; }
.lane-head {
  display: flex; align-items: center; gap: 8px;
  padding: 0 2px 9px; font-size: 13px; font-weight: 600; color: var(--text-2);
}
.lane-head .lane-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.lane-head .lane-cnt {
  margin-left: auto; font-family: var(--mono); font-size: 12px;
  color: var(--text-3); font-variant-numeric: tabular-nums;
}
.lane-body { display: flex; flex-direction: column; gap: 10px; min-height: 30px; }
.lane-empty {
  border: 1px dashed var(--line); border-radius: 10px;
  padding: 14px 10px; text-align: center;
  font-size: 12px; color: var(--text-3);
}

/* 岗位卡片 */
.job-card {
  position: relative; overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px 11px;
  cursor: pointer;
  transition: border-color 0.19s, transform 0.19s, box-shadow 0.19s;
}
.job-card:hover { border-color: var(--line-accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.3); }
.job-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.job-card[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 20px rgba(0,0,0,0.34); }

/* 边缘流光（悬停一次性扫过） */
.job-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(209, 190, 145, 0.65) 50%, transparent 70%);
  background-size: 260% 100%; background-position: 130% 0;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
}
.job-card:hover::after { animation: edgeSweep 1s ease-out 1; }
@keyframes edgeSweep {
  0% { opacity: 0; background-position: 130% 0; }
  12% { opacity: 1; }
  100% { opacity: 0; background-position: -40% 0; }
}

.job-card .jc-company { font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.job-card .jc-title { font-size: 14px; font-weight: 600; line-height: 1.4; }
.job-card .jc-meta {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 8px; font-size: 11.5px; color: var(--text-3);
}
.job-card .jc-loc { display: inline-flex; align-items: center; gap: 3px; }

/* 卡片底部：状态快速切换 + 详情入口 */
.jc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid var(--line);
}
.jc-status {
  font: inherit; font-size: 11.5px; color: var(--text-2);
  background: rgba(20, 21, 18, 0.55);
  border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 20px 3px 8px;
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M1 1l3 3 3-3' stroke='%23BABDB4' stroke-width='1.3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
  transition: border-color 0.16s, color 0.16s;
}
.jc-status:hover { border-color: var(--line-accent); color: var(--text); }
.jc-status:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.jc-open { font-size: 11px; color: var(--text-3); white-space: nowrap; transition: color 0.16s; }
.job-card:hover .jc-open { color: var(--accent); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.tag .dot { width: 5px; height: 5px; border-radius: 50%; }
.tag.due { border-color: rgba(217, 162, 107, 0.45); color: var(--warn); }
.tag.due-over { border-color: rgba(217, 162, 107, 0.7); color: var(--warn); font-weight: 600; }
.tag.missing { border-color: rgba(217, 162, 107, 0.35); color: var(--warn); }
.tag.ok { border-color: rgba(155, 175, 141, 0.35); color: var(--ok); }
.tag.sample { border-color: var(--line-accent); color: var(--accent); }

/* 状态色值（JS 中引用） */
.dot-prepare { background: var(--st-prepare); }
.dot-sent { background: var(--st-sent); }
.dot-interview { background: var(--st-interview); }
.dot-done { background: var(--st-done); }

/* ============ 列表视图（窄屏） ============ */
/* 桌面默认显示看板、隐藏列表；窄屏反转。空库时由 body.no-jobs 同时隐藏两者。
   注意：#list-view 不带 hidden 属性，显隐完全由媒体查询控制。 */
.list-view { display: none; flex-direction: column; gap: 10px; }
body.no-jobs .board, body.no-jobs .list-view { display: none !important; }

/* ============ 空状态 ============ */
.empty-state {
  text-align: center; padding: 34px 20px 40px;
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state img {
  width: 300px; max-width: 72vw; height: auto;
  border-radius: 10px; border: 1px solid var(--line);
  margin-bottom: 18px;
}
.empty-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.empty-desc { font-size: 13.5px; color: var(--text-2); margin: 0 0 18px; }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ============ 材料核对 ============ */
.check-body { min-height: 60px; }
.check-empty {
  padding: 26px 12px; text-align: center; color: var(--text-3);
  font-size: 13.5px; border: 1px dashed var(--line); border-radius: 10px;
}
.check-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 13px; border-bottom: 1px solid var(--line);
}
.check-toolbar .ct-job { font-weight: 600; font-size: 14.5px; }
.check-toolbar .ct-counts { margin-left: auto; display: flex; gap: 7px; flex-wrap: wrap; }

.check-list { display: flex; flex-direction: column; gap: 9px; }
.check-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px;
  align-items: start;
  background: rgba(20, 21, 18, 0.42);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px;
}
.check-item .ci-status { margin-top: 1px; }

/* 分段三态控件 */
.seg {
  display: inline-flex; border: 1px solid var(--line-strong);
  border-radius: 8px; overflow: hidden;
}
.seg button {
  font: inherit; font-size: 12px; padding: 4px 10px;
  background: transparent; color: var(--text-3);
  border: 0; cursor: pointer; transition: background 0.15s, color 0.15s;
  border-right: 1px solid var(--line);
}
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { font-weight: 600; }
.seg button[aria-pressed="true"].v-have { background: rgba(155,175,141,0.16); color: var(--ok); }
.seg button[aria-pressed="true"].v-missing { background: rgba(217,162,107,0.14); color: var(--warn); }
.seg button[aria-pressed="true"].v-unknown { background: rgba(243,241,235,0.08); color: var(--text-2); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.ci-main { min-width: 0; }
.ci-label { font-size: 14px; font-weight: 560; }
.ci-evidence {
  margin-top: 5px; font-size: 12.5px; color: var(--text-2);
  border-left: 2px solid var(--line-accent);
  padding: 2px 0 2px 10px;
  white-space: pre-wrap; word-break: break-word;
}
.ci-evidence .ev-src { color: var(--text-3); }
.ci-note-input {
  margin-top: 7px; width: 100%;
  font: inherit; font-size: 12.5px; color: var(--text);
  background: rgba(20,21,18,0.5); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 9px;
  transition: border-color 0.18s;
}
.ci-note-input:focus { outline: none; border-color: var(--accent); }
.ci-note-input::placeholder { color: var(--text-3); }
.ci-extra { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ci-remove {
  background: none; border: 0; color: var(--text-3); cursor: pointer;
  font-size: 12px; padding: 2px 6px; border-radius: 5px;
}
.ci-remove:hover { color: var(--warn); background: rgba(217,162,107,0.1); }

.add-check { margin-top: 12px; }

.check-hint {
  margin-top: 13px; font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}

/* AI 分析盒 */
.ai-box {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line);
}
.ai-box h3 { margin: 0 0 6px; font-size: 14px; font-weight: 620; color: var(--accent); }
.ai-desc { font-size: 12.5px; color: var(--text-2); margin: 0 0 11px; max-width: 640px; }
.ai-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.ai-result {
  margin-top: 14px; background: rgba(20,21,18,0.5);
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-size: 13px; line-height: 1.7;
}
.ai-result h4 { margin: 12px 0 5px; font-size: 13px; color: var(--accent); }
.ai-result h4:first-child { margin-top: 0; }
.ai-result ul { margin: 4px 0; padding-left: 20px; }
.ai-result li { margin: 3px 0; }
.ai-result .ai-meta { font-size: 11.5px; color: var(--text-3); margin-bottom: 8px; }
.ai-result .ai-raw { margin-top: 10px; }
.ai-result .ai-raw summary { cursor: pointer; color: var(--text-3); font-size: 12px; }
.ai-result .ai-raw pre {
  white-space: pre-wrap; word-break: break-word; font-size: 11.5px;
  color: var(--text-2); background: var(--bg); padding: 10px; border-radius: 8px;
  max-height: 260px; overflow: auto;
}

/* ============ 跟进列表 ============ */
.follow-list { display: flex; flex-direction: column; gap: 9px; }
.follow-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  background: rgba(20, 21, 18, 0.42);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 15px;
}
.follow-item.overdue { border-color: rgba(217, 162, 107, 0.45); }
.follow-date {
  text-align: center; min-width: 62px;
  border-right: 1px solid var(--line); padding-right: 14px;
}
.follow-date .fd-d {
  font-family: var(--mono); font-size: 19px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.follow-date .fd-m { font-size: 11px; color: var(--text-3); }
.follow-item.overdue .fd-d { color: var(--warn); }
.follow-main { min-width: 0; }
.follow-main .fm-job { font-weight: 600; font-size: 14px; }
.follow-main .fm-action { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.follow-ops { display: flex; gap: 7px; }
.follow-empty {
  padding: 22px 12px; text-align: center; color: var(--text-3);
  font-size: 13.5px; border: 1px dashed var(--line); border-radius: 10px;
}

/* ============ 抽屉 ============ */
.drawer-mask {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10, 10, 8, 0.55);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: 520px; max-width: 94vw;
  background: var(--panel);
  border-left: 1px solid var(--line-strong);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column;
  animation: drawerIn 0.26s cubic-bezier(0.32, 0.9, 0.35, 1);
}
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px 14px; border-bottom: 1px solid var(--line); gap: 12px;
}
.drawer-head h2 { margin: 0; font-size: 17px; font-weight: 640; }
.drawer-sub { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 30px; }

.d-section { margin-bottom: 20px; }
.d-section h3 {
  margin: 0 0 9px; font-size: 13px; font-weight: 620; color: var(--accent);
  letter-spacing: 0.05em;
}
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 14px; }
.d-grid .field { gap: 4px; }
.d-grid .field-wide { grid-column: 1 / -1; }
.d-grid label { font-size: 12px; color: var(--text-3); }
.d-grid input, .d-grid select, .d-grid textarea {
  font: inherit; font-size: 13.5px; color: var(--text);
  background: rgba(20, 21, 18, 0.6);
  border: 1px solid var(--line-strong);
  border-radius: 7px; padding: 7px 10px; width: 100%;
}
.d-grid input:focus, .d-grid select:focus, .d-grid textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(209, 190, 145, 0.12);
}
.d-grid textarea { resize: vertical; min-height: 70px; }
.d-grid select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23BABDB4' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px;
}
.d-desc {
  font-size: 13px; color: var(--text-2); line-height: 1.7;
  background: rgba(20, 21, 18, 0.5); border: 1px solid var(--line);
  border-radius: 9px; padding: 12px 14px;
  white-space: pre-wrap; word-break: break-word;
  max-height: 300px; overflow-y: auto;
}
.d-evidence-item {
  font-size: 12.5px; color: var(--text-2);
  border-left: 2px solid var(--line-accent); padding: 3px 0 3px 10px;
  margin-bottom: 7px; word-break: break-word;
}
.d-evidence-item .ev-claim { color: var(--text); }
.d-evidence-item .ev-src { color: var(--text-3); display: block; margin-top: 1px; }
.d-danger { border-top: 1px solid var(--line); padding-top: 16px; }
.btn-danger {
  background: none; border: 1px solid rgba(217, 162, 107, 0.5);
  color: var(--warn); font: inherit; font-size: 13px;
  padding: 7px 14px; border-radius: 8px; cursor: pointer;
  transition: background 0.18s;
}
.btn-danger:hover { background: rgba(217, 162, 107, 0.12); }

/* ============ 对话框 ============ */
.modal {
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--panel-2); color: var(--text);
  padding: 0; width: 560px; max-width: 92vw;
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(10, 10, 8, 0.6); backdrop-filter: blur(2px); }
.modal form { padding: 22px 24px; }
.modal h3 { margin: 0 0 13px; font-size: 16px; font-weight: 640; }
.modal-body { font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.modal-body textarea {
  width: 100%; min-height: 150px; margin-top: 8px;
  font: inherit; font-size: 13px; color: var(--text);
  background: rgba(20, 21, 18, 0.6); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 10px 12px; resize: vertical;
}
.modal-body textarea:focus { outline: none; border-color: var(--accent); }
.modal-body .modal-warn { color: var(--warn); }
.modal-body ul { margin: 6px 0; padding-left: 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ============ Toast ============ */
.toast-wrap {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: var(--panel-3); color: var(--text);
  border: 1px solid var(--line-accent);
  font-size: 13.5px; padding: 9px 18px; border-radius: 999px;
  box-shadow: var(--shadow);
  animation: toastIn 0.24s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.warn { border-color: rgba(217, 162, 107, 0.55); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ============ 减少动效 & 系统偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  .drift-a, .drift-b { animation: none; }
  #cursor-glow { display: none; }
  .job-card::after { display: none; }
  .job-card, .btn, .filter-chip { transition: none; }
  .drawer, .modal, .toast, .job-form, .drift-layer { animation: none !important; }
}
html.reduce-motion .drift-a, html.reduce-motion .drift-b { animation: none; }
html.reduce-motion #cursor-glow { display: none; }
html.reduce-motion .job-card::after { display: none; }
html.reduce-motion .job-card, html.reduce-motion .btn, html.reduce-motion .filter-chip { transition-duration: 0.01s; }
html.reduce-motion .drawer, html.reduce-motion .modal, html.reduce-motion .toast,
html.reduce-motion .job-form, html.reduce-motion .drawer-mask { animation: none !important; }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .board { grid-template-columns: repeat(2, 1fr); }
  .summary-art { display: none; }
}
@media (max-width: 640px) {
  .app-header { padding: 18px 16px 0; }
  main { padding: 14px 16px 70px; }
  .panel, .board-section { padding: 15px 15px; }
  .board { display: none; }
  body:not(.no-jobs) .list-view { display: flex; }
  .form-grid { grid-template-columns: 1fr; }
  .summary-strip { min-height: 0; }
  .stat-chip .num { font-size: 18px; }
  .drawer { width: 100vw; max-width: 100vw; }
  .brand-text h1 { font-size: 18px; }
  .brand-sub { display: none; }
  .follow-item { grid-template-columns: auto 1fr; }
  .follow-ops { grid-column: 1 / -1; justify-content: flex-end; }
  .check-item { grid-template-columns: 1fr; }
  .ci-extra { flex-direction: row; align-items: center; justify-content: space-between; }
  #cursor-glow { display: none; }
}
@media (max-width: 380px) {
  .stat-chip { padding: 6px 10px; }
  .panel-head h2 { font-size: 15px; }
}
