/* ==========================================================================
   Hiro Signature 员工评价系统 - 全局样式（支持手机 / PC）
   ========================================================================== */
:root {
  --crimson: #c8102e;
  --crimson-dark: #9e0d25;
  --dark: #1c1c1e;
  --dark-2: #2a2a2e;
  --gold: #d4a017;
  --bg: #f4f2ee;
  --card: #ffffff;
  --text: #232323;
  --muted: #8a8a8a;
  --line: #e5e0d8;
  --ok: #2e7d32;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   登录页
   ========================================================================== */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1c1c1e 0%, #3c0d15 100%);
  padding: 20px;
}

.login-box {
  background: #fff;
  border-radius: 18px;
  padding: 40px 32px 28px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.login-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 0 auto 10px;
  display: block;
}

.login-title {
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--dark);
}

.login-sub {
  color: var(--crimson);
  font-weight: 600;
  letter-spacing: 2px;
  font-size: 14px;
  text-transform: uppercase;
  margin: 4px 0 24px;
}

.login-box input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 1px solid #d8d2c8;
  border-radius: 10px;
  font-size: 16px;
  background: #faf9f7;
  transition: border-color 0.2s;
}

.login-box input:focus {
  outline: none;
  border-color: var(--crimson);
  background: #fff;
}

.btn-login {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: var(--crimson);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-login:hover { background: var(--crimson-dark); }
.btn-login:active { transform: scale(0.98); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

.login-msg {
  margin-top: 14px;
  min-height: 20px;
  color: var(--crimson);
  font-size: 14px;
}

.login-foot {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
}

/* ==========================================================================
   顶部栏（员工列表页）
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.topbar-left { display: flex; align-items: center; gap: 10px; }
.topbar-logo { height: 36px; width: auto; border-radius: 50%; background: #fff; }
.topbar-brand { font-size: 18px; font-weight: 700; letter-spacing: 0.5px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-user { color: #d8d8d8; font-size: 14px; }

/* ==========================================================================
   通用按钮
   ========================================================================== */
.btn-small {
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.2s;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-outline:hover { background: rgba(255, 255, 255, 0.12); }

/* ==========================================================================
   悬浮按钮（Confirm / Back）
   ========================================================================== */
.floating-actions {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  gap: 10px;
}

.btn-confirm {
  background: var(--crimson);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(200, 16, 46, 0.45);
  transition: background 0.2s, transform 0.1s;
}

.btn-confirm:hover { background: var(--crimson-dark); }
.btn-confirm:active { transform: scale(0.96); }
.btn-confirm:disabled { opacity: 0.65; cursor: not-allowed; }

.btn-back {
  background: #fff;
  color: var(--dark);
  border: 2px solid #c9c4ba;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-back:hover { background: #f0ede8; }
.btn-back:active { transform: scale(0.96); }

/* ==========================================================================
   内容容器
   ========================================================================== */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.page-title {
  color: var(--dark);
  margin-bottom: 18px;
  font-size: 22px;
}

.msg { color: var(--muted); text-align: center; margin-top: 20px; }

/* ==========================================================================
   员工列表
   ========================================================================== */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.staff-btn {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.1s, border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-btn:hover {
  border-color: var(--crimson);
  color: var(--crimson);
  box-shadow: 0 6px 16px rgba(200, 16, 46, 0.12);
}

.staff-btn:active { transform: scale(0.97); }

.staff-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold);
  margin-top: 4px;
  width: 100%;
}

/* ==========================================================================
   检查清单页
   ========================================================================== */
.checklist-container { padding-top: 76px; }

.checklist-head {
  background: var(--dark);
  color: #fff;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 6px;
}

.checklist-head h2 { font-size: 20px; }
.checklist-head .checklist-meta { color: #c9c9c9; font-size: 13px; margin-top: 4px; }

.sop-title {
  font-size: 22px;
  color: var(--crimson);
  margin: 22px 4px 4px;
}

.sop-subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0 4px 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.checklist-section {
  background: var(--card);
  border-radius: 12px;
  margin: 14px 0;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.checklist-section h3 {
  color: var(--crimson);
  font-size: 17px;
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f0e9df;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px dashed #f0ebe3;
  cursor: pointer;
}

.check-item:last-child { border-bottom: none; }

.check-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--crimson);
  cursor: pointer;
}

.check-item label {
  flex: 1;
  cursor: pointer;
  font-size: 15px;
}

.check-item.checked label {
  color: #a5a5a5;
  text-decoration: line-through;
}

.check-item.checked input[type="checkbox"] { accent-color: var(--ok); }

/* 子项（缩进） */
.check-item.sub { padding-left: 26px; }
.check-item.sub label { color: #555; font-size: 14px; }

/* 父级勾选项（如 Charge:） */
.check-item.group label { font-weight: 700; }
.check-item.group { background: #faf8f4; border-radius: 8px; padding: 8px 10px; }

/* 评分输入区 */
.ratings-card {
  background: var(--card);
  border-radius: 12px;
  margin: 14px 0;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.ratings-card h3 {
  color: var(--crimson);
  font-size: 17px;
  margin-bottom: 8px;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.rating-row label {
  min-width: 130px;
  font-weight: 600;
  font-size: 15px;
}

.rating-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d8d2c8;
  border-radius: 8px;
  font-size: 15px;
  background: #faf9f7;
}

.rating-row input:focus { outline: none; border-color: var(--crimson); background: #fff; }

/* 保存状态条 */
.save-bar {
  margin-top: 24px;
  padding: 14px;
  border-radius: 12px;
  background: #eef6ee;
  border: 1px solid #cfe7cf;
  color: var(--ok);
  font-size: 14px;
  text-align: center;
}

/* ==========================================================================
   Toast 提示
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%) translateY(24px);
  background: var(--dark);
  color: #fff;
  padding: 13px 26px;
  border-radius: 30px;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 2000;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--ok); }
.toast.error { background: var(--crimson); }

/* ==========================================================================
   手机适配
   ========================================================================== */
@media (max-width: 480px) {
  .floating-actions { top: 10px; right: 10px; gap: 8px; }
  .btn-confirm { padding: 11px 20px; font-size: 15px; }
  .btn-back { padding: 9px 16px; font-size: 15px; }
  .checklist-container { padding-top: 72px; }
  .rating-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .rating-row label { min-width: 0; }
  .staff-grid { grid-template-columns: repeat(2, 1fr); }
  .login-box { padding: 32px 22px 22px; }
  .login-logo { width: 120px; height: 120px; }
}
