/* =====================================================================
   求职笔记 · 设计系统 v2
   亮暗双主题 · 渐变主色 · 卡片化布局 · 响应式
   ===================================================================== */

/* ===================== 设计变量 ===================== */
:root {
  --bg: #f5f6f9;
  --surface: #ffffff;
  --surface-2: #f2f3f8;
  --text: #181b25;
  --text-muted: #6a7080;
  --border: #e6e8ef;
  --border-strong: #d8dbe5;

  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #e8effd;
  --grad: linear-gradient(135deg, #2563eb, #06b6d4);

  --ok: #0d9d6f;
  --ok-soft: #e2f6ee;
  --warn: #d9860b;
  --warn-soft: #fcf1dd;
  --danger: #dc4b4b;
  --danger-soft: #fdecec;

  --shadow-sm: 0 1px 2px rgba(23, 27, 37, .05);
  --shadow: 0 10px 30px -8px rgba(23, 27, 37, .12);
  --shadow-lg: 0 24px 60px -12px rgba(23, 27, 37, .25);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar-w: 258px;

  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b0d14;
  --surface: #141722;
  --surface-2: #1b1f2e;
  --text: #e9ebf4;
  --text-muted: #8d93a5;
  --border: #252a3c;
  --border-strong: #333953;

  --primary: #5c8dff;
  --primary-strong: #7cabff;
  --primary-soft: #1b2a4d;
  --grad: linear-gradient(135deg, #3b82f6, #22d3ee);

  --ok: #3bd69c;
  --ok-soft: #11302a;
  --warn: #f5b73e;
  --warn-soft: #332a12;
  --danger: #f37f7f;
  --danger-soft: #3a1c1c;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 12px 32px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 28px 70px -16px rgba(0, 0, 0, .7);

  color-scheme: dark;
}

/* ===================== 基础 ===================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: .2px; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: 14px; }
b { font-weight: 700; }
.muted { color: var(--text-muted); font-size: 13px; }
.dim { opacity: .75; font-size: 13px; }
.nav-ico, .btn-icon { display: inline-flex; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ===================== 布局 ===================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 18px 18px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  transition: transform .3s ease;
}
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

/* 品牌 */
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 22px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 13px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff; font-size: 19px; font-weight: 800;
  box-shadow: 0 6px 16px -4px rgba(37, 99, 235, .45);
}
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: .5px; }
.brand-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

/* 导航 */
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 12px;
  color: var(--text-muted); font-size: 14.5px; font-weight: 600;
  transition: all .18s;
}
.nav-item svg { flex: 0 0 auto; opacity: .85; }
.nav-item span { flex: 1; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-strong); }
[data-theme="dark"] .nav-item.active { color: var(--primary-strong); }
.nav-count {
  font-style: normal; font-size: 11.5px; font-weight: 800;
  background: var(--surface-2); color: var(--text-muted);
  padding: 2px 8px; border-radius: 999px; min-width: 22px; text-align: center;
}
.nav-item.active .nav-count { background: var(--primary); color: #fff; }
.nav-count:empty { display: none; }

/* 侧栏底部 */
.sidebar-footer {
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.cloud-status {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted); padding: 0 4px;
}
.cloud-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex: 0 0 8px; }
.cloud-status.ok i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 18%, transparent); }
.cloud-status.ok span { color: var(--ok); }
.cloud-status.err i { background: var(--danger); }
.cloud-status.err span { color: var(--danger); }
.side-actions { display: flex; gap: 6px; }
.tool-icon-btn {
  flex: 1; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--text-muted); background: var(--surface-2);
  transition: all .18s;
}
.tool-icon-btn:hover { color: var(--text); background: var(--border); }
.tool-icon-btn.danger:hover { color: var(--danger); }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-titles { flex: 1; min-width: 0; }
.topbar-titles h2 { font-size: 19px; line-height: 1.25; }
.topbar-titles .view-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.menu-toggle { display: none; color: var(--text-muted); padding: 6px 8px; border-radius: 10px; }
.menu-toggle:hover { background: var(--surface-2); color: var(--text); }

.content { padding: 26px 28px 44px; max-width: 1240px; width: 100%; margin: 0 auto; }

/* 遮罩（移动端抽屉） */
.scrim {
  position: fixed; inset: 0; z-index: 35;
  background: rgba(10, 12, 20, .5);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.app.nav-open .scrim { opacity: 1; pointer-events: auto; }

/* ===================== 按钮 ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 700; font-size: 13.5px;
  padding: 10px 16px; border-radius: 12px;
  transition: transform .15s, box-shadow .2s, background .2s, opacity .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .45);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -6px rgba(37, 99, 235, .5); }
.btn-soft { background: var(--primary-soft); color: var(--primary-strong); }
[data-theme="dark"] .btn-soft { color: var(--primary-strong); }
.btn-soft:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--surface-2); color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--border); }

.mini-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700;
  background: var(--surface-2); color: var(--text-muted); transition: all .18s;
}
.mini-btn:hover { background: var(--border); color: var(--text); }
.mini-btn.primary { background: var(--primary-soft); color: var(--primary-strong); }
.mini-btn.primary:hover { background: var(--primary); color: #fff; }

.tool-btn {
  width: 29px; height: 29px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--text-muted); transition: all .18s;
}
.tool-btn:hover { background: var(--surface-2); color: var(--text); }
.tool-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }

.link-btn {
  margin-top: 8px; font-size: 12.5px; font-weight: 700;
  color: var(--primary-strong); padding: 2px 6px; border-radius: 6px;
}
[data-theme="dark"] .link-btn { color: var(--primary-strong); }
.link-btn:hover { background: var(--primary-soft); }

/* ===================== 仪表盘 ===================== */
.dash-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.dash-hero h3 { font-size: 22px; }
.dash-hero .muted b { color: var(--text); }
.hero-date {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 13px; border-radius: 999px; box-shadow: var(--shadow-sm);
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-ico {
  width: 44px; height: 44px; border-radius: 13px; flex: 0 0 44px;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-strong);
}
.stat-card.tone-warn .stat-ico { background: var(--warn-soft); color: var(--warn); }
.stat-card.tone-ok .stat-ico { background: var(--ok-soft); color: var(--ok); }
.stat-num { font-size: 25px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px; gap: 10px; flex-wrap: wrap;
}
.panel-head h3 {
  font-size: 15.5px; display: inline-flex; align-items: center; gap: 8px;
}
.panel-head h3 svg { color: var(--primary); }
.panel-sub { font-size: 12px; font-weight: 700; color: var(--text-muted); margin: 18px 0 10px; text-transform: uppercase; letter-spacing: .6px; }

/* 技能需求条 */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 32px; align-items: center; gap: 12px; }
.bar-label { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--surface-2); border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #fbbf24, #f59e0b); transition: width .6s cubic-bezier(.22, 1, .36, 1); }
.bar-row.learned .bar-fill { background: linear-gradient(90deg, #34d399, #0d9d6f); }
.bar-val { font-size: 12.5px; font-weight: 800; color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* 学习进度环 */
.progress-row { display: flex; align-items: center; gap: 22px; }
.ring { flex: 0 0 auto; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.ring-fg {
  fill: none; stroke: url(#ringGrad); stroke-width: 10; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dasharray .8s cubic-bezier(.22, 1, .36, 1);
}
.ring-legend { display: flex; flex-direction: column; gap: 6px; }
.ring-pct { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-pct small { font-size: 14px; font-weight: 700; color: var(--text-muted); margin-left: 2px; }
.legend-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }
.legend-row.ok { color: var(--ok); }
.legend-row.warn { color: var(--warn); }

.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--surface-2); border-radius: 12px;
}
.todo-item .muted { flex: 1; font-size: 12px; }
.todo-name { font-weight: 700; font-size: 13.5px; }

/* 最近收藏 */
.recent-list { display: flex; flex-direction: column; }
.recent-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 2px; border-bottom: 1px solid var(--border);
}
.recent-item:last-child { border-bottom: none; }
.recent-title { font-weight: 700; font-size: 14px; }
.recent-skills { display: flex; gap: 6px; flex-wrap: wrap; max-width: 50%; justify-content: flex-end; }

/* ===================== 工具栏与搜索 ===================== */
.toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.search {
  flex: 1; min-width: 220px; padding: 11px 15px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  outline: none; transition: border .2s, box-shadow .2s;
}
.search::placeholder { color: var(--text-muted); opacity: .7; }
.search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.toolbar .muted { white-space: nowrap; }

/* ===================== 招聘公告卡片 ===================== */
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.job-card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 14px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 11px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.job-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.job-tools { position: absolute; top: 12px; right: 12px; display: flex; gap: 2px; opacity: .45; transition: opacity .18s; }
.job-card:hover .job-tools { opacity: 1; }
.job-title { font-size: 15.5px; font-weight: 800; line-height: 1.35; padding-right: 64px; }
.job-meta { font-size: 12.5px; }
.job-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.job-desc { background: var(--surface-2); border-radius: 12px; padding: 11px 13px; }
.job-desc-text {
  font-size: 12.5px; line-height: 1.65; color: var(--text-muted);
  white-space: pre-wrap; word-break: break-word;
  max-height: 66px; overflow: hidden; transition: max-height .3s ease;
}
.job-desc.open .job-desc-text { max-height: 1400px; }
.job-desc.open .job-desc-text { color: var(--text); }
.job-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px dashed var(--border); padding-top: 10px; margin-top: auto;
}
.job-foot .muted { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.foot-right { display: inline-flex; align-items: center; gap: 8px; }
.salary-chip {
  font-size: 12px; font-weight: 800; color: var(--ok);
  background: var(--ok-soft); padding: 4px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.src-link {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--primary-strong); font-size: 12.5px; font-weight: 700; text-decoration: none;
}
[data-theme="dark"] .src-link { color: var(--primary-strong); }
.src-link:hover { text-decoration: underline; }

/* 药丸标签 */
.pill {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-2); color: var(--text); border: 1px solid transparent;
}
.pill.sm { font-size: 11px; padding: 3px 8px; }
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 22%, transparent); }

/* ===================== 学习清单 ===================== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.skill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s, box-shadow .2s;
}
.skill-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.skill-card.learned { border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.skill-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.skill-name { font-size: 15px; font-weight: 800; }
.skill-usage { display: flex; flex-direction: column; gap: 7px; }
.skill-usage .muted { font-size: 12px; }
.skill-track { display: block; background: var(--surface-2); border-radius: 999px; height: 6px; overflow: hidden; }
.skill-fill { display: block; height: 100%; border-radius: 999px; background: var(--grad); transition: width .5s ease; }
.skill-card.learned .skill-fill { background: linear-gradient(90deg, #34d399, #0d9d6f); }

.ok-badge, .need-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
.ok-badge { color: var(--ok); background: var(--ok-soft); }
.need-badge { color: var(--warn); background: var(--warn-soft); }

/* ===================== 空状态 ===================== */
.empty {
  text-align: center; color: var(--text-muted); padding: 46px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.empty-ico {
  width: 78px; height: 78px; border-radius: 26px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text-muted);
}
.empty p { font-size: 13.5px; max-width: 340px; line-height: 1.7; }
.empty.sm { padding: 24px 12px; gap: 12px; }

/* 列表为空时：占满整行并垂直居中，而不是挤在第一列 */
.jobs-grid > .empty, .skills-grid > .empty { grid-column: 1 / -1; }
.jobs-grid:has(> .empty), .skills-grid:has(> .empty) {
  grid-template-columns: 1fr;
  min-height: 52vh;
  align-content: center;
}

/* ===================== 弹窗 ===================== */
/* 性能要点：遮罩不用 backdrop-filter（模糊逐帧重绘会卡顿）；
   卡片动画只动 transform/opacity 并提升合成层（will-change），走 GPU */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 12, 20, .6);
  display: grid; place-items: center; padding: 20px;
  animation: fade .22s ease;
  will-change: opacity;
}
.modal-backdrop[hidden] { display: none !important; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%; max-width: 580px; max-height: 90vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg);
  animation: pop .32s cubic-bezier(.22, 1, .36, 1);
  will-change: transform, opacity;
}
@keyframes pop { from { transform: translateY(18px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }

/* 退场动画：JS 加 .closing，动画结束后再真正隐藏 */
.modal-backdrop.closing, .login-backdrop.closing {
  animation: fadeOut .2s ease forwards;
  pointer-events: none;
}
.modal-backdrop.closing .modal-card,
.login-backdrop.closing .login-card { animation: popOut .18s ease forwards; }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes popOut { to { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop, .modal-card, .login-backdrop, .login-card { animation: none !important; }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.modal-head h3 { font-size: 16.5px; }
.modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 15px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px; border-top: 1px solid var(--border);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.field em { color: var(--danger); font-style: normal; }
.field input, .field textarea {
  padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); outline: none; resize: vertical;
  transition: border .2s, box-shadow .2s, background .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); opacity: .65; }
.field input:focus, .field textarea:focus {
  border-color: var(--primary); background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.field input.err { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }

/* 标签输入 */
.tag-input {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 9px 11px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); min-height: 46px;
  transition: border .2s, box-shadow .2s;
}
.tag-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary-strong);
  padding: 4px 6px 4px 11px; border-radius: 999px;
}
[data-theme="dark"] .tag { color: var(--primary-strong); }
.tag button {
  width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  color: inherit; opacity: .65; transition: all .15s;
}
.tag button:hover { opacity: 1; background: color-mix(in srgb, var(--primary) 25%, transparent); }
.tag-input input { border: none; background: none; outline: none; flex: 1; min-width: 130px; padding: 4px; color: var(--text); }

/* ===================== 登录 ===================== */
.login-backdrop {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  background:
    radial-gradient(600px 400px at 15% 12%, color-mix(in srgb, #2563eb 15%, transparent), transparent 70%),
    radial-gradient(700px 500px at 85% 88%, color-mix(in srgb, #06b6d4 12%, transparent), transparent 70%),
    var(--bg);
  animation: fade .25s ease;
}
.login-backdrop[hidden] { display: none !important; }
.login-card {
  width: 100%; max-width: 372px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; box-shadow: var(--shadow-lg);
  padding: 36px 30px 30px; text-align: center;
  animation: pop .3s cubic-bezier(.22, 1, .36, 1);
}
.login-logo {
  width: 54px; height: 54px; border-radius: 17px; margin: 0 auto 16px;
  background: var(--grad); display: grid; place-items: center;
  color: #fff; font-size: 24px; font-weight: 800;
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, .5);
}
.login-card h3 { font-size: 20px; }
.login-card .login-tip { font-size: 13px; color: var(--text-muted); margin: 7px 0 24px; }
.login-card .field { text-align: left; }
.login-card input[type="password"] { padding: 13px 15px; font-size: 15px; text-align: center; letter-spacing: 1px; }
.login-err {
  color: var(--danger); font-size: 13px; font-weight: 700;
  background: var(--danger-soft); border-radius: 10px; padding: 9px 12px;
}
.login-card .btn-primary { width: 100%; margin-top: 16px; padding: 12px; font-size: 14.5px; }
.login-checking {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--text-muted); font-size: 13px; padding: 24px 0 8px;
}
.spinner {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 18px;
  border: 2.5px solid var(--border-strong); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 主题切换丝滑过渡：切换瞬间由 JS 挂上 theme-anim，450ms 后移除 */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .38s ease, color .28s ease, border-color .38s ease,
    fill .28s ease, stroke .28s ease, box-shadow .38s ease,
    background .38s ease, outline-color .38s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  html.theme-anim, html.theme-anim * { transition: none !important; }
}

/* ===================== 响应式 ===================== */
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 18px 18px 40px; }
  .topbar { padding: 12px 18px; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 86px 1fr 26px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar-titles h2 { font-size: 17px; }
  .topbar .btn { padding: 9px 12px; font-size: 12.5px; }
  .topbar .btn .btn-text { display: none; }
  .job-tools { opacity: 1; }
  .recent-skills { display: none; }
  .panel { padding: 16px; }
  .login-card { padding: 28px 22px 24px; }
}
