* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
  background: #f5f7fa; color: #333; min-height: 100vh;
}

/* 顶部 */
.top-bar {
  background: #1565c0; color: white; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.top-bar h1 { font-size: 17px; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.top-bar .who { font-size: 13px; color: rgba(255,255,255,0.95); display: inline-flex; align-items: center; gap: 4px; }
.top-btn {
  padding: 5px 13px; border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.12); color: #fff;
  font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.top-btn:hover { background: #fff; color: #1565c0; border-color: #fff; }

/* 容器 */
.staff-view { max-width: 520px; margin: 30px auto; padding: 0 16px; }
.hr-view { max-width: 1040px; margin: 30px auto; padding: 0 16px; }

.card {
  background: white; border-radius: 12px; padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07); margin-bottom: 16px;
}
.card h2 { font-size: 15px; font-weight: 600; color: #1565c0; margin-bottom: 16px; }

/* 表单 */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 5px; font-weight: 500; }
.form-row select, .form-row input {
  width: 100%; padding: 9px 12px; border: 1.5px solid #dde1e9; border-radius: 8px;
  font-size: 14px; outline: none; background: #fafbfc; transition: border-color 0.2s;
}
.form-row select:focus, .form-row input:focus { border-color: #1565c0; }

.count-row { display: flex; align-items: center; border: 1.5px solid #dde1e9; border-radius: 8px; overflow: hidden; background: #fafbfc; }
.count-row button { width: 44px; height: 44px; border: none; background: #eef2ff; font-size: 20px; cursor: pointer; color: #1565c0; flex-shrink: 0; }
.count-row button:hover { background: #c7d7f8; }
.count-row input { flex: 1; border: none; background: transparent; text-align: center; font-size: 18px; font-weight: 600; outline: none; min-width: 0; }

/* 上传 */
.upload-area { border: 2px dashed #c8d0e0; border-radius: 10px; padding: 16px; text-align: center; cursor: pointer; background: #fafbff; position: relative; transition: all 0.2s; }
.upload-area:hover { border-color: #1565c0; background: #eef2ff; }
.upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-icon { font-size: 26px; margin-bottom: 4px; }
.upload-label { font-size: 13px; color: #666; }
.upload-hint { font-size: 11px; color: #999; margin-top: 2px; }
.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.upload-thumb { width: 68px; height: 68px; border-radius: 6px; object-fit: cover; border: 2px solid #dde1e9; cursor: pointer; }
.thumb-wrap { position: relative; display: inline-block; }
.thumb-del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; border: none; background: #e53935; color: #fff; font-size: 12px; line-height: 16px; padding: 0; cursor: pointer; }
.thumb-del:hover { background: #c62828; }

/* 按钮 */
.btn-submit { width: 100%; padding: 13px; background: #1565c0; color: white; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 6px; transition: background 0.2s; }
.btn-submit:hover { background: #0d47a1; }
.btn-submit:disabled { background: #9bb8e0; cursor: not-allowed; }

.success-msg { display: none; background: #e8f5e9; color: #2e7d32; border-radius: 8px; padding: 12px 16px; font-size: 14px; text-align: center; border: 1px solid #c8e6c9; margin-top: 10px; }
.success-msg.show { display: block; }

/* 历史 */
.history-list { list-style: none; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 8px; border: 1px solid #eef0f5; margin-bottom: 8px; background: #fafbfc; font-size: 13px; }
.history-item .month-label { font-weight: 600; }
.count-badge { background: #1565c0; color: white; border-radius: 20px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.img-icon { font-size: 14px; cursor: pointer; opacity: 0.7; margin-left: 3px; }
.img-icon:hover { opacity: 1; }
.del-btn { background: none; border: none; color: #bbb; cursor: pointer; font-size: 15px; margin-left: 4px; }
.del-btn:hover { color: #e53935; }
.empty-hint { text-align: center; color: #bbb; font-size: 13px; padding: 36px 20px; }

/* HR 工具条 */
.hr-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.hr-toolbar select { padding: 7px 12px; border: 1.5px solid #dde1e9; border-radius: 8px; font-size: 13px; background: white; }
.hr-toolbar button { padding: 7px 14px; border-radius: 8px; border: none; font-size: 13px; cursor: pointer; font-weight: 600; }
.btn-export { background: #1565c0; color: white; }
.btn-export:hover { background: #0d47a1; }
.btn-manage { background: white; color: #555; border: 1.5px solid #dde1e9 !important; }
.btn-manage:hover { background: #f5f7fa; }

/* 表格 */
.hr-table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.07); }
th { background: #1565c0; color: white; padding: 10px 12px; text-align: center; font-weight: 600; white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #eef0f5; text-align: center; vertical-align: middle; position: relative; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f7f9ff; }
td.name-cell { text-align: left; font-weight: 500; min-width: 110px; }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; border: none; }
.status-open { background: #e8f5e9; color: #2e7d32; }
.status-closed { background: #fce4ec; color: #c62828; }
.count-cell { font-weight: 600; color: #1565c0; }
.count-cell.zero { color: #ccc; font-weight: 400; }
tr.total-row td { background: #f0f4ff; font-weight: 700; color: #1565c0; }

/* 统计卡 */
.stat-cards { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.stat-card { flex: 1; min-width: 110px; background: white; border-radius: 10px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); text-align: center; }
.stat-card .val { font-size: 24px; font-weight: 700; color: #1565c0; }
.stat-card .lbl { font-size: 12px; color: #888; margin-top: 2px; }

/* 模态 */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.show { display: flex; }
.modal-box { background: white; border-radius: 14px; padding: 24px; max-width: 520px; width: 100%; box-shadow: 0 8px 40px rgba(0,0,0,0.2); max-height: 88vh; display: flex; flex-direction: column; }
.modal-img { max-width: 100%; border-radius: 8px; margin-top: 8px; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #aaa; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-input { width: 100%; padding: 9px 12px; border: 1.5px solid #dde1e9; border-radius: 8px; font-size: 14px; outline: none; margin-bottom: 10px; }
.modal-input:focus { border-color: #1565c0; }
.pwd-field { position: relative; margin-bottom: 10px; }
.pwd-field input { padding-right: 42px; }
.pwd-field .modal-input { margin-bottom: 0; }
.form-row .pwd-field { margin-bottom: 0; }
.pwd-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 16px; opacity: 0.55; padding: 4px; line-height: 1; }
.pwd-toggle:hover { opacity: 1; }
.modal-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.modal-btns button { padding: 8px 18px; border-radius: 8px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-confirm { background: #1565c0; color: white; }
.btn-cancel { background: #f0f2f8; color: #555; }

/* 员工管理项 */
.emp-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; border: 1px solid #eef0f5; margin-bottom: 7px; background: #fafbfc; }
.emp-item .emp-name { flex: 1; font-size: 14px; font-weight: 500; }
.emp-item button { padding: 4px 9px; border-radius: 6px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.btn-rename { border: 1px solid #c8d0e0; background: white; color: #555; }
.btn-link { border: 1px solid #c8d0e0; background: #f0f4ff; color: #1565c0; }
.btn-delete { border: 1px solid #fcc; background: #fff5f5; color: #c62828; }

/* 登录页 */
.login-wrap { max-width: 360px; margin: 80px auto; }
.login-wrap .card { text-align: center; }

/* 填报情况看板 */
.reminder {
  border: 1px solid #ffe0b2; background: #fff8f0; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.reminder.all-done { border-color: #c8e6c9; background: #f1f8f1; }
.reminder-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.reminder-head .title { font-size: 14px; font-weight: 600; color: #e65100; }
.reminder.all-done .reminder-head .title { color: #2e7d32; }
.reminder-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.reminder-btn { padding: 6px 12px; border-radius: 8px; border: 1.5px solid #1565c0; background: #fff; color: #1565c0; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.reminder-btn:hover { background: #1565c0; color: #fff; }
.reminder-btn.ghost { border-color: #c8d0e0; color: #666; }
.reminder-btn.ghost:hover { background: #eef2ff; color: #1565c0; border-color: #1565c0; }
.name-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.name-chip { background: #fff; border: 1px solid #ffcc80; color: #e65100; border-radius: 14px; padding: 3px 11px; font-size: 12.5px; }

/* 移动端适配 */
@media (max-width: 480px) {
  .top-bar { padding: 12px 14px; gap: 8px; }
  .top-bar h1 { font-size: 15px; }
  .top-btn { padding: 5px 11px; font-size: 12px; }
  .staff-view { margin: 16px auto; }
  .card { padding: 18px 14px; }
  .reminder-actions { width: 100%; }
  .reminder-btn { flex: 1; text-align: center; }
}
