/* 项目墙 · 后台管理样式
   与前台（项目墙）保持同一套视觉：Apple 风格、白卡、大圆角、淡阴影，
   品牌金色 #F0A828 作强调色。手机优先 —— 马哥可能在外面用手机改密码。 */

:root {
  --gold: #F0A828;
  --gold-dark: #B87D0E;
  --gold-soft: #FDF6E8;
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --text: #1D1D1F;
  --text-2: #6E6E73;
  --text-3: #A1A1A6;
  --line: rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --red: #C8342B;
  --green: #2B7A3E;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, select { outline: none; }
a { color: var(--gold-dark); text-decoration: none; }
.hidden { display: none !important; }

/* ---------------- 登录 ---------------- */
.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 36px 28px 28px;
}
/* LOGO 版品牌标记（2026-09-20）：原为「黄底 + 白字龙」，现为公司 LOGO。 */
.brand-mark {
  width: 65px; height: 65px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark img { width: 100%; height: 100%; display: block; }
.auth-card h1 { margin: 0 0 4px; font-size: 20px; text-align: center; font-weight: 600; }
.auth-sub { margin: 0 0 24px; text-align: center; color: var(--text-3); font-size: 13px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #FAFAFC;
  font-size: 15px;
}
/* 裁决长字段用的多行框（2026-09-21）：跟单行框同形，可上下拉，等宽字体便于比对数字 */
.field textarea {
  resize: vertical; min-height: 76px; line-height: 1.6;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); background: #fff; }
.auth-msg { min-height: 18px; font-size: 13px; margin: 10px 0 0; }
.auth-msg.err { color: var(--red); }
.auth-msg.ok { color: var(--green); }
.auth-foot { margin: 16px 0 0; text-align: center; font-size: 13px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-align: center;
  transition: opacity .15s;
}
.btn:active { opacity: .7; }
.btn-primary { background: var(--gold); color: #fff; font-weight: 500; width: 100%; }
.btn-ghost { background: rgba(0, 0, 0, 0.05); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; width: auto; }
.btn-danger { background: rgba(200, 52, 43, 0.1); color: var(--red); }
.btn-warn { background: var(--gold-soft); color: var(--gold-dark); }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 900px; margin: 0 auto;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .brand-mark { width: 43px; height: 43px; margin: 0; }
.brand-text { font-size: 15px; font-weight: 600; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--text-3); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

/* ---------------- 主体 ---------------- */
.main { max-width: 900px; margin: 0 auto; padding: 16px 16px 60px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
}
.stat-num { font-size: 22px; font-weight: 600; line-height: 1.2; }
.stat-label { font-size: 12px; color: var(--text-3); }
/* 有待裁决的分歧时把这张卡点亮 —— 数字不为 0 本身就是一种催促 */
.stat-card.is-alert {
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 0.5px rgba(240, 168, 40, 0.42);
}
.stat-card.is-alert .stat-num { color: var(--gold-dark); }

.actions { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.actions .btn-primary { width: auto; }

.section-head { margin-bottom: 12px; }
.section-head h2 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.hint { margin: 0; font-size: 12.5px; color: var(--text-2); line-height: 1.6; }

/* ---------------- 账号卡 ---------------- */
.user-list { display: flex; flex-direction: column; gap: 10px; }
.user-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px;
}
.user-card.is-disabled { opacity: .6; }
/* 被冻结的字段（三轮拉锯）：不是"停用"，是"等人裁" —— 所以只加金边，不压透明度，
   免得管理员把它当成一条无关紧要的记录划过去。 */
.user-card.is-locked { border-left: 3px solid var(--gold); padding-left: 13px; }
.user-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 11px; background: var(--gold-soft); color: var(--gold-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px;
}
.user-name { font-size: 15px; font-weight: 600; }
.user-login { font-size: 12px; color: var(--text-3); }
.user-badges { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 20px;
  background: rgba(0, 0, 0, 0.05); color: var(--text-2); white-space: nowrap;
}
.badge.admin { background: var(--gold-soft); color: var(--gold-dark); }
.badge.off { background: rgba(200, 52, 43, 0.1); color: var(--red); }
.badge.on { background: rgba(43, 122, 62, 0.1); color: var(--green); }
.badge.warn { background: rgba(240, 168, 40, 0.18); color: var(--gold-dark); }

.user-meta {
  margin: 10px 0 0; font-size: 12.5px; color: var(--text-2);
  display: flex; flex-wrap: wrap; gap: 4px 14px;
}
.user-meta b { font-weight: 600; color: var(--text); }
.user-actions {
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex; gap: 8px; flex-wrap: wrap;
}

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.4);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  width: 100%; max-width: 400px; max-height: 88vh; overflow: auto;
  background: var(--card); border-radius: 18px;
  box-shadow: var(--shadow-lg);
}
.modal-body { padding: 24px 22px 8px; }
.modal-body h2 { margin: 0 0 6px; font-size: 17px; }
.modal-body .hint { margin-bottom: 16px; }
.modal-foot {
  padding: 12px 22px 20px;
  display: flex; gap: 10px;
}
.modal-foot .btn { flex: 1; width: auto; }

/* ---------------- 提示 ---------------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px);
  background: rgba(29, 29, 31, 0.92); color: #fff;
  padding: 11px 18px; border-radius: 12px;
  font-size: 13.5px; max-width: 86vw; text-align: center;
  opacity: 0; pointer-events: none; transition: all .22s; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: rgba(200, 52, 43, 0.95); }

.loading { text-align: center; color: var(--text-3); padding: 40px 0; font-size: 13px; }

@media (max-width: 480px) {
  .user-badges { width: 100%; justify-content: flex-start; margin: 8px 0 0; }
  .user-top { flex-wrap: wrap; }
  .actions .btn { flex: 1; }
}

/* 项目编号徽标（2026-09-21） */
/* 同事之间用「0042」代指项目。折叠态就跟标题同一行，不新增一行高度。 */
.code-badge {
  display: inline-block;
  margin-right: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.02em;
  color: var(--text-2);
  background: var(--bg);
  border: 0.5px solid var(--line);
  border-radius: 5px;
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
}
/* 详情页头部的编号：金色，点一下复制 */
.head-code { margin: 0 0 6px; }
.code-chip {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--gold-dark);
  background: var(--gold-soft);
  border: none;
  border-radius: 6px;
  padding: 1px 9px;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.code-chip:active { opacity: 0.55; }
