/* ==================== 管理后台：权限管理（员工管理） ==================== */
#tab-staff { padding: 20px; }

.stf-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.stf-title { font-size: 17px; font-weight: 700; color: #0f172a; }
.stf-count { font-size: 12px; color: #64748b; }
.stf-count b { color: #1e40af; font-size: 14px; }

.stf-role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 10px; }
.stf-role-card { border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.stf-role-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.stf-role-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.stf-role-key { font-size: 11px; color: #94a3b8; font-family: Consolas, Menlo, monospace; }
.stf-role-desc { font-size: 12px; color: #64748b; line-height: 1.5; margin-bottom: 8px; min-height: 18px; }
.stf-role-perms { display: flex; flex-wrap: wrap; gap: 4px; }
.stf-perm-chip { display: inline-block; padding: 1px 8px; border-radius: 4px; background: #f1f5f9; border: 1px solid #e2e8f0; color: #475569; font-size: 11px; font-family: Consolas, Menlo, monospace; }
.stf-perm-custom { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

.stf-hint { font-size: 12px; color: #64748b; background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; line-height: 1.6; }

.stf-admin-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #fef3c7; color: #92400e; font-size: 11px; }
.stf-state { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.stf-state-on { background: #d1fae5; color: #047857; }
.stf-state-off { background: #fee2e2; color: #b91c1c; }

/* ---------- 弹窗表单 ---------- */
.stf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.stf-fld label { display: block; font-size: 12px; color: #475569; margin-bottom: 4px; font-weight: 600; }
.stf-fld input, .stf-fld select {
    width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; box-sizing: border-box; background: #fff; color: #0f172a;
}
.stf-fld input:disabled, .stf-fld select:disabled { background: #f1f5f9; color: #64748b; }
.stf-role-hint { font-size: 12px; color: #1e40af; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 6px; padding: 7px 10px; margin-bottom: 12px; line-height: 1.6; }
.stf-perm-title { font-size: 13px; font-weight: 700; color: #0f172a; margin-bottom: 8px; }

.stf-perm-groups { display: flex; flex-direction: column; gap: 10px; }
.stf-perm-group { border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; }
.stf-perm-group-name { font-size: 12px; font-weight: 700; color: #64748b; margin-bottom: 6px; }
.stf-perm-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.stf-perm-check {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border: 1px solid #e2e8f0; border-radius: 6px;
    background: #fff; font-size: 13px; color: #334155; cursor: pointer; user-select: none;
}
.stf-perm-check:hover { border-color: #94a3b8; }
.stf-perm-check.ro { background: #f1f5f9; color: #64748b; }
.stf-perm-check input { margin: 0; accent-color: #1e40af; }
.stf-ro-mark { font-style: normal; font-size: 10px; color: #2563eb; background: #dbeafe; border-radius: 4px; padding: 0 5px; line-height: 16px; }

.mini-btn.danger { color: #dc2626; border-color: #fecaca; background: #fff; }
.mini-btn.danger:hover { background: #fef2f2; }
