/**
 * 汉豪大学招聘系统 - 全局样式
 */
:root {
  --primary: #1565c0;          /* 汉豪大学主色：蓝色 */
  --primary-light: #1e76d8;
  --primary-dark: #0d4a9e;
  --accent: #2f7de0;           /* 蓝色点缀 */
  --bg: #f5f6fa;
  --card-bg: #ffffff;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --text-lighter: #b0b8c1;
  --border: #e4e7ed;
  --border-light: #ebeef5;
  --success: #67c23a;
  --warning: #e6a23c;
  --danger: #f56c6c;
  --info: #409eff;
  --purple: #9b59b6;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 16px rgba(21, 101, 192, 0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --sidebar-w: 220px;
  --header-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 14px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

button { font-family: inherit; cursor: pointer; }

ul, ol { list-style: none; }

/* ============ 通用按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { color: var(--primary); border-color: var(--primary); }
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-light); border-color: var(--primary-light); color: #fff; }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #85ce61; border-color: #85ce61; color: #fff; }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover { background: #ebb563; border-color: #ebb563; color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #f78989; border-color: #f78989; color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 13px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-link { border: none; background: none; color: var(--primary); padding: 4px 8px; }
.btn-link:hover { background: rgba(21, 101, 192, 0.06); }

/* ============ 表单 ============ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; margin-bottom: 6px; font-weight: 500; color: var(--text); }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.08);
}
.form-textarea { min-height: 90px; resize: vertical; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ============ 卡片 ============ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
  margin-right: 8px;
}

/* ============ 标签 ============ */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
.tag-primary { background: rgba(21, 101, 192, 0.08); color: var(--primary); }
.tag-success { background: rgba(103, 194, 58, 0.1); color: var(--success); }
.tag-warning { background: rgba(230, 162, 60, 0.1); color: var(--warning); }
.tag-danger { background: rgba(245, 108, 108, 0.1); color: var(--danger); }
.tag-info { background: rgba(64, 158, 255, 0.1); color: var(--info); }
.tag-gray { background: #f0f2f5; color: var(--text-light); }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  background: #fafbfc;
  color: var(--text-light);
  font-weight: 500;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table tbody tr:hover { background: #fafbfc; }
.table .empty {
  text-align: center;
  color: var(--text-lighter);
  padding: 40px 0;
}

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s;
}
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 520px;
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s;
}
.modal-lg { width: 760px; }
.modal-xl { width: 960px; }
.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
}
.modal-close {
  border: none;
  background: none;
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============ 提示消息 ============ */
.toast-wrap {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s;
}
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }
@keyframes slideDown { from { transform: translateY(-16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============ 分页 ============ */
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}
.pagination button {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
}
.pagination button:hover { color: var(--primary); border-color: var(--primary); }
.pagination button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination .page-info { font-size: 13px; color: var(--text-light); margin-right: 8px; }

/* ============ 空状态 ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-lighter);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state .text { font-size: 14px; }

/* ============ 徽章 ============ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

/* ============ 步骤条 ============ */
.steps { display: flex; align-items: center; margin: 20px 0 30px; }
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.step::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step:first-child::before { display: none; }
.step.done::before { background: var(--success); }
.step.active::before { background: var(--primary); }
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  position: relative;
  z-index: 1;
  margin-bottom: 6px;
}
.step.done .step-num { background: var(--success); border-color: var(--success); color: #fff; }
.step.active .step-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.step-label { font-size: 12px; color: var(--text-light); white-space: nowrap; }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.done .step-label { color: var(--success); }

/* ============ 统计卡片 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  flex-shrink: 0;
}
.stat-value { font-size: 26px; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-light); }

/* ============ 搜索栏 ============ */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}
.filter-bar .form-input, .filter-bar .form-select { width: auto; }
.filter-bar .spacer { flex: 1; }

/* ============ 打印样式 ============ */
@page { margin: 14mm; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 0;
  }
  .no-print { display: none !important; }
  .admit-card { box-shadow: none !important; border-color: #000 !important; }
}

/* ============ 准考证样式 ============ */
.admit-card {
  border: 2px solid var(--primary); border-radius: 10px; overflow: hidden;
  background: #fff; color: #1a1a1a; page-break-inside: avoid;
}
.admit-head {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; text-align: center; padding: 18px 16px;
}
.admit-head .school { font-size: 26px; letter-spacing: 8px; font-weight: 700; }
.admit-head .doc-type { font-size: 15px; margin-top: 6px; opacity: 0.92; letter-spacing: 2px; }
.admit-body { padding: 22px; }
.admit-photo {
  float: right; width: 92px; height: 116px; border: 1px dashed #b0b8c0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 12px; color: #9aa3ad; margin: 0 0 14px 14px; border-radius: 4px;
}
.admit-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; clear: both;
}
.admit-field { display: flex; font-size: 14px; border-bottom: 1px solid #ececf0; padding: 7px 0; }
.admit-field .k { width: 88px; flex-shrink: 0; color: #6b7280; }
.admit-field span:last-child { font-weight: 600; color: #222; word-break: break-all; }
.admit-note {
  clear: both; margin-top: 18px; font-size: 12.5px; color: #555;
  background: #f6f8fc; border: 1px solid #eef1f6; padding: 12px 14px; border-radius: 8px; line-height: 1.8;
}
.admit-footer {
  margin-top: 20px; display: flex; justify-content: space-between; gap: 20px;
  font-size: 13px; padding-top: 12px; border-top: 1px solid #ececf0; color: #444;
}

/* ============ 站内信与横幅 ============ */
.inbox-chip {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; color: #fff;
  background: rgba(255,255,255,0.18); margin-right: 4px;
}
.inbox-chip:hover { background: rgba(255,255,255,0.3); }
.inbox-badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px;
  padding: 0 4px; border-radius: 9px; background: #ff5252; color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}
.system-closed-banner {
  background: #fff4e5; color: #b45309; border-bottom: 1px solid #fed7aa;
  padding: 10px 16px; text-align: center; font-size: 14px;
}
.msg-item {
  border: 1px solid var(--border-light); border-radius: 8px; padding: 14px 16px;
  margin-bottom: 12px; cursor: pointer; transition: background .15s;
}
.msg-item:hover { background: #f7faff; }
.msg-item.unread { border-left: 3px solid var(--primary); background: #f3f8ff; }
.msg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd2da; flex-shrink: 0; }
.msg-dot.on { background: var(--primary); }
.msg-title { font-weight: 600; font-size: 15px; color: var(--text); flex: 1; }
.msg-time { font-size: 12px; color: var(--text-lighter); flex-shrink: 0; }
.msg-content { font-size: 14px; color: var(--text-light); line-height: 1.8; white-space: pre-wrap; }

/* ============ 滚动条 ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9ced6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8aeb8; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 考生端成绩展示 ============ */
.score-row {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px;
  background: #f4f8ff; border: 1px solid var(--border-light);
  border-radius: 8px; padding: 10px 12px;
}
.score-item { display: flex; flex-direction: column; min-width: 72px; }
.score-item .s-label { font-size: 12px; color: var(--text-light); margin-bottom: 2px; }
.score-item .s-val { font-size: 17px; font-weight: 700; color: var(--text); }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .form-row { flex-direction: column; gap: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 标签页切换 ============ */
.tabs { display: flex; gap: 8px; border-bottom: 2px solid var(--border); }
.tab {
  padding: 10px 18px; cursor: pointer; font-size: 14px; color: var(--text-light);
  border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.sel-info { font-size: 13px; color: var(--text-light); }
