/* ============================================
  登录页 / 用户菜单 / 权限勾选
   与 layout.css 分开，避免把登录页的居中布局
   混进看板的栅格样式里
   ============================================ */

/* ---------- 登录页 ---------- */
.login-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:var(--bg-base); padding:24px;
}
.login-card{
  width:100%; max-width:360px; background:var(--bg-card);
  border:1px solid var(--border); border-radius:12px;
  padding:32px 28px 26px;
  box-shadow:0 1px 3px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
}
.login-brand{
  font-size:17px; font-weight:600; letter-spacing:.5px; margin-bottom:4px;
}
.login-brand span{color:var(--brand)}
.login-sub{
  color:var(--text-secondary); font-size:13px; margin-bottom:24px;
}
.login-field{margin-bottom:14px}
.login-field label{
  display:block; font-size:12px; color:var(--text-secondary); margin-bottom:6px;
}
.login-field input{
  width:100%; padding:9px 11px; font-size:14px; font-family:inherit;
  border:1px solid var(--border-strong); border-radius:7px;
  background:var(--bg-card); color:var(--text-primary);
  transition:border-color .15s, box-shadow .15s;
}
.login-field input:focus{
  outline:none; border-color:var(--brand);
  box-shadow:0 0 0 3px var(--brand-soft);
}
.login-remember{
  display:flex; align-items:center; gap:7px;
  font-size:13px; color:var(--text-secondary); margin:2px 0 18px;
}
.login-remember input{accent-color:var(--brand); cursor:pointer}
.login-btn{
  width:100%; padding:10px; font-size:14px; font-weight:500; font-family:inherit;
  color:#fff; background:var(--brand); border:none; border-radius:7px;
  cursor:pointer; transition:opacity .15s;
}
.login-btn:hover{opacity:.9}
.login-btn:disabled{opacity:.55; cursor:not-allowed}
.login-err{
  min-height:20px; margin-top:12px; font-size:13px; color:var(--danger);
  text-align:center;
}

/* ---------- 顶栏右侧用户区 ---------- */
.user-box{
  display:flex; align-items:center; gap:10px;
  padding-left:14px; margin-left:4px;
  border-left:1px solid var(--border);
}
.user-name{font-size:13px; color:var(--text-secondary); white-space:nowrap}
.user-out{
  font-size:12px; color:var(--text-muted); background:none; border:none;
  cursor:pointer; font-family:inherit; padding:2px 4px; border-radius:4px;
}
.user-out:hover{color:var(--danger); background:var(--danger-soft)}

/* ---------- 强制改密遮罩 ---------- */
.pw-mask{
  position:fixed; inset:0; z-index:2000;
  background:rgba(43,38,34,.45);
  display:flex; align-items:center; justify-content:center; padding:24px;
}
.pw-card{
  width:100%; max-width:380px; background:var(--bg-card);
  border-radius:12px; padding:26px 26px 22px;
  box-shadow:0 12px 40px rgba(0,0,0,.18);
}
.pw-card h3{font-size:16px; margin-bottom:6px}
.pw-card p{font-size:13px; color:var(--text-secondary); margin-bottom:18px}

/* ---------- 权限勾选矩阵 ---------- */
.perm-grid{
  display:grid; gap:8px;
  grid-template-columns:repeat(auto-fill, minmax(132px, 1fr));
}
.perm-item{
  display:flex; align-items:center; gap:7px;
  padding:7px 10px; font-size:13px; cursor:pointer;
  border:1px solid var(--border); border-radius:6px;
  background:var(--bg-card); transition:background .12s, border-color .12s;
}
.perm-item:hover{background:var(--bg-sub)}
.perm-item.on{border-color:var(--brand); background:var(--brand-soft); color:var(--brand)}
.perm-item input{accent-color:var(--brand); cursor:pointer}
.perm-item.disabled{opacity:.45; cursor:not-allowed}

.perm-group-title{
  font-size:12px; font-weight:600; color:var(--text-secondary);
  letter-spacing:.3px;
}
.perm-group-title:first-child{margin-top:0}

/* 分组标题 + 全选 */
.perm-group-head{
  display:flex; align-items:center; justify-content:space-between;
  margin:16px 0 8px;
}
.perm-all{
  display:flex; align-items:center; gap:5px;
  font-size:12px; color:var(--text-secondary); cursor:pointer;
  padding:2px 8px; border-radius:5px;
}
.perm-all:hover{background:var(--bg-sub); color:var(--text-primary)}
.perm-all input{accent-color:var(--brand); cursor:pointer}
.perm-all.disabled{opacity:.45; cursor:not-allowed}
.perm-all.disabled input{cursor:not-allowed}

/* ---------- 临时密码提示 ---------- */
.pw-reveal{
  margin-top:14px; padding:12px 14px; border-radius:8px;
  background:var(--warning-soft); border:1px solid #F5E3B8;
  font-size:13px; line-height:1.8;
}
.pw-reveal code{
  font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size:13px; background:#fff; padding:1px 6px; border-radius:4px;
  border:1px solid var(--border);
}
.pw-reveal .hint{color:var(--text-muted); font-size:12px}
