/* =========================================================
   多用户相关样式：登录、账号待授权、成员管理、用户信息
   ========================================================= */

body.locked .app { display: none; }

/* ---------- 登录页 ---------- */
#auth-root { min-height: 100vh; }
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  background:
    radial-gradient(1100px 520px at 12% -10%, #e8effc 0%, rgba(232,239,252,0) 62%),
    radial-gradient(900px 480px at 100% 110%, #e6f4f2 0%, rgba(230,244,242,0) 58%),
    #f4f6fa;
}
.auth-card {
  width: 400px; max-width: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 60px -28px rgba(15,27,45,.35), 0 2px 6px rgba(15,27,45,.04);
  overflow: hidden;
}
.auth-head { padding: 26px 26px 20px; border-bottom: 1px solid var(--line-2); }
.auth-head .mark { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.auth-head .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(140deg, #3b82f6, #0ea5a4);
  display: grid; place-items: center; color: #fff; font-size: 11.5px; font-weight: 700;
}
.auth-head .tip { margin-top: 10px; font-size: 12px; color: var(--ink-3); line-height: 1.7; }
.auth-body { padding: 22px 26px 26px; }

.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.tabs button {
  position: relative; border: none; background: none; cursor: pointer;
  padding: 0 0 10px; font-size: 13px; color: var(--ink-3);
}
.tabs button.on { color: var(--ink); font-weight: 600; }
.tabs button.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--brand); border-radius: 2px;
}

.auth-field { margin-bottom: 13px; }
.auth-field label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; }
.auth-field input { width: 100%; height: 38px; font-size: 13.5px; }
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1; }
.code-row .btn { height: 38px; flex: 0 0 104px; justify-content: center; }

.auth-submit { width: 100%; height: 40px; justify-content: center; font-size: 13.5px; margin-top: 4px; }
.auth-msg { font-size: 12px; margin-top: 12px; min-height: 17px; color: var(--red); }
.auth-msg.ok { color: var(--green); }
.auth-foot {
  padding: 14px 26px; background: #fbfcfe; border-top: 1px solid var(--line-2);
  font-size: 11px; color: var(--muted); line-height: 1.7;
}

/* ---------- 待授权 ---------- */
.pending-card { width: 460px; max-width: 100%; text-align: center; }
.pending-card .icon {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 14px;
  background: #fdf3e3; color: #b45309; display: grid; place-items: center; font-size: 20px;
}
.pending-card h2 { font-size: 15px; margin-bottom: 8px; }
.pending-card p { font-size: 12.5px; color: var(--ink-2); line-height: 1.8; margin: 0 0 4px; }
.pending-card .uid {
  margin: 14px 0 4px; padding: 9px 12px; background: #f6f8fb; border: 1px dashed var(--line);
  border-radius: 7px; font-size: 11.5px; color: var(--ink-3); word-break: break-all;
}
.pending-card .uid b { color: var(--ink-2); font-family: ui-monospace, Menlo, Consolas, monospace; }

/* ---------- 顶栏用户 ---------- */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line);
}
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: #e8eefb; color: #1d4ed8;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 650;
}
.user-chip .who { display: flex; flex-direction: column; line-height: 1.25; }
.user-chip .who b { font-size: 12px; font-weight: 600; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who small { font-size: 10.5px; color: var(--ink-3); }

/* ---------- 只读提示 ---------- */
.readonly-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; margin-bottom: 14px;
  background: #fdf7ea; border: 1px solid #f3e2c2; border-radius: 8px;
  font-size: 12px; color: #8a5a09;
}

/* ---------- 忙碌态 ---------- */
.busy-mask {
  position: fixed; inset: 0; background: rgba(244,246,250,.72);
  backdrop-filter: blur(1.5px);
  display: grid; place-items: center; z-index: 300;
}
.busy-mask .box {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: 9px; box-shadow: var(--shadow); font-size: 12.5px; color: var(--ink-2);
}
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #dbe3ee; border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 角色徽章 ---------- */
.role-admin { background: #eaf0fe; color: #1d4ed8; }
.role-editor { background: #e6f6f4; color: #0f766e; }
.role-viewer { background: #f1f4f8; color: #64748b; }
.status-pending { background: #fdf3e3; color: #b45309; }
.status-active { background: #e8f6ef; color: #0f8a5f; }
.status-disabled { background: #f1f4f8; color: #94a3b8; }

table.tb tr.row-pending td { background: #fffdf7; }
.audit-action { font-size: 11px; }
.audit-json { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--ink-3); }

/* ---------- 设置页信息列表 ---------- */
.kv-lite > div {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px;
}
.kv-lite > div:last-child { border-bottom: none; }
.kv-lite span { color: var(--ink-3); }
.kv-lite b { font-weight: 600; }

/* ---------- 币种账套切换 ---------- */
.cur-switch {
  display: inline-flex; align-items: center; gap: 2px;
  background: #eef1f6; border: 1px solid var(--line); border-radius: 7px; padding: 2px;
}
.cur-switch button {
  border: none; background: transparent; cursor: pointer;
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  padding: 4px 9px; border-radius: 5px; line-height: 1.4;
}
.cur-switch button:hover { color: var(--ink-2); }
.cur-switch button.on {
  background: #fff; color: var(--ink); font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 27, 45, .12);
}
