/* ============ 设计令牌：专业克制（Notion/Linear 调性）============ */
:root {
  /* 中性 */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-hover: #f4f4f5;
  --border: #ededee;
  --border-strong: #e0e0e2;

  /* 文字 */
  --text: #18181b;
  --text-2: #6b7280;
  --text-3: #9ca3af;

  /* 主色（克制靛蓝） */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;

  /* 梯队色 */
  --tier-reach: #d97706;      --tier-reach-bg: #fffbeb;   /* 冲刺 */
  --tier-match: #2563eb;      --tier-match-bg: #eff6ff;   /* 匹配 */
  --tier-safety: #059669;     --tier-safety-bg: #ecfdf5;  /* 保底 */

  /* 状态色 */
  --st-todo: #71717a;         --st-todo-bg: #f4f4f5;
  --st-applied: #2563eb;      --st-applied-bg: #eff6ff;
  --st-test: #7c3aed;         --st-test-bg: #f5f3ff;
  --st-interview: #4f46e5;    --st-interview-bg: #eef2ff;
  --st-offer: #059669;        --st-offer-bg: #ecfdf5;
  --st-fail: #9ca3af;         --st-fail-bg: #f4f4f5;
  --danger: #dc2626;          --danger-bg: #fef2f2;
  --warn: #d97706;

  /* 圆角 / 阴影 */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 1px 3px rgba(24,24,27,.06);
  --shadow-lg: 0 10px 30px rgba(24,24,27,.10);

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

/* ============ Reset ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg-subtle);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ============ 通用组件 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; line-height: 1;
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text);
  transition: all .12s ease; white-space: nowrap;
}
.btn:hover { background: var(--bg-hover); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; padding: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 600; line-height: 1.6;
}
.badge-reach   { color: var(--tier-reach);   background: var(--tier-reach-bg); }
.badge-match   { color: var(--tier-match);   background: var(--tier-match-bg); }
.badge-safety  { color: var(--tier-safety);  background: var(--tier-safety-bg); }
.badge-todo    { color: var(--st-todo);      background: var(--st-todo-bg); }
.badge-applied { color: var(--st-applied);   background: var(--st-applied-bg); }
.badge-test    { color: var(--st-test);      background: var(--st-test-bg); }
.badge-interview{color: var(--st-interview); background: var(--st-interview-bg); }
.badge-offer   { color: var(--st-offer);     background: var(--st-offer-bg); }
.badge-fail    { color: var(--st-fail);      background: var(--st-fail-bg); }
.badge-danger  { color: var(--danger);       background: var(--danger-bg); }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }

/* Toast */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: var(--r);
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 9999;
  box-shadow: var(--shadow-lg);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
