:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

a { color: var(--brand); text-decoration: none; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #38bdf8 100%);
}
.login-card {
  width: 360px;
  background: #fff;
  border-radius: 14px;
  padding: 34px 30px 26px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .28);
}
.login-card h1 { font-size: 20px; margin: 0 0 6px; text-align: center; }
.login-card .sub { color: var(--muted); font-size: 12px; text-align: center; margin-bottom: 22px; }
.login-card label { display: block; font-size: 13px; color: #374151; margin-bottom: 6px; }
.login-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
  outline: none;
}
.login-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.login-card button { width: 100%; margin-top: 4px; }
.login-err { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 8px; }

/* ---------- 布局 ---------- */
.topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .logo { font-weight: 700; font-size: 16px; color: var(--brand); }
.topbar .user { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }

.layout { display: flex; min-height: calc(100vh - 56px); }
.side {
  width: 190px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  flex-shrink: 0;
}
.side button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #374151;
  font-size: 14px;
  cursor: pointer;
}
.side button:hover { background: #f1f5f9; }
.side button.active { background: #e0eaff; color: var(--brand); font-weight: 600; }

.main { flex: 1; padding: 20px 24px 60px; overflow-x: auto; }

/* ---------- 通用组件 ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.page-head h2 { font-size: 17px; margin: 0; }
.page-head .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--brand); }
.stat .t { color: var(--muted); font-size: 12px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; }
tbody tr:hover { background: #fafbff; }
td.actions { white-space: nowrap; }

button, .btn {
  font-family: inherit;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  cursor: pointer;
}
button:hover, .btn:hover { border-color: #cbd5e1; background: #f8fafc; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover { background: var(--brand-dark); }
button.danger { color: var(--red); border-color: #fecaca; }
button.danger:hover { background: #fef2f2; }
button.mini { padding: 4px 9px; font-size: 12px; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; line-height: 18px; }
.tag.gray { background: #f1f5f9; color: #475569; }
.tag.blue { background: #e0eaff; color: #1d4ed8; }
.tag.green { background: #dcfce7; color: #15803d; }
.tag.red { background: #fee2e2; color: #b91c1c; }
.tag.amber { background: #fef3c7; color: #b45309; }

input, select, textarea {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .1); }
textarea { resize: vertical; min-height: 70px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; }
.field.full { grid-column: 1 / -1; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type="search"] { width: 220px; }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 12px;
  width: 720px;
  max-width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
}
.modal h3 { margin: 0; font-size: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal .body { padding: 18px 20px; overflow-y: auto; }
.modal .foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }

.toast {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 99;
  opacity: 0;
  transition: opacity .2s;
}
.toast.show { opacity: .95; }
.toast.err { background: #b91c1c; }

.hidden { display: none !important; }

/* ---------- 在线简历页 ---------- */
.resume-wrap { max-width: 760px; margin: 0 auto; padding: 30px 18px 60px; }
.resume-head { text-align: center; margin-bottom: 22px; }
.resume-head h1 { font-size: 21px; margin: 0 0 6px; }
.resume-head p { color: var(--muted); font-size: 13px; margin: 0; }
.resume-section { margin-bottom: 18px; }
.resume-section h3 {
  font-size: 14px; margin: 0 0 10px; padding-left: 9px;
  border-left: 3px solid var(--brand); line-height: 1.1;
}
@media (max-width: 760px) {
  .side { width: 100%; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; }
  .side button { width: auto; white-space: nowrap; margin: 0 4px 0 0; }
  .layout { flex-direction: column; }
  .main { padding: 14px; }
}
