/* 人力行政系统 — 轻量办公风(与舰队其他系统一致) */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font: 13px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f5f6f8; color: #1f2328;
}

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  height: 48px; padding: 0 20px; background: #fff;
  border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 10;
}
.brand { font-size: 15px; font-weight: 600; color: #111; }
.top-right { display: flex; align-items: center; gap: 10px; }
.user-chip { color: #57606a; }

/* 登录 */
.login-wrap { display: flex; justify-content: center; padding-top: 10vh; }
.login-card {
  width: 340px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 28px; text-align: center;
}
.login-card h2 { margin-bottom: 4px; }
.login-card .muted { margin-bottom: 18px; }
.divider { color: #9aa4b2; margin: 14px 0; position: relative; }
.divider span { background: #fff; padding: 0 10px; position: relative; z-index: 1; }
.divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid #e5e7eb; }
.login-card input {
  width: 100%; padding: 8px 10px; margin-bottom: 10px;
  border: 1px solid #d0d7de; border-radius: 6px; font-size: 13px;
}
.login-card input:focus { outline: 2px solid #bfdcff; border-color: #1f6feb; }

/* 按钮 */
.btn {
  display: inline-block; padding: 6px 14px; border: 1px solid #d0d7de; border-radius: 6px;
  background: #f6f8fa; color: #1f2328; font-size: 13px; cursor: pointer;
}
.btn:hover { background: #eef1f4; }
.btn-primary { background: #1f6feb; border-color: #1f6feb; color: #fff; }
.btn-primary:hover { background: #1a5fd0; }
.btn-ghost { background: transparent; border-color: transparent; color: #57606a; }
.btn-block { width: 100%; margin-top: 4px; }

/* Tab */
.tabs {
  display: flex; gap: 4px; padding: 10px 20px 0; max-width: 1100px; margin: 0 auto;
}
.tab {
  padding: 8px 16px; border: 1px solid transparent; border-bottom: none; cursor: pointer;
  background: transparent; color: #57606a; border-radius: 8px 8px 0 0; font-size: 13px;
}
.tab.active { background: #fff; border-color: #e5e7eb; color: #111; font-weight: 600; }

.tabpane {
  max-width: 1100px; margin: 0 auto; background: #fff;
  border: 1px solid #e5e7eb; border-radius: 0 10px 10px 10px; padding: 14px 16px 18px;
}

/* 筛选栏 */
.filterbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.filterbar label { color: #57606a; display: flex; align-items: center; gap: 6px; }
.filterbar input[type="date"], .filterbar select {
  padding: 5px 8px; border: 1px solid #d0d7de; border-radius: 6px;
  font-size: 13px; background: #fff;
}
.muted { color: #9aa4b2; }

/* 表格(不设 overflow: 滚动容器会让 th 的 sticky 相对它而非视口, 吸顶整段失效) */
.tbl-wrap { }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td {
  padding: 7px 10px; text-align: left; border-bottom: 1px solid #eef0f3; white-space: nowrap;
}
.tbl th {
  position: sticky; top: 48px; background: #fafbfc; color: #57606a;
  font-weight: 600; border-bottom: 1px solid #e5e7eb; z-index: 5;
}
.tbl tbody tr:hover { background: #f6faff; }
.empty { text-align: center; color: #9aa4b2; padding: 26px 0 8px; }

/* 徽章 */
.badge {
  display: inline-block; padding: 0 6px; border-radius: 9px;
  font-size: 11px; line-height: 18px; margin-right: 4px;
}
.badge-blue { background: #ddf4ff; color: #0969da; }
.badge-amber { background: #fff8c5; color: #9a6700; }

/* 回调信息框 */
.cbinfo {
  background: #f6f8fa; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 10px 12px; margin-bottom: 12px; word-break: break-all; color: #57606a;
}

/* 首屏加载指示 */
.booting {
  text-align: center; color: #9aa4b2; padding: 60px 0 0; font-size: 13px;
}

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #24292f; color: #fff; border-radius: 8px; padding: 9px 18px;
  opacity: 0; pointer-events: none; transition: opacity .18s; max-width: 80vw; z-index: 99;
}
.toast.show { opacity: 1; }
.toast.err { background: #a40e26; }

.hidden { display: none !important; }

/* ---------- 人事档案: 弹窗 + 表单栅格 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(31,35,40,.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 4vh 16px; z-index: 50; overflow-y: auto;
}
.modal {
  width: 920px; max-width: 100%; background: #fff; border-radius: 10px;
  box-shadow: 0 8px 30px rgba(31,35,40,.25);
}
.modal-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid #e5e7eb; position: sticky; top: 0;
  background: #fff; border-radius: 10px 10px 0 0; z-index: 2;
}
.modal-head b { font-size: 14px; }
.modal-head .btn { margin-left: auto; }
.modal-body { padding: 14px 18px 20px; }

.form-sec { margin: 14px 0 6px; font-size: 13px; color: #57606a; font-weight: 600; }
.form-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px;
}
.form-grid .wide { grid-column: span 3; }
.form-grid .span2 { grid-column: span 2; }
.fld { display: flex; flex-direction: column; gap: 3px; }
.fld label { color: #57606a; font-size: 12px; }
.fld input, .fld select, .fld textarea {
  padding: 6px 8px; border: 1px solid #d0d7de; border-radius: 6px;
  font-size: 13px; font-family: inherit; background: #fff;
}
.fld textarea { resize: vertical; }
.idcard-wrap { display: flex; gap: 6px; align-items: center; }
.idcard-wrap input { flex: 1; }
.form-actions { margin-top: 16px; display: flex; gap: 10px; }

.tl-addrow { display: flex; gap: 8px; margin: 8px 0 6px; flex-wrap: wrap; }
.tl-addrow input, .tl-addrow select { padding: 5px 8px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 13px; }
.tl-addrow input[type="text"] { flex: 1; min-width: 180px; }

.badge-green { background: #dafbe1; color: #116329; }
.badge-gray { background: #eaeef2; color: #57606a; }
.file-upload { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.audit-line { color: #9aa4b2; font-size: 12px; margin-top: 4px; }
